I have an ASP.NET web service with the lines:
[WebService(Namespace = "http://internalservice.net/messageprocessing")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class ProvisioningService : WebService
{
[WebMethod]
public XmlDocument ProcessMessage(XmlDocument message)
{
}
}
I am calling a web service from ASP using something like:
provWSDL = "http://servername:12011/MessageProcessor.asmx?wsdl"
Set service = CreateObject("MSSOAP.SoapClient30")
service.ClientProperty("ServerHTTPRequest") = True
Call service.MSSoapInit(provWSDL)
xmlMessage = "<request><task>....various xml</task></request>"
result = service.ProcessMessage(xmlMessage)
The problem I am facing is that when XML reaches the ProcessMessage method, the plumbing web service added a default namespace along the way. those. if I set a breakpoint in ProcessMessage (XmlDocument post), I see:
<request xmlns="http://internalservice.net/messageprocessing">
<task>....various xml</task>
</request>
When I capture packets on the wire, I see that the XML sent by the SOAP toolkit is slightly different from the one sent by the .NET WS client. SOAP toolkit sends:
<SOAP-ENV:Envelope
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ProcessMessage xmlns="http://internalservice.net/messageprocessing">
<message xmlns:SOAPSDK4="http://internalservice.net/messageprocessing">
<request>
<task>...stuff to do</task>
</request>
</message>
</ProcessMessage>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
While the .NET client sends:
<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>
<ProcessMessage xmlns="http://internalservice.net/messageprocessing">
<message>
<request xmlns="">
<task>...stuff to do</task>
</request>
</message>
</ProcessMessage>
</soap:Body>
</soap:Envelope>
As long as I used the ASP / SOAP toolkit to invoke .NET web services, I don’t remember all the smart / SOAP -fu tricks I used to get around such things.
? COM- .NET-, XML WS , /, .