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 Igor Nogueira <ig...@gmail.com> on 2008/09/21 21:25:41 UTC

SOAPSession error

Hello guys, I'm trying to use soapsession scope to test a service. I've
already engaged the addressing module, but I just can't access the service's
operations. I've got the following message on log:

[WARN] triggerActionNotSupportedFault: messageContext: [MessageContext:
logID=urn:uuid:99B68224CFE1AABF211222024829486] problemAction:
urn:anonOutonlyOpResponse
[ERROR] The [action] cannot be processed at the receiver.
org.apache.axis2.AxisFault: The [action] cannot be processed at the
receiver.
    at
org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:373)
    at
org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupportedFault(AddressingFaultsHelper.java:336)
    at
org.apache.axis2.handlers.addressing.AddressingValidationHandler.checkAction(AddressingValidationHandler.java:149)
    at
org.apache.axis2.handlers.addressing.AddressingValidationHandler.invoke(AddressingValidationHandler.java:55)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
    at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)


What's goino on?

Thanks in advance!

Igor Nogueira

Re: SOAPSession error

Posted by Igor Nogueira <ig...@gmail.com>.
Sorry, I've sent the answer form my classmate's mail...We are trying to
implement a passive replication schema in stateful webservices. We´re trying
to use the soapsession in order to serialize it and recover it on another
server to keep replica's state up-to-date.


Thanks!

2008/9/21 Tina Silva <wh...@gmail.com>

> Hi Charitha,
>
> First of all thanks for answering!  I did what you said:
>
>  ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> ("D:\\axis2-1.4.1\\repository", null);
>  ServiceClient client = new ServiceClient(ctx,null);
>  client.engageModule("addressing");
>  Options opts = new Options();
> opts.setManageSession(true);...
>
>
> It really doesn't report that client is "Unable to engage
> module:addressing" . But I still can't access
> the session content in a different invocation. That's my situation: I have
> a .jsp with 3 methods.
> testCreate - Creates a List element on the ServiceContext callse
> "ShoppingCart";
> testAdd - Adds an element in "ShoppingCart";
> testList - List  "ShoppingCart"'s  content;
>
> I call the methods exactly on this order. testCreat works well, but I get a
> nullexception when I call testAdd and testList, because I just can´t recover
> ShoppingCart in a different invoke. My Soap Envelopes are just like this:
>
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="
> http://www.w3.org/2005/08/addressing"><wsa:To>
> http://127.0.0.1:8080/axis2/services/ShoppingCart
> </wsa:To><wsa:ReplyTo><wsa:Address>
> http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:F3FEEC679D471BCF2E1222048040000</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
> xmlns:ns1="http://ws.apache.org/axis2"
> /></soapenv:Body></soapenv:Envelope>
>
> There's no groupid tag, is it right?
>
> Thanks again!
>
> 2008/9/21 charitha kankanamge <ch...@wso2.com>
>
> Hi Igor,
>>
>> Igor Nogueira wrote:
>>
>>  To engage addressing on client side I've copied the
>>> "addressing-1.4.1.mar" to Tomcat's lib folder. Is it ok?
>>>
>>
>> Client should report "Unable to engage module:addressing"  error if
>> addressing module is not found. In order to engage addressing at client
>> side, create a configurationContext and use it when instantiating
>> ServiceClient or stub as follows.
>> ConfigurationContext ctx =
>> ConfigurationContextFactory.createConfigurationContextFromFileSystem(\home\user\axis2-client\repository,
>> null);
>> SoapSessionServiceStub stub = new SoapSessionServiceStub(ctx);
>>
>> addressing-1.4.1.mar can be placed at the modules directory of
>> \home\user\axis2-client\repository.
>>
>>
>>> Thanks, Igor
>>> 2008/9/21 Igor Nogueira <igornogueirasantos@gmail.com <mailto:
>>> igornogueirasantos@gmail.com>>
>>>
>>>    Hey all,
>>>
>>>    Forget about my last doubt! I was setting the options object
>>>    wrongly. But now I've got another error. As I said, I'm using
>>>    soapsession as scope but I can´t live in the same session
>>>    throughout different invocations. I'm trying to test the
>>>    ShoppingCart example. I've deployed the service as soapsession,
>>>    engaged the adressing mudule to the client and set the
>>>    ManageSession flag true. Is there something missing? Here's an
>>>    example of a soap envelope the client is composing:
>>>
>>>    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
>>>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>>> "><soapenv:Header
>>>    xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>
>>> http://127.0.0.1:8080/axis2/services/ShoppingCart
>>> </wsa:To><wsa:ReplyTo><wsa:Address>
>>> http://www.w3.org/2005/08/addressing/none
>>> </wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:57AA5B8A82899D9AAD1222038876428</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
>>>    xmlns:ns1="http://ws.apache.org/axis2"
>>>    /></soapenv:Body></soapenv:Envelope>
>>>
>>>
>>>    There isn´t a servicegroupid tag. Is that the reason why I can´t
>>>    live in the same session?
>>>    If so, is there something else to do?
>>>
>>>    Best regards,
>>>
>>>    Igor Nogueira
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG. Version: 7.5.524 / Virus Database: 270.7.0/1682 - Release
>>> Date: 9/20/2008 10:24 AM
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>

