|
|
 |
|
 |
|
| Author |
Messages |
|
jlarson
Posts:1
 |
| 11/28/2007 5:12 PM |
|
I am seeing this response from the SMS Pro webservice: <faultstring>Server was unable to read request. --> 'Element' is an invalid node type. Line 6, position 4.</faultstring> However, the request that is made certainly has no node named 'Element'. What do I need to do to make this work? The webservices consumer I am working with is proprietary and not represented in your examples. So it is possible that the request is malformed. But nowhere can I find an example of what the request should look like. Here is the request and reply (with my auth details stripped). What is wrong with the request? --Request-- <?xml version="1.0" encoding="UTF-8" ?> <soap:Envelope xmlns:ns1="http://www.strikeiron.com" xmlns:ns2="http://ws.strikeiron.com" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <soap:Body> <ns1:GetCountryCodes /> </soap:Body> <soap:Header> <ns2:LicenseInfo> <ns2:RegisteredUser> <ns2:UserID>johndoe</ns2:UserID> <ns2:Password>youwish</ns2:Password> </ns2:RegisteredUser> </ns2:LicenseInfo> </soap:Header> </soap:Envelope> -- --Response-- Response Code: 500 (Internal Server Error) Date: Wed, 28 Nov 2007 23:42:12 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Cache-Control: private Content-Type: text/xml; charset=utf-8 Content-Length: 509 --Response Content-- <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header /> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Server was unable to read request. --> 'Element' is an invalid node type. Line 6, position 4.</faultstring> <faultactor /> </soap:Fault> </soap:Body> </soap:Envelope>-- |
|
|
|
|
alex
Posts:24
 |
| 11/29/2007 1:17 PM |
|
| When you are using a SOAP header, it needs to be the first child element of the SOAP envelope. In your request you have the Body first and then the Header. |
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|
|
|
|
|
|
|
|
|
|