Let's do this , generate code from the WSDL and then implement the skelton as you wish,
Deepal > Deepal Jayasinghe wrote: > >> Hi Anamitra ; >> You are exactly correct , even from the java reflection you can not >> directly get the input parameter names . What we have done is, we read >> byte code and from that get the name of the input parameters, so no way >> that we can get the name of the output parameter. That is why we always >> put return as output parameter. >> >> > > I know this is an old thread, but I need to figure a way around this. I > need to specify the name of the output parameter. > > I'm writing a web service to the clients specification. The SOAP response > needs to be: > <?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> > <GetLoginNameBySessionGUIDResponse xmlns="http://client.net/"> > > <GetLoginNameBySessionGUIDResult>123456</GetLoginNameBySessionGUIDResult> > </GetLoginNameBySessionGUIDResponse> > </soap:Body> > </soap:Envelope> > > But my service is responding with this: > <?xml version='1.0' encoding='utf-8'?> > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Body> > <ns:GetLoginNameBySessionGUIDResponse xmlns:ns="http://client.net/"> > <ns:return>123456</ns:return> > </ns:GetLoginNameBySessionGUIDResponse> > </soapenv:Body> > </soapenv:Envelope> > > How do I change the "return" to "GetLoginNameBySessionGUIDResult"? > > Here is the WSDL used to generate the server stubs: > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:axis2="http://client.net/" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > xmlns:ns1="http://org.apache.axis2/xsd" > xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > xmlns:ns="http://client.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > targetNamespace="http://client.net/"> > <wsdl:documentation>BCAuthenticatorForSSO</wsdl:documentation> > <wsdl:types> > <xs:schema attributeFormDefault="qualified" > elementFormDefault="qualified" targetNamespace="http://client.net/"> > <xs:element name="GetLoginNameBySessionGUID"> > <xs:complexType> > <xs:sequence> > <xs:element minOccurs="0" name="sessionGUID" > nillable="true" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="GetLoginNameBySessionGUIDResponse"> > <xs:complexType> > <xs:sequence> > <xs:element minOccurs="0" > name="GetLoginNameBySessionGUIDResult" nillable="true" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > </wsdl:types> > <wsdl:message name="GetLoginNameBySessionGUIDRequest"> > <wsdl:part name="parameters" > element="ns:GetLoginNameBySessionGUID"/> > </wsdl:message> > <wsdl:message name="GetLoginNameBySessionGUIDResponse"> > <wsdl:part name="parameters" > element="ns:GetLoginNameBySessionGUIDResponse"/> > </wsdl:message> > <wsdl:portType name="BCAuthenticatorForSSOPortType"> > <wsdl:operation name="GetLoginNameBySessionGUID"> > <wsdl:input message="axis2:GetLoginNameBySessionGUIDRequest" > wsaw:Action="urn:GetLoginNameBySessionGUID"/> > <wsdl:output message="axis2:GetLoginNameBySessionGUIDResponse" > wsaw:Action="urn:GetLoginNameBySessionGUIDResponse"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="BCAuthenticatorForSSOSoap11Binding" > type="axis2:BCAuthenticatorForSSOPortType"> > <soap:binding transport="http://schemas.xmlsoap.org/soap/http" > style="document"/> > <wsdl:operation name="GetLoginNameBySessionGUID"> > <soap:operation soapAction="urn:GetLoginNameBySessionGUID" > style="document"/> > <wsdl:input> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:binding name="BCAuthenticatorForSSOSoap12Binding" > type="axis2:BCAuthenticatorForSSOPortType"> > <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" > style="document"/> > <wsdl:operation name="GetLoginNameBySessionGUID"> > <soap12:operation soapAction="urn:GetLoginNameBySessionGUID" > style="document"/> > <wsdl:input> > <soap12:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap12:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:binding name="BCAuthenticatorForSSOHttpBinding" > type="axis2:BCAuthenticatorForSSOPortType"> > <http:binding verb="POST"/> > <wsdl:operation name="GetLoginNameBySessionGUID"> > <http:operation > location="BCAuthenticatorForSSO/GetLoginNameBySessionGUID"/> > <wsdl:input> > <mime:content type="text/xml" > part="GetLoginNameBySessionGUID"/> > </wsdl:input> > <wsdl:output> > <mime:content type="text/xml" > part="GetLoginNameBySessionGUID"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="BCAuthenticatorForSSO"> > <wsdl:port name="BCAuthenticatorForSSOHttpSoap11Endpoint" > binding="axis2:BCAuthenticatorForSSOSoap11Binding"> > <soap:address > location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpSoap11Endpoint/"/> > </wsdl:port> > <wsdl:port name="BCAuthenticatorForSSOHttpSoap12Endpoint" > binding="axis2:BCAuthenticatorForSSOSoap12Binding"> > <soap12:address > location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpSoap12Endpoint/"/> > </wsdl:port> > <wsdl:port name="BCAuthenticatorForSSOHttpEndpoint" > binding="axis2:BCAuthenticatorForSSOHttpBinding"> > <http:address > location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpEndpoint/"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > > Thanks for your help. > > -- Thank you! http://blogs.deepal.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