Re: SOAPSession error

Posted by Tina Silva <wh...@gmail.com>.
Hi Charitha,

First of all thanks for answering!  I did what you said:

 ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem
("D:\\axis2-1.4.1\\repository", null);
 ServiceClient client = new ServiceClient(ctx,null);
 client.engageModule("addressing");
 Options opts = new Options();
opts.setManageSession(true);...


It really doesn't report that client is "Unable to engage module:addressing"
. But I still can't access
the session content in a different invocation. That's my situation: I have a
.jsp with 3 methods.
testCreate - Creates a List element on the ServiceContext callse
"ShoppingCart";
testAdd - Adds an element in "ShoppingCart";
testList - List  "ShoppingCart"'s  content;

I call the methods exactly on this order. testCreat works well, but I get a
nullexception when I call testAdd and testList, because I just can´t recover
ShoppingCart in a different invoke. My Soap Envelopes are just like this:

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="
http://www.w3.org/2005/08/addressing"><wsa:To>
http://127.0.0.1:8080/axis2/services/ShoppingCart
</wsa:To><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:F3FEEC679D471BCF2E1222048040000</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
xmlns:ns1="http://ws.apache.org/axis2" /></soapenv:Body></soapenv:Envelope>

There's no groupid tag, is it right?

Thanks again!

2008/9/21 charitha kankanamge <ch...@wso2.com>

> Hi Igor,
>
> Igor Nogueira wrote:
>
>  To engage addressing on client side I've copied the "addressing-1.4.1.mar"
>> to Tomcat's lib folder. Is it ok?
>>
>
> Client should report "Unable to engage module:addressing"  error if
> addressing module is not found. In order to engage addressing at client
> side, create a configurationContext and use it when instantiating
> ServiceClient or stub as follows.
> ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(\home\user\axis2-client\repository,
> null);
> SoapSessionServiceStub stub = new SoapSessionServiceStub(ctx);
>
> addressing-1.4.1.mar can be placed at the modules directory of
> \home\user\axis2-client\repository.
>
>
>> Thanks, Igor
>> 2008/9/21 Igor Nogueira <igornogueirasantos@gmail.com <mailto:
>> igornogueirasantos@gmail.com>>
>>
>>    Hey all,
>>
>>    Forget about my last doubt! I was setting the options object
>>    wrongly. But now I've got another error. As I said, I'm using
>>    soapsession as scope but I can´t live in the same session
>>    throughout different invocations. I'm trying to test the
>>    ShoppingCart example. I've deployed the service as soapsession,
>>    engaged the adressing mudule to the client and set the
>>    ManageSession flag true. Is there something missing? Here's an
>>    example of a soap envelope the client is composing:
>>
>>    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
>>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>> "><soapenv:Header
>>    xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>
>> http://127.0.0.1:8080/axis2/services/ShoppingCart
>> </wsa:To><wsa:ReplyTo><wsa:Address>
>> http://www.w3.org/2005/08/addressing/none
>> </wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:57AA5B8A82899D9AAD1222038876428</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
>>    xmlns:ns1="http://ws.apache.org/axis2"
>>    /></soapenv:Body></soapenv:Envelope>
>>
>>
>>    There isn´t a servicegroupid tag. Is that the reason why I can´t
>>    live in the same session?
>>    If so, is there something else to do?
>>
>>    Best regards,
>>
>>    Igor Nogueira
>>
>>
>> ------------------------------------------------------------------------
>>
>> No virus found in this incoming message.
>> Checked by AVG. Version: 7.5.524 / Virus Database: 270.7.0/1682 - Release
>> Date: 9/20/2008 10:24 AM
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: SOAPSession error

Posted by Igor Nogueira <ig...@gmail.com>.
Hi Charitha! Thanks again! I found out the error. The first invocation I was
doing to the service was a "fireAndForget" so, as the service didn´t reply
to this invocation, the servicegroupid wasn't being sent.  I changed the
service implementation, now everything is ok.

Best regards,

Igor Nogueira Santos

Re: SOAPSession error

Posted by charitha kankanamge <ch...@wso2.com>.
Igor Nogueira wrote:

> Charita, to engage it on the server side, I just need to add this tag 
> <module ref="addressing"/> on the axis2.xml, isn't?

In this way addressing is engaged globally.  You can engage addressing 
at service level by adding <module ref="addressing"/> in services.xml. 
Also, in order to enable soapsession you need to have scope attribute as 
follows.
<service name = "myservice" scope ="soapsession">

> I still can't recover session state from one invoke to another.
>
> That´s a clent side envelope:
>
>  <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header 
> xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://127.0.0.1:8080/axis2/services/ShoppingCart</wsa:To><wsa:MessageID>urn:uuid:79E6715443849740D21222111363367</wsa:MessageID><wsa:Action>urn:addItem</wsa:Action></soapenv:Header><soapenv:Body><ns1:addItem 
> xmlns:ns1="http://ws.apache.org/axis2">Testando!!!</ns1:addItem></soapenv:Body></soapenv:Envelope>
>
> That´s a server side one:
>
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown</faultstring><detail 
> /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
>
> Thanks, and sorry me for the insistence :-)
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG. 
>Version: 7.5.524 / Virus Database: 270.7.0/1682 - Release Date: 9/20/2008 10:24 AM
>  
>


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


Re: SOAPSession error

Posted by Igor Nogueira <ig...@gmail.com>.
Charita, to engage it on the server side, I just need to add this tag
<module ref="addressing"/> on the axis2.xml, isn't?
I still can't recover session state from one invoke to another.

That´s a clent side envelope:

 <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="
http://www.w3.org/2005/08/addressing"><wsa:To>
http://127.0.0.1:8080/axis2/services/ShoppingCart</wsa:To><wsa:MessageID>urn:uuid:79E6715443849740D21222111363367</wsa:MessageID><wsa:Action>urn:addItem</wsa:Action></soapenv:Header><soapenv:Body><ns1:addItem
xmlns:ns1="http://ws.apache.org/axis2
">Testando!!!</ns1:addItem></soapenv:Body></soapenv:Envelope>

That´s a server side one:

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Thanks, and sorry me for the insistence :-)

Re: SOAPSession error

Posted by charitha kankanamge <ch...@wso2.com>.
Hi Igor,

Igor Nogueira wrote:

> To engage addressing on client side I've copied the 
> "addressing-1.4.1.mar" to Tomcat's lib folder. Is it ok?

Client should report "Unable to engage module:addressing"  error if 
addressing module is not found. In order to engage addressing at client 
side, create a configurationContext and use it when instantiating 
ServiceClient or stub as follows.
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(\home\user\axis2-client\repository, 
null);
SoapSessionServiceStub stub = new SoapSessionServiceStub(ctx);

addressing-1.4.1.mar can be placed at the modules directory of 
\home\user\axis2-client\repository.

>
> Thanks, Igor
> 2008/9/21 Igor Nogueira <igornogueirasantos@gmail.com 
> <ma...@gmail.com>>
>
>     Hey all,
>
>     Forget about my last doubt! I was setting the options object
>     wrongly. But now I've got another error. As I said, I'm using
>     soapsession as scope but I can´t live in the same session
>     throughout different invocations. I'm trying to test the
>     ShoppingCart example. I've deployed the service as soapsession,
>     engaged the adressing mudule to the client and set the
>     ManageSession flag true. Is there something missing? Here's an
>     example of a soap envelope the client is composing:
>
>     <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
>     xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
>     xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://127.0.0.1:8080/axis2/services/ShoppingCart</wsa:To><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:57AA5B8A82899D9AAD1222038876428</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
>     xmlns:ns1="http://ws.apache.org/axis2"
>     /></soapenv:Body></soapenv:Envelope>
>
>
>     There isn´t a servicegroupid tag. Is that the reason why I can´t
>     live in the same session?
>     If so, is there something else to do?
>
>     Best regards,
>
>     Igor Nogueira
>
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG. 
>Version: 7.5.524 / Virus Database: 270.7.0/1682 - Release Date: 9/20/2008 10:24 AM
>  
>


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


Re: SOAPSession error

Posted by Igor Nogueira <ig...@gmail.com>.
To engage addressing on client side I've copied the "addressing-1.4.1.mar"
to Tomcat's lib folder. Is it ok?

Thanks, Igor
2008/9/21 Igor Nogueira <ig...@gmail.com>

> Hey all,
>
> Forget about my last doubt! I was setting the options object wrongly. But
> now I've got another error. As I said, I'm using soapsession as scope but I
> can´t live in the same session throughout different invocations. I'm
> trying to test the ShoppingCart example. I've deployed the service as
> soapsession, engaged the adressing mudule to the client and set the
> ManageSession flag true. Is there something missing? Here's an example of a
> soap envelope the client is composing:
>
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="
> http://www.w3.org/2005/08/addressing"><wsa:To>
> http://127.0.0.1:8080/axis2/services/ShoppingCart
> </wsa:To><wsa:ReplyTo><wsa:Address>
> http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:57AA5B8A82899D9AAD1222038876428</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
> xmlns:ns1="http://ws.apache.org/axis2"
> /></soapenv:Body></soapenv:Envelope>
>
>
> There isn´t a servicegroupid tag. Is that the reason why I can´t live in
> the same session?
> If so, is there something else to do?
>
> Best regards,
>
> Igor Nogueira
>

Re: SOAPSession error

Posted by Igor Nogueira <ig...@gmail.com>.
Hey all,

Forget about my last doubt! I was setting the options object wrongly. But
now I've got another error. As I said, I'm using soapsession as scope but I
can´t live in the same session throughout different invocations. I'm trying
to test the ShoppingCart example. I've deployed the service as soapsession,
engaged the adressing mudule to the client and set the ManageSession flag
true. Is there something missing? Here's an example of a soap envelope the
client is composing:

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="
http://www.w3.org/2005/08/addressing"><wsa:To>
http://127.0.0.1:8080/axis2/services/ShoppingCart
</wsa:To><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:57AA5B8A82899D9AAD1222038876428</wsa:MessageID><wsa:Action>urn:createSession</wsa:Action></soapenv:Header><soapenv:Body><ns1:createSession
xmlns:ns1="http://ws.apache.org/axis2" /></soapenv:Body></soapenv:Envelope>


There isn´t a servicegroupid tag. Is that the reason why I can´t live in the
same session?
If so, is there something else to do?

Best regards,

Igor Nogueira