Hi,

Can somebody point me to an example of creating web service client with WSIF 
and the web service is developed for AXIS 2.13.

I created a client,

I am getting following exception on server
Exception in thread "HttpConnection-8080-6" java.lang.IllegalStateException: 
Response already committed
        at 
org.apache.axis2.transport.http.server.AxisHttpResponseImpl.assertNotCommitted(AxisHttpResponseImpl.java:75)
        at 
org.apache.axis2.transport.http.server.AxisHttpResponseImpl.sendError(AxisHttpResponseImpl.java:110)
        at 
org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:291)
        at 
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:166)
        at 
org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:85)
        at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)

And following exception on client

java.lang.IllegalArgumentException: No Deserializer found to deserialize a 
'http://example.ws:getDisplayNameResponse' using encoding style 'literal'.
    at 
org.apache.soap.util.xml.XMLJavaMappingRegistry.queryDeserializer(XMLJavaMappingRegistry.java:206)
    at 
org.apache.wsif.providers.soap.apachesoap.WSIFOperation_ApacheSOAP.invokeRequestResponseOperationDocument(Unknown
 Source)
    at 
org.apache.wsif.providers.soap.apachesoap.WSIFOperation_ApacheSOAP.executeRequestResponseOperation(Unknown
 Source)
    at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
    at $Proxy0.getDisplayName(Unknown Source)
    at ws.example.DisplayNameClient.consumeFromWSIF(DisplayNameClient.java:35)
    at ws.example.DisplayNameClient.main(DisplayNameClient.java:15)

Here is the WSDL

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:ns0="http://example.ws"; 
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:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
targetNamespace="http://example.ws";>
    <wsdl:types>
        <xs:schema xmlns:xsd="http://example.ws"; 
attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://example.ws";>
    <xs:element name="getDisplayNameResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" name="return" nillable="true" 
type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
    </wsdl:types>
    <wsdl:message name="getDisplayNameRequest"/>
    <wsdl:message name="getDisplayNameResponse">
        <wsdl:part name="parameters" element="ns0:getDisplayNameResponse"/>
    </wsdl:message>
    <wsdl:portType name="DisplayNamePortType">
        <wsdl:operation name="getDisplayName">
            <wsdl:input message="ns0:getDisplayNameRequest" 
wsaw:Action="urn:getDisplayName"/>
            <wsdl:output message="ns0:getDisplayNameResponse" 
wsaw:Action="urn:getDisplayNameResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DisplayNameSOAP11Binding" 
type="ns0:DisplayNamePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="getDisplayName">
            <soap:operation soapAction="urn:getDisplayName" 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="DisplayNameSOAP12Binding" 
type="ns0:DisplayNamePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="getDisplayName">
            <soap12:operation soapAction="urn:getDisplayName" 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="DisplayNameHttpBinding" type="ns0:DisplayNamePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="getDisplayName">
            <http:operation location="DisplayName/getDisplayName"/>
            <wsdl:input>
                <mime:content type="text/xml" part="getDisplayName"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="getDisplayName"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DisplayName">
        <wsdl:port name="DisplayNameSOAP11port_http" 
binding="ns0:DisplayNameSOAP11Binding">
            <soap:address 
location="http://localhost:8080/axis2/services/DisplayName"/>
        </wsdl:port>
        <wsdl:port name="DisplayNameSOAP12port_http" 
binding="ns0:DisplayNameSOAP12Binding">
            <soap12:address 
location="http://localhost:8080/axis2/services/DisplayName"/>
        </wsdl:port>
        <wsdl:port name="DisplayNameHttpport" 
binding="ns0:DisplayNameHttpBinding">
            <http:address 
location="http://localhost:8080/axis2/services/DisplayName"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


Thanks
Sushant

       
---------------------------------
 Why delete messages? Unlimited storage is just a click away.

Reply via email to