views:

3789

answers:

2

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"&gt;
    <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?

+1  A: 

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.

codemeit
A: 

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