I am now getting another kind of problem.
I created an axis webservice from the given below wsdl. my java client works perfectly with the axis webservice. When tested with the .net client I am getting the correct soap requests and response but the code is not showing any result received. I am using the proxy classes automatically generated by vc.net 2003 when pointed to the runnning webservice. my wsdl: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="NPersonTest" targetNamespace="http://shantanu.org/NPersonTest/" xmlns:tns="http://shantanu.org/NPersonTest/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://shantanu.org/NPersonTest/"> <xsd:element name="getPersonListResponse" type="tns:PersonList"/> <xsd:element name="getPersonListRequest" type="tns:void"/> <xsd:complexType name="Person"> <xsd:sequence> <xsd:element name="name" type="xsd:string"></xsd:element> <xsd:element name="age" type="xsd:int"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PersonList"> <xsd:sequence> <xsd:element name="person" type="tns:Person" minOccurs="0" maxOccurs="unbounded"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="void"> <xsd:sequence></xsd:sequence> </xsd:complexType> </xsd:schema> </wsdl:types> <wsdl:message name="getPersonListResponse"> <wsdl:part name="getPersonListResponse" element="tns:getPersonListResponse"/> </wsdl:message> <wsdl:message name="getPersonListRequest"> <wsdl:part name="getPersonListRequest" element="tns:getPersonListRequest"/> </wsdl:message> <wsdl:portType name="NPersonTest"> <wsdl:operation name="getPersonList"> <wsdl:input message="tns:getPersonListRequest"/> <wsdl:output message="tns:getPersonListResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="NPersonTestSOAP" type="tns:NPersonTest"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getPersonList"> <soap:operation soapAction="http://shantanu.org/NPersonTest/getPersonList"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="NPersonTest"> <wsdl:port name="NPersonTestSOAP" binding="tns:NPersonTestSOAP"> <soap:address location="http://tempuri.org"/> </wsdl:port> </wsdl:service> </wsdl:definitions> the soap request send: POST /axis/services/NPersonTestSOAP HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.573) Content-Type: text/xml; charset=utf-8 SOAPAction: "http://shantanu.org/NPersonTest/getPersonList" Content-Length: 311 Expect: 100-continue Connection: Keep-Alive Host: 127.0.0.1:9050 <?xml version="1.0" encoding="utf-8"?> <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> <getPersonListRequest xmlns="http://shantanu.org/NPersonTest/" /> </soap:Body> </soap:Envelope> the soap response: HTTP/1.1 100 Continue HTTP/1.1 200 OK Content-Type: text/xml;charset=utf-8 Transfer-Encoding: chunked Date: Mon, 09 May 2005 18:11:11 GMT Server: Apache-Coyote/1.1 225 <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <getPersonListResponse xmlns="http://shantanu.org/NPersonTest/"> <person xmlns=""><name>Person A </name><age>23</age></person> <person xmlns=""><name>Person B</name><age>25</age></person> <person xmlns=""><name>Person C</name><age>26</age></person> </getPersonListResponse> </soapenv:Body> </soapenv:Envelope> 0 Any insights..will be appreciated thanx. Shantanu Chawla -- Graduate Student Department of Computer Science, San Diego State University |
I suggest you add elementFormDefault="qualified" to your schema:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://shantanu.org/NPersonTest/" elementFormDefault="qualified"> Also, if you want to use the "wrapped" style, your input element name must be the same as your operation name: <xsd:element name="getPersonList" type="tns:void"/> <wsdl:message name="getPersonListRequest"> <wsdl:part name="getPersonListRequest" element="tns:getPersonList"/> </wsdl:message> Anne On 5/9/05, shantanu chawla <[hidden email]> wrote: > I am now getting another kind of problem. > > I created an axis webservice from the given below wsdl. my java client > works perfectly with the axis webservice. When tested with the .net > client I am getting the correct soap requests and response but the > code is not showing any result received. I am using the proxy classes > automatically generated by vc.net 2003 when pointed to the runnning > webservice. > > my wsdl: > > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions name="NPersonTest" > targetNamespace="http://shantanu.org/NPersonTest/" > xmlns:tns="http://shantanu.org/NPersonTest/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> > <wsdl:types> > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://shantanu.org/NPersonTest/"> > <xsd:element name="getPersonListResponse" type="tns:PersonList"/> > <xsd:element name="getPersonListRequest" type="tns:void"/> > <xsd:complexType name="Person"> > <xsd:sequence> > <xsd:element name="name" type="xsd:string"></xsd:element> > <xsd:element name="age" type="xsd:int"></xsd:element> > </xsd:sequence> > </xsd:complexType> > > <xsd:complexType name="PersonList"> > <xsd:sequence> > <xsd:element name="person" type="tns:Person" minOccurs="0" > maxOccurs="unbounded"></xsd:element> > </xsd:sequence> > </xsd:complexType> > > <xsd:complexType name="void"> > <xsd:sequence></xsd:sequence> > </xsd:complexType> > > </xsd:schema> > </wsdl:types> > <wsdl:message name="getPersonListResponse"> > <wsdl:part name="getPersonListResponse" > element="tns:getPersonListResponse"/> > </wsdl:message> > <wsdl:message name="getPersonListRequest"> > <wsdl:part name="getPersonListRequest" element="tns:getPersonListRequest"/> > </wsdl:message> > <wsdl:portType name="NPersonTest"> > <wsdl:operation name="getPersonList"> > <wsdl:input message="tns:getPersonListRequest"/> > <wsdl:output message="tns:getPersonListResponse"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="NPersonTestSOAP" type="tns:NPersonTest"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="getPersonList"> > <soap:operation > soapAction="http://shantanu.org/NPersonTest/getPersonList"/> > <wsdl:input> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="NPersonTest"> > <wsdl:port name="NPersonTestSOAP" binding="tns:NPersonTestSOAP"> > <soap:address location="http://tempuri.org"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > the soap request send: > > POST /axis/services/NPersonTestSOAP HTTP/1.1 > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client > Protocol 1.1.4322.573) > Content-Type: text/xml; charset=utf-8 > SOAPAction: "http://shantanu.org/NPersonTest/getPersonList" > Content-Length: 311 > Expect: 100-continue > Connection: Keep-Alive > Host: 127.0.0.1:9050 > > <?xml version="1.0" encoding="utf-8"?> > <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> > <getPersonListRequest xmlns="http://shantanu.org/NPersonTest/" /> > </soap:Body> > </soap:Envelope> > > the soap response: > > HTTP/1.1 100 Continue > > HTTP/1.1 200 OK > Content-Type: text/xml;charset=utf-8 > Transfer-Encoding: chunked > Date: Mon, 09 May 2005 18:11:11 GMT > Server: Apache-Coyote/1.1 > > 225 > > <?xml version="1.0" encoding="utf-8"?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <soapenv:Body> > <getPersonListResponse xmlns="http://shantanu.org/NPersonTest/"> > <person xmlns=""><name>Person A </name><age>23</age></person> > <person xmlns=""><name>Person B</name><age>25</age></person> > <person xmlns=""><name>Person C</name><age>26</age></person> > </getPersonListResponse> > </soapenv:Body> > </soapenv:Envelope> > > 0 > > Any insights..will be appreciated > > thanx. > > Shantanu Chawla > > -- > Graduate Student > Department of Computer Science, > San Diego State University > |
Free forum by Nabble | Edit this page |