Please also provide the expected request and response messages. The WSDL that you supplied does not correspond to the response message you provided.
Anne On Jan 11, 2008 2:24 PM, Lawrence Mandel <[EMAIL PROTECTED]> wrote: > Hi Rushikesh, > > Can you please attach your entire WSDL document, including the definitions > element. This type of error is typically a problem with namespace > declarations or usage. > > Here's a shot at the problem without all of the information. In your WSDL > snippet you reference the XML schema element impl:getServerStatus but this > element is not defined in your XML schema snippets. > > BTW, you'll generally get more responses if you request them nicely. The > following came across (to me at least) as pretty demanding. > "Please spend some time reading this fully. I am tired of trying to solve > this problem for more than a week now. " > Remember, Apache is an Open Source community comprised of many people who > donate their time. There are no support contracts here. > > Lawrence > > > > > > > "Rushikesh Thakkar" <[EMAIL PROTECTED]> > 01/11/2008 02:50 AM > Please respond to > [email protected] > > > To > [email protected] > cc > > Subject > Fwd: WSDL problem 'Didn't find specified return QName' error > > > > > > > > Hi folks, > > Please spend some time reading this fully. I am tired of trying to solve > this problem for more than a week now. > > I have to write a webservice client using Axis 1.4. The webservice is very > old, written using servlets and apache-soap. I do not even have the WSDL > for it. So I wrote WSDL by myself, by analyzing request and response soap > messages. I am using the types and stubs generated for this service by > WSDL2Java tool, in my client application. > GetServerStatusResponse response = mappService .getServerStatus > (getServerStatusRequest); > System. out.println(response.getCode ()); > System. out.println(response.getDescription ()); > System. out.println(response.getTrackingCode ()); > The above code executes normally without any exceptions, but its prints > only null values. > Can anybody tell me what the problem with my WSDL is? > ------------ > Following is the Response soap-message that the webservice sends. > <?xml version="1.0" encoding="ISO-8859-1"?> > <SOAP-ENV:Envelope xmlns:SOAP-ENV=" > http://schemas.xmlsoap.org/soap/envelope/ "> > <SOAP-ENV:Body> > <getServerStatus xmlns="urn:sampleURN"> > <serviceStatus> > <code>0</code> > <description>getServerStatus OK!</description> > <trackingCode>AABBMMCOEED</trackingCode> > </serviceStatus> > <status>Server xyz alive at Thu Jan 10 11:33:35 CET > 2008%BUILDTAG%Build date & time: %DEPLOYDATE%</status> > </getServerStatus> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > Here is the WSDL definition I've written for above message: > <xsd:element name="getServerStatusResponse"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="getServerStatusReturn" > type="impl:GetServerStatusResponse"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > <xsd:complexType name="GetServerStatusResponse"> > <xsd:complexContent> > <xsd:extension base="impl:ServiceStatus"> > <xsd:sequence> > <xsd:element name="status" type="xsd:string"/> > </xsd:sequence> > </xsd:extension> > </xsd:complexContent> > </xsd:complexType> > > <xsd:complexType name="ServiceStatus"> > <xsd:sequence> > <xsd:element name="code" nillable="true" type="xsd:string"/> > <xsd:element name="description" nillable="true" type="xsd:string"/> > <xsd:element name="trackingCode" nillable="true" type="xsd:string"/> > </xsd:sequence> > </xsd:complexType> > > <wsdl:message name="getServerStatusRequest"> > <wsdl:part element="impl:getServerStatus" name="parameters"/> > </wsdl:message> > <wsdl:message name="getServerStatusResponse"> > <wsdl:part element="impl:getServerStatusResponse" name="parameters"/> > </wsdl:message> > > <wsdl:portType name="samplePortName"> > <wsdl:operation name="getServerStatus"> > <wsdl:input message="impl:getServerStatusRequest" > name="getServerStatusRequest"/> > <wsdl:output message="impl:getServerStatusResponse" > name="getServerStatusResponse"/> > </wsdl:operation> > </wsdl:portType> > > <wsdl:binding name="sampleBindingName" type="impl:samplePortName"> > <wsdlsoap:binding style="document" transport=" > http://schemas.xmlsoap.org/soap/http "/> > <wsdl:operation name="getServerStatus"> > <wsdlsoap:operation soapAction=""/> > <wsdl:input name="getServerStatusRequest"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getServerStatusResponse"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > ------------ > > If I add the following 4 lines in _initOperationsDesc1() method of the > WebService Stub, then I get the following error . > Error: "Didn't find specified return QName { > http://aaa.ccc.com}getServerStatus!" > > param = new org.apache.axis.description.ParameterDesc(new > javax.xml.namespace.QName( "urn:sampleURN", "serviceStatus" ), > org.apache.axis.description.ParameterDesc. OUT, new > javax.xml.namespace.QName ( "http://bbb.dummycomp.com" , "ServiceStatus" > ), > com.dummycomp.bbb.webservice.ServiceStatus. class , false, false); > oper.addParameter(param); > param = new org.apache.axis.description.ParameterDesc(new > javax.xml.namespace.QName( "urn:sampleURN", "status" ), > org.apache.axis.description.ParameterDesc. OUT, new > javax.xml.namespace.QName ( "http://bbb.dummycomp.com" , "Status" ), > java.lang.String.class , false, false); > oper.addParameter(param); > > ------------------ > > Kindly suggest the solution as soon as possible, as I'm stuck here for > more than a week now. > > Regards, > Rushikesh S. Thakkar > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
