You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by sushant <su...@yahoo.com> on 2008/02/22 12:20:35 UTC

AXIS 2 with WSIF 2.0

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.

Re: AXIS 2 with WSIF 2.0

Posted by sushant <su...@yahoo.com>.
Thanks Philipp.



Philipp Leitner <ph...@gmx.at> wrote: Hi Sushant,

"thus i am trying to find a solution, that is common across."

I wonder how WSIF would help you with that problem? WSIF is based on a 
rather old Axis1 version, which is iirc not exactly an interoperability 
miracle. I think you would be better off using either Axis2, Codehaus 
XFire or Apache CXF as a client for all three service hosts (Jboss, 
Axis2, Oracle). I would recommnd WSIF only if you really need one of the 
distinguising features of WSIF, not if you just want to build a generic 
Web service client. IMHO there are just better alternatives available 
for the standard use cases.

/philipp

sushant schrieb:
> Hi Tobias,
> 
> It is not mandatory for me to use WSIF.
> Its just, i might have web services deployed on Jboss,Axis 2 and oracle 
> app server,
> thus i am trying to find a solution, that is common across.
> 
> Thanks
> Sushant
> 
> 
> */Tobias Anstett /* wrote:
> 
> 
>     Hi Sushant,
> 
> 
>         Can somebody point me to an example of creating web service
>         client with WSIF and the web service is developed for AXIS 2.13
> 
> 
>     As far as i know WSIF is the Web Service Invocation Framework
>     integrated for example in the Rational Application Developer. I
>     think your axis client is configured correctly, but WSIF needs
>     custom serializers / deserializers to map the response or create the
>     request. I have worked with WSIF two years ago and finally switched
>     to axis.
> 
>     Is there any reason why you won't create a client with axis instead
>     of WSIF ?
> 
>     Regards, Tobias
> 
> 
> ------------------------------------------------------------------------
> Meet people who discuss and share your passions. Join them now. 
>  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




 
Sushant 

       
---------------------------------
 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.

Re: AXIS 2 with WSIF 2.0

Posted by Philipp Leitner <ph...@gmx.at>.
Hi Sushant,

"thus i am trying to find a solution, that is common across."

I wonder how WSIF would help you with that problem? WSIF is based on a 
rather old Axis1 version, which is iirc not exactly an interoperability 
miracle. I think you would be better off using either Axis2, Codehaus 
XFire or Apache CXF as a client for all three service hosts (Jboss, 
Axis2, Oracle). I would recommnd WSIF only if you really need one of the 
distinguising features of WSIF, not if you just want to build a generic 
Web service client. IMHO there are just better alternatives available 
for the standard use cases.

/philipp

sushant schrieb:
> Hi Tobias,
> 
> It is not mandatory for me to use WSIF.
> Its just, i might have web services deployed on Jboss,Axis 2 and oracle 
> app server,
> thus i am trying to find a solution, that is common across.
> 
> Thanks
> Sushant
> 
> 
> */Tobias Anstett <to...@googlemail.com>/* wrote:
> 
> 
>     Hi Sushant,
> 
> 
>         Can somebody point me to an example of creating web service
>         client with WSIF and the web service is developed for AXIS 2.13
> 
> 
>     As far as i know WSIF is the Web Service Invocation Framework
>     integrated for example in the Rational Application Developer. I
>     think your axis client is configured correctly, but WSIF needs
>     custom serializers / deserializers to map the response or create the
>     request. I have worked with WSIF two years ago and finally switched
>     to axis.
> 
>     Is there any reason why you won't create a client with axis instead
>     of WSIF ?
> 
>     Regards, Tobias
> 
> 
> ------------------------------------------------------------------------
> Meet people who discuss and share your passions. Join them now. 
> <http://in.rd.yahoo.com/tagline_groups_7/*http://in.promos.yahoo.com/groups> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AXIS 2 with WSIF 2.0

Posted by sushant <su...@yahoo.com>.
Hi Tobias,

It is not mandatory for me to use WSIF.
Its just, i might have web services deployed on Jboss,Axis 2 and oracle app server,
thus i am trying to find a solution, that is common across.

Thanks
Sushant


Tobias Anstett <to...@googlemail.com> wrote: 
Hi Sushant,


Can somebody point me to an example of creating web service client with WSIF and the web service is developed for AXIS 2.13
 
As far as i know WSIF is the Web Service Invocation Framework integrated for example in the Rational Application Developer. I think your axis client is configured correctly, but WSIF needs custom serializers / deserializers to map the response or create the request. I have worked with WSIF two years ago and finally switched to axis.
 
Is there any reason why you won't create a client with axis instead of WSIF ?

Regards, Tobias


 

       
---------------------------------
 Meet people who discuss and share your passions.  Join them now.

Re: AXIS 2 with WSIF 2.0

Posted by Tobias Anstett <to...@googlemail.com>.
Hi Sushant,


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

As far as i know WSIF is the Web Service Invocation Framework integrated for
example in the Rational Application Developer. I think your axis client is
configured correctly, but WSIF needs custom serializers / deserializers to
map the response or create the request. I have worked with WSIF two years
ago and finally switched to axis.

Is there any reason why you won't create a client with axis instead of WSIF
?

Regards, Tobias