coffeemonitor
coffeemonitor

Reputation: 13150

Comparing WSDL files

I'm learning all about wsdl files, since I need to transmit data to some places that provide their API's with wsdl. And I'm on a LAMP environment with SOAP installed.

As I'm reading up on it from http://www.w3schools.com/wsdl/wsdl_ports.asp I notice the W3 School's version of the is simpler than the real-life version I'm working with.

Here's W3 School's tutorial version:

<message name="newTermValues">
<part name="term" type="xs:string"/>
<part name="value" type="xs:string"/>
</message>

And here's a real-life extract from a wsdl file I'm working with:

<wsdl:message name="StatesGetXMLHttpPostOut">
<wsdl:part name="Body"/>
</wsdl:message>

I notice some differences and some similarities. Like, why is there "<wsdl:" prepended in the latter version? Is that just some xml flexibility that's understood by SOAP?

Upvotes: 1

Views: 599

Answers (1)

Oskar Berggren
Oskar Berggren

Reputation: 5648

The "wsdl"-part is an XML namespace alias. The namespace is required, but there is the concept of a default namespace which applies when no alias is given. This is defined by an attribute on the root element, see for instance XML Default Namespace.

Upvotes: 1

Related Questions