axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <pzf...@gmail.com>
Subject Re: [axis2] client side : how to get servicegroupid.
Date Thu, 24 May 2007 10:03:10 GMT
If you rename it addressing.jar its no good.

Axis2 has a special classloader for MARs. It must be named .MAR

Also you need to create the stub:
WebServiceWCPStub stub =
                    new WebServiceWCPStub
("http://localhost:8080/axis2/services/WebServiceWCP");

(remove ?wsdl)

Paul

On 5/24/07, Fabrice Airault <fairault@centile.com> wrote:
> hi Paul,
>
> i copy addressing.mar in addressing.jar and i add in my classpath.
>
> in my code i add this line System.out.println(AddressingFaultsHelper.class);
>
> i have my trace ans always exception.
> class org.apache.axis2.addressing.AddressingFaultsHelper
>
> org.apache.axis2.AxisFault: Unable to engage module : addressing
>         at
> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:298)
>         at com.centile.Test.Main.main(Main.java:31)
>
> is my code correct to create a client ?
>
>   WebServiceWCPStub stub =
>                         new WebServiceWCPStub
>
> ("http://localhost:8080/axis2/services/WebServiceWCP?wsdl");
>
>                                 stub._getServiceClient().engageModule(new QName("addressing"));
>                                 stub._getServiceClient().getOptions().setManageSession(true);
>
> stub.test();
>
> Fabrice
>
>
>
> Paul Fremantle a écrit :
> > Have you got addressing.mar in the client's classpath?
> >
> > Paul
> >
> > On 5/24/07, Fabrice Airault <fairault@centile.com> wrote:
> >> Hi Deepal Jayasinghe,
> >>
> >> in client side; i don't know how to engage addressing.
> >> if i add this line :
> >> stub._getServiceClient().engageModule(new QName("addressing"));
> >>
> >> i have an exception :
> >> org.apache.axis2.AxisFault: Unable to engage module : addressing
> >>         at
> >> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:298)
> >>
> >>         at com.centile.Test.Main.main(Main.java:26)
> >>
> >>
> >>
> >> i think it's good on server side because when i send with soapUI:
> >> <soapenv:Envelope
> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> >>     <wsa:Address>
> >>        http://www.w3.org/2005/08/addressing/anonymous
> >>     </wsa:Address>
> >>     <soapenv:Header/>
> >>     <soapenv:Body/>
> >> </soapenv:Envelope>
> >>
> >> Answer is
> >> ----------
> >> <soapenv:Envelope
> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> >> xmlns:wsa="http://www.w3.org/2005/08/addressing">
> >>     <soapenv:Header>
> >>        <wsa:ReplyTo>
> >>
> >> <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
> >>        </wsa:ReplyTo>
> >>   <wsa:MessageID>urn:uuid:D69359D3215FB269AA1179997492819</wsa:MessageID>
> >>
> >> <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
> >>     </soapenv:Header>
> >>     <soapenv:Body>
> >>        <soapenv:Fault>
> >>           <faultcode>soapenv:Client</faultcode>
> >>           <faultstring>com.ctc.wstx.exc.WstxParsingException: Undeclared
> >> namespace prefix "wsa"
> >>   at [row,col {unknown-source}]: [2,16]</faultstring>
> >>           <detail/>
> >>        </soapenv:Fault>
> >>     </soapenv:Body>
> >> </soapenv:Envelope>
> >>
> >>
> >>
> >> How to engage addressing in client ?
> >>
> >>   thanks
> >>
> >> Fabrice
> >>
> >> Deepal Jayasinghe a écrit :
> >> > Hi Fabrice ,
> >> > You need to engage addressing in both client and server side.
> >> >
> >> > Thanks
> >> > Deepal
> >> >> Hi,
> >> >>
> >> >>
> >> >> I create a "Web Service"(axis2-1.1.1) and i want to use SoapSession
> >> >> but I never receive a servicegroupid.
> >> >>
> >> >>
> >> >> i create a Stub (WebServiceWCPStub) with $AXIS2_HOME/bin/wsdl2java.sh
> >> >> and my client is:
> >> >> try{
> >> >>
> >> >> WebServiceWCPStub stub = new
> >> >>
> >> WebServiceWCPStub("http://localhost:8080/axis2/services/WebServiceWCP?wsdl");
> >>
> >> >>
> >> >>
> >> >> stub._getServiceClient().getOptions().setManageSession(true);
> >> >>
> >> >> stub.test();
> >> >> stub.test();
> >> >> stub.test();
> >> >>  } catch(Exception e){
> >> >> e.printStackTrace();
> >> >>  System.out.println("\n\n\n");
> >> >> }
> >> >> }
> >> >>
> >> >>
> >> >> in my Service in axis2 running under tomcat.5.5.23 i have in my
> >> >> services.xml in first line  <service name="WebServiceWCP"
> >> >> scope="SOAPSession">
> >> >>
> >> >>
> >> >> in my log file : logs/catalina.out
> >> >> the first message send to server is :
> >> >> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> >> >>
> >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header
> >> >> /><soapenv:Body><test /></soapenv:Body></soapenv:Envelope>
> >> >>
> >> >> the first message send to client is :
> >> >> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> >> >>
> >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header
> >> >> /><soapenv:Body><ns:testResponse
> >> >>
> >> xmlns:ns="http://wcp.ws.centile.com/xsd"><ns:return>true</ns:return></ns:testResponse></soapenv:Body></soapenv:Envelope>
> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> why i don't receive a servicegroupid ?
> >> >>
> >> >> Thanks
> >> >>
> >> >> Fabrice
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

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


Mime
View raw message