I want to implement a WSDL service. To generate its codes, I use from different tools. When I use SoapUI, the generated file's method is as below:
*******************************************************
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header>
<tem:AuthenticationHeader>
<tem:TicketID>?</tem:TicketID>
</tem:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<tem:GetInfo>
<tem:sNo>?</tem:sNo>
<tem:source>?</tem:source>
</tem:GetInfo>
</soapenv:Body>
</soapenv:Envelope>
and when I use https://app.boomerangapi.com/ on Chrome, this method will be:
<x:Envelope
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<x:Header>
<tem:AuthenticationHeader>
<tem:TicketID>?</tem:TicketID>
</tem:AuthenticationHeader>
</x:Header>
<x:Body>
<tem:GetInfo>
<tem:sNo>?</tem:sNo>
<tem:source>?</tem:source>
</tem:GetInfo>
</x:Body>
</x:Envelope>
Why the generated methods are different in namespaces?!
What can be the problem in the source of this service?!
Those two SOAP bodies are exactly the same.
A namespace prefix in an element tag is just a symbolic shorthand for a namespace URI.
An XML document can define a namespace prefix using an attribute that starts with xmlns::
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
That attribute means “all names in this element and its descendants starting with soapenv: are actually names associated with the URI http://schemas.xmlsoap.org/soap/envelope/.”
The following namespace definition is exactly the same thing; it just specifies a different prefix to use as shorthand for the same URI:
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
So, the only difference is that the two XML documents is how they refer to the “http://schemas.xmlsoap.org/soap/envelope/” URI:
soapenv: are associated with that URI.x: are associated with that URI.The notation is different, but the meaning is the same. They literally have identical content.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With