The description element begin tag usually contains a set of namespace declarations which are used throughout the WSDL file.
Example
<?xml version="1.0" encoding="utf-8" ?>
<description
xmlns= "http://www.w3.org/ns/wsdl"
targetNamespace= "http://shaan.com/MyService"
xmlns:tns= "http://shaan.com/MyService"
xmlns:stns = "http://shaan.com/MyService/schema"
xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
xmlns:soap= "http://www.w3.org/2003/05/soap-envelope"
xmlns:wsdlx= "http://www.w3.org/ns/wsdl-extensions"
xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
</description>
NOTE
The namespace specification does not require that the document actually exist at the given location. The important point is that you specify a value that is unique, different from all other namespaces that are defined.
xmlns
The xmlns attribute sets the default name space of the description element.
The default name space is thus applied to all elements inside the description element, which does not explicitly declare another name space for themselves.
The default name space is set to a standard value for WSDL files: http://www.w3.org/ns/wsdl
targetNameSpace
This attribute contains the name space of your web service.
You can choose this name space freely, but there is a convention saying that the URI should point to the WSDL of the service.
xmlns:tns
This name space should be set to the same URI as the targetNameSpace attribute. That way you can refer to the target name space via this name space prefix (tns).
xmlns:stns
This name space attribute declares the Schema Target Name Space URI.
In other words, it should point to the URI for the XML schema's name space, of the schema you declare for your web service types, in the types element.
xmlns:wsoap
Points to the WSDL SOAP URI. Used in the bindings element of the WSDL.
xmlns:soap
Points to the SOAP URI of the SOAP version of the web service described by the WSDL is using.
xmlns:wsdlx
Points to the WSDL Extensions URI.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.