R
Robsy
I have made a very simple web service on an Axis2 Tomcat driven server.
Axis generates the wsdl fine heres a snippet.
<wsdl:definitions targetNamespace="http://ws.apache.org/axis2">
<wsdl:documentation>SimpleService</wsdl:documentation>
−
<wsdl:types>
−
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://ws.apache.org/axis2/xsd">
−
<xs:element name="echo">
−
<xs:complexType>
−
<xs:sequence>
<xs:element name="param0" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
−
<xs:element name="echoResponse">
−
<xs:complexType>
−
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
−
<wsdl:message name="echoMessage">
<wsdlart name="part1" element="ns0:echo"/>
</wsdl:message>
−
<wsdl:message name="echoResponse">
<wsdlart name="part1" element="ns0:echoResponse"/>
</wsdl:message>
−
<wsdlortType name="SimpleServicePortType">
−
<wsdlperation name="echo">
<wsdl:input message="axis2:echoMessage" wsaw:Action="urn:echo"/>
<wsdlutput message="axis2:echoResponse"/>
</wsdlperation>
</wsdlortType>
−
<wsdl:binding name="SimpleServiceSOAP11Binding"
type="axis2:SimpleServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
−
<wsdlperation name="echo">
.......snippet ends
I have also made a client that can communicate with the echo service
but ONLY if I use the targetnamespace of the schema and not the one for
wsdl definitions, and I have absolutely no idea why.
The request for the client request looks like this:
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:d="http://www.w3.org/2001/XMLSchema"
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header
/><v:Body><n0:echo id="o0" c:root="1"
xmlns:n0="http://ws.apache.org/axis2/xsd"><param0
i:type="d:string">Test af Soap
Webservice</param0></n0:echo></v:Body></v:Envelope>
According to all sorts of books and ressources on the net, the WSDL
definitions namespace address ALL the elements in the document, so why
is it that if I change the namespace to the defintions namespace then
my client gets a faultcode saying that the echo method is not known? I
am missing out on something here I know so please point me in the right
direction.
Axis generates the wsdl fine heres a snippet.
<wsdl:definitions targetNamespace="http://ws.apache.org/axis2">
<wsdl:documentation>SimpleService</wsdl:documentation>
−
<wsdl:types>
−
<xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://ws.apache.org/axis2/xsd">
−
<xs:element name="echo">
−
<xs:complexType>
−
<xs:sequence>
<xs:element name="param0" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
−
<xs:element name="echoResponse">
−
<xs:complexType>
−
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
−
<wsdl:message name="echoMessage">
<wsdlart name="part1" element="ns0:echo"/>
</wsdl:message>
−
<wsdl:message name="echoResponse">
<wsdlart name="part1" element="ns0:echoResponse"/>
</wsdl:message>
−
<wsdlortType name="SimpleServicePortType">
−
<wsdlperation name="echo">
<wsdl:input message="axis2:echoMessage" wsaw:Action="urn:echo"/>
<wsdlutput message="axis2:echoResponse"/>
</wsdlperation>
</wsdlortType>
−
<wsdl:binding name="SimpleServiceSOAP11Binding"
type="axis2:SimpleServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
−
<wsdlperation name="echo">
.......snippet ends
I have also made a client that can communicate with the echo service
but ONLY if I use the targetnamespace of the schema and not the one for
wsdl definitions, and I have absolutely no idea why.
The request for the client request looks like this:
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:d="http://www.w3.org/2001/XMLSchema"
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header
/><v:Body><n0:echo id="o0" c:root="1"
xmlns:n0="http://ws.apache.org/axis2/xsd"><param0
i:type="d:string">Test af Soap
Webservice</param0></n0:echo></v:Body></v:Envelope>
According to all sorts of books and ressources on the net, the WSDL
definitions namespace address ALL the elements in the document, so why
is it that if I change the namespace to the defintions namespace then
my client gets a faultcode saying that the echo method is not known? I
am missing out on something here I know so please point me in the right
direction.