Reputation: 828
I'm trying to call a web service in an Excel Macro:
Set objHTTP = New MSXML.XMLHTTPRequest
objHTTP.Open "post", "https://www.server.com/EIDEServer/EIDEService.asmx"
objHTTP.setRequestHeader "Content-Type", "text/xml"
objHTTP.setRequestHeader "SOAPAction", "PutSchedule"
objHTTP.send strXML
And I get back the following response:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Server did not recognize the value of HTTP Header SOAPAction: PutSchedule.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
Anybody out there done something like this before?
Upvotes: 8
Views: 40228
Reputation:
looks more like you're using xml-rpc instead of soap. interact with the webservice using the soap type library at : http://msdn.microsoft.com/en-us/library/aa192537(office.11).aspx, or the one that corresponds with your ms office version
Upvotes: 2
Reputation: 26658
You SOAP action should also include namespace of the method e.g.
"http://tempri.org/PutSchedule"
Find out what the namespace of your Service and add it in front of the method name PutSchedule.
Upvotes: 4