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 Ramya K Grama <ra...@gmail.com> on 2009/08/12 00:39:27 UTC
Axis2 - session management
Hello,
I'm using Axis2/Java to create a web service wherein the request and
response xmls are very much the same except for some additional data from
the db that gets added on to the request as a response.
Also, there is a lot of CDATA sections in the request that need to be sent
back in the response as is without any modification.
In designing this service, we've come up with the strategy of saving the
incoming SOAP request.xml(in memory) somewhere so that it can be used to
recreate the response + updated data from the db (stuffing in empty tags
with data from db).
Is this a good approach as far as Axis2 is concerned. If so what/how would
be teh best place of storing the request.xml. Are there any multi-threading
issues that i need to be concerned about. What would be a fool-proof and
optimal approach of doing this in Axis2.
>From my initial research, I've found that OperationContext with SOAPSession
scope can be used for this. Am I correct here?
Also, since there are a lot of CDATA sections in the request and response
xmls, is there anything special that needs to be done?
Your feedback will be very helpful in designing my service further.
Thanks,
wsNewbie.
RE: Axis2 - session management
Posted by Martin Gainty <mg...@hotmail.com>.
//so if you setup a messageContext and then set property for each stored attribute
org.apache.axis2.context.MessageContext simpleMsg = new org.apache.axis2.context.MessageContext();
simpleMsg.setProperty("my", "my");
simpleMsg.setProperty("dog", "dog");
simpleMsg.setProperty("has", "has");
simpleMsg.setProperty("fleas", "fleas");
//xml file I/O
java.io.File theFile;
java.lang.String theFilename;
try {
theFile =new java.io.File("pathname/request.xml");
theFilename = theFile.getName();
log.debug(title + "request.xml = [" + theFilename + "]");
}
catch (Exception ex)
{
log.debug(title + "error creating request.xml file = [" + ex.getMessage() + "]");
theFile = null;
}
if (theFile != null)
{
try
{
// setup an output stream to a physical file
java.io.FileOutputStream outStream = new java.io.FileOutputStream(theFile);
// attach a stream capable of writing objects to the
// stream connected to the file
java.io.ObjectOutputStream outObjStream = new java.io.ObjectOutputStream(outStream);
// try to save the message context
log.debug(title + "saving message context....."+simpleMsg.getMessageID());
outObjStream.writeObject(simpleMsg);
// close out the streams
outObjStream.flush();
outObjStream.close();
outStream.flush();
outStream.close();
}
catch (Exception ex)
{
log.debug(title + "error saving message context = [" +
ex.getClass().getName() + " : " + ex.getMessage() + "]");
}
} //end if
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
Date: Wed, 12 Aug 2009 10:05:19 -0400
Subject: Re: Axis2 - session management
From: ramyakgrama@gmail.com
To: axis-user@ws.apache.org
Thanks for ur tip on the CDATA. I'll look into that and come back with any issues I may have.
The other question I have is regarding storing the request xml.
Where and how could that be done?
I read that OperationContext and SOAPSession can be used to achieve this. But I will need some help with the API.
Thanks,
wsnewbie
On Wed, Aug 12, 2009 at 3:32 AM, Andreas Veithen <an...@gmail.com> wrote:
You need to take into account that Axis2 by default doesn't preserve
CDATA sections (and converts them to text nodes). You can use the
approach described in [1] to change this.
Andreas
[1] http://people.apache.org/~veithen/synapse/faq.html
On Wed, Aug 12, 2009 at 00:39, Ramya K Grama<ra...@gmail.com> wrote:
> Hello,
> I'm using Axis2/Java to create a web service wherein the request and
> response xmls are very much the same except for some additional data from
> the db that gets added on to the request as a response.
> Also, there is a lot of CDATA sections in the request that need to be sent
> back in the response as is without any modification.
>
> In designing this service, we've come up with the strategy of saving the
> incoming SOAP request.xml(in memory) somewhere so that it can be used to
> recreate the response + updated data from the db (stuffing in empty tags
> with data from db).
>
> Is this a good approach as far as Axis2 is concerned. If so what/how would
> be teh best place of storing the request.xml. Are there any multi-threading
> issues that i need to be concerned about. What would be a fool-proof and
> optimal approach of doing this in Axis2.
>
> From my initial research, I've found that OperationContext with SOAPSession
> scope can be used for this. Am I correct here?
>
> Also, since there are a lot of CDATA sections in the request and response
> xmls, is there anything special that needs to be done?
>
> Your feedback will be very helpful in designing my service further.
>
> Thanks,
> wsNewbie.
_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
Re: Axis2 - session management
Posted by Andreas Veithen <an...@gmail.com>.
To be honest, I don't really understand the idea behind your approach.
Either there is something missing in your explanation, or your
approach is way too complicated.
Andreas
On Wed, Aug 12, 2009 at 16:05, Ramya K Grama<ra...@gmail.com> wrote:
> Thanks for ur tip on the CDATA. I'll look into that and come back with any
> issues I may have.
> The other question I have is regarding storing the request xml.
> Where and how could that be done?
> I read that OperationContext and SOAPSession can be used to achieve this.
> But I will need some help with the API.
>
>
>
> Thanks,
> wsnewbie
>
> On Wed, Aug 12, 2009 at 3:32 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> You need to take into account that Axis2 by default doesn't preserve
>> CDATA sections (and converts them to text nodes). You can use the
>> approach described in [1] to change this.
>>
>> Andreas
>>
>> [1] http://people.apache.org/~veithen/synapse/faq.html
>>
>> On Wed, Aug 12, 2009 at 00:39, Ramya K Grama<ra...@gmail.com> wrote:
>> > Hello,
>> > I'm using Axis2/Java to create a web service wherein the request and
>> > response xmls are very much the same except for some additional data
>> > from
>> > the db that gets added on to the request as a response.
>> > Also, there is a lot of CDATA sections in the request that need to be
>> > sent
>> > back in the response as is without any modification.
>> >
>> > In designing this service, we've come up with the strategy of saving the
>> > incoming SOAP request.xml(in memory) somewhere so that it can be used to
>> > recreate the response + updated data from the db (stuffing in empty tags
>> > with data from db).
>> >
>> > Is this a good approach as far as Axis2 is concerned. If so what/how
>> > would
>> > be teh best place of storing the request.xml. Are there any
>> > multi-threading
>> > issues that i need to be concerned about. What would be a fool-proof and
>> > optimal approach of doing this in Axis2.
>> >
>> > From my initial research, I've found that OperationContext with
>> > SOAPSession
>> > scope can be used for this. Am I correct here?
>> >
>> > Also, since there are a lot of CDATA sections in the request and
>> > response
>> > xmls, is there anything special that needs to be done?
>> >
>> > Your feedback will be very helpful in designing my service further.
>> >
>> > Thanks,
>> > wsNewbie.
>
>
Re: Axis2 - session management
Posted by Ramya K Grama <ra...@gmail.com>.
Thanks for ur tip on the CDATA. I'll look into that and come back with any
issues I may have.
The other question I have is regarding storing the request xml.
Where and how could that be done?
I read that OperationContext and SOAPSession can be used to achieve this.
But I will need some help with the API.
Thanks,
wsnewbie
On Wed, Aug 12, 2009 at 3:32 AM, Andreas Veithen
<an...@gmail.com>wrote:
> You need to take into account that Axis2 by default doesn't preserve
> CDATA sections (and converts them to text nodes). You can use the
> approach described in [1] to change this.
>
> Andreas
>
> [1] http://people.apache.org/~veithen/synapse/faq.html
>
> On Wed, Aug 12, 2009 at 00:39, Ramya K Grama<ra...@gmail.com> wrote:
> > Hello,
> > I'm using Axis2/Java to create a web service wherein the request and
> > response xmls are very much the same except for some additional data from
> > the db that gets added on to the request as a response.
> > Also, there is a lot of CDATA sections in the request that need to be
> sent
> > back in the response as is without any modification.
> >
> > In designing this service, we've come up with the strategy of saving the
> > incoming SOAP request.xml(in memory) somewhere so that it can be used to
> > recreate the response + updated data from the db (stuffing in empty tags
> > with data from db).
> >
> > Is this a good approach as far as Axis2 is concerned. If so what/how
> would
> > be teh best place of storing the request.xml. Are there any
> multi-threading
> > issues that i need to be concerned about. What would be a fool-proof and
> > optimal approach of doing this in Axis2.
> >
> > From my initial research, I've found that OperationContext with
> SOAPSession
> > scope can be used for this. Am I correct here?
> >
> > Also, since there are a lot of CDATA sections in the request and response
> > xmls, is there anything special that needs to be done?
> >
> > Your feedback will be very helpful in designing my service further.
> >
> > Thanks,
> > wsNewbie.
>
Exception "phase rule has not been specified"
Posted by Makesh Rao <ma...@yahoo.com>.
Hi
Has anyone encountered the following exception ? No change in the axis2.xml.
org.apache.axis2.deployment.DeploymentException:
The following handler exists is not valid: phase rule has not been specified
at
org.apache.axis2.deployment.DescriptionBuilder.processHandler(DescriptionBuilder.java:415)
at org.apache.axis2.deployment.AxisConfigBuilder.processPhaseList(AxisConfigBuilder.java:387)
at
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseOrders(AxisConfigBuilder.java:418)
at
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:130)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:640)
at
org.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:136)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:486)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:406)
at
org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:51)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at
com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
at
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1442)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:304)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:413)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:217)
at
com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
at
com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at
com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
at
com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
at
com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:287)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
at java.lang.Thread.run(Thread.java:571)
[8/12/09 18:15:57:496 EDT] 42d1a0fe SystemOut O
<From MR> org.apache.axis2.deployment.WarBasedAxisConfigurator
[ERROR] java.lang.NullPointerException: loading repository from classpath
Thanks
Makesh
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Sandesha behavior
Posted by Makesh Rao <ma...@yahoo.com>.
Hi
It is my understanding that Sandesha handles the initial RM traffic (create seq) within itself before sending the client payload that was handed over to it by the service.
This is our setup:
Client Side Web Service <---> My Module <---> Sandesha <-----------------------> Sandesha <---> My Module <---> Server Side Web Service
From tutorials I learn that the following 4 steps should happen when engaging Sandesha:
1. CreateSequence/CSR
2. Request 1
3. Request 2/LastMessage
4. TerminateSequence.
However from debug logs I see that only step 1 happens - I do not know why the other steps do not happen. Can someone help?
Here is what happens in our environment as seen from the logs:
(When Sandesha is engaged the message is resubmitted to our "My Module" before it reached the other side. Looks like this is normal.)
1) Client Side [DEBUG] Going Inside OutFlow Handler==<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body /></soapenv:Envelope>
Client Side [DEBUG] Going out of OutFlow Handler==<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"><soapenv:Header><ns:FromURI xmlns:ns="http://company.com">uri:PartnerService.there.com</ns:FromURI><ns:ToURI xmlns:ns="http://company.com">uri:QuotingService.company.com</ns:ToURI><ns:UseSyncCall xmlns:ns="http://company.com">true</ns:UseSyncCall><ns:MEPType xmlns:ns="http://company.com">pull</ns:MEPType><eb:Messaging xmlns:eb="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema-instance http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/ebms-header-3_0-200704.xsd"><eb:SignalMessage><eb:MessageInfo><eb:Timestamp>2009-08-10
15:59:09.552</eb:Timestamp><eb:MessageId>4091413947226243421@PartnerService.There.com</eb:MessageId></eb:MessageInfo><eb:PullRequest/></eb:SignalMessage></eb:Messaging></soapenv:Header><soapenv:Body /></soapenv:Envelope>
2) Client Side [DEBUG] Found WS-RM internal exchange<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><wsrm:CreateSequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><wsrm:AcksTo><wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://192.168.218.1:8090/axis2/services/anonService4/</wsa:Address></wsrm:AcksTo><wsrm:Offer><wsrm:Identifier>MeSHa_Server_Sequrn:uuid:4195DA1895428F41221249945149466</wsrm:Identifier></wsrm:Offer></wsrm:CreateSequence></soapenv:Body></soapenv:Envelope>
Client SideOutFlowHandler [DEBUG] Skipping WS-RM exchange
3) Client Side [DEBUG] Going Inside OutFlow Handler==<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"><soapenv:Header><ns:FromURI xmlns:ns="http://company.com">uri:PartnerService.There.com</ns:FromURI><ns:ToURI xmlns:ns="http://company.com">uri:QuotingService.company.com</ns:ToURI><ns:UseSyncCall xmlns:ns="http://company.com">true</ns:UseSyncCall><ns:MEPType xmlns:ns="http://company.com">pull</ns:MEPType><eb:Messaging xmlns:eb="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema-instance http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/ebms-header-3_0-200704.xsd"><eb:SignalMessage><eb:MessageInfo><eb:Timestamp>2009-08-10
15:59:09.552</eb:Timestamp><eb:MessageId>4091413947226243421@PartnerService.There.com</eb:MessageId></eb:MessageInfo><eb:PullRequest/></eb:SignalMessage></eb:Messaging></soapenv:Header><soapenv:Body /></soapenv:Envelope>
Client SideOutFlowHandler [DEBUG] Going out of OutFlow Handler==<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"><soapenv:Header><ns:FromURI xmlns:ns="http://company.com">uri:PartnerService.There.com</ns:FromURI><ns:ToURI xmlns:ns="http://company.com">uri:QuotingService.company.com</ns:ToURI><ns:UseSyncCall xmlns:ns="http://company.com">true</ns:UseSyncCall><ns:MEPType xmlns:ns="http://company.com">pull</ns:MEPType><eb:Messaging xmlns:eb="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema-instance http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/ebms-header-3_0-200704.xsd"><eb:SignalMessage><eb:MessageInfo><eb:Timestamp>2009-08-10
15:59:09.552</eb:Timestamp><eb:MessageId>4091413947226243421@PartnerService.There.com</eb:MessageId></eb:MessageInfo><eb:PullRequest/></eb:SignalMessage></eb:Messaging><ns:FromURI xmlns:ns="http://company.com">uri:PartnerService.There.com</ns:FromURI><ns:ToURI xmlns:ns="http://company.com">uri:QuotingService.company.com</ns:ToURI><ns:UseSyncCall xmlns:ns="http://company.com">true</ns:UseSyncCall><ns:MEPType xmlns:ns="http://company.com">pull</ns:MEPType></soapenv:Header><soapenv:Body /></soapenv:Envelope>
4) Server Side [DEBUG] Found WS-RM internal exchange<?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://localhost:8080/MeshaRuntime/services/CiscoB2BService</wsa:To><wsa:ReplyTo><wsa:Address>http://192.168.218.1:8090/axis2/services/anonService4/</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:4195DA1895428F41221249945150579</wsa:MessageID><wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</wsa:Action></soapenv:Header><soapenv:Body><wsrm:CreateSequencexmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><wsrm:AcksTo><wsa:Address
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://192.168.218.1:8090/axis2/services/anonService4/</wsa:Address></wsrm:AcksTo><wsrm:Offer><wsrm:Identifier>MeSHa_Server_Sequrn:uuid:4195DA1895428F41221249945149466</wsrm:Identifier></wsrm:Offer></wsrm:CreateSequence></soapenv:Body></soapenv:Envelope>
Server SideInFlowHandler [DEBUG] Skipping WS-RM exchange
5) Server Side [DEBUG] Found WS-RM internal exchange<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><wsrm:CreateSequenceResponse xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><wsrm:Identifier>urn:uuid:6F9CED9F2C0D94BAB41249945151542</wsrm:Identifier><wsrm:Accept><wsrm:AcksTo><wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/MeshaRuntime/services/CiscoB2BService</wsa:Address></wsrm:AcksTo></wsrm:Accept></wsrm:CreateSequenceResponse></soapenv:Body></soapenv:Envelope>
Server SideOutFlowHandler [DEBUG] Skipping WS-RM exchange
6)Client Side [DEBUG] Found WS-RM internal exchange<?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://192.168.218.1:8090/axis2/services/anonService4/</wsa:To><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:6F9CED9F2C0D94BAB41249945151560</wsa:MessageID><wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse</wsa:Action><wsa:RelatesTo>urn:uuid:4195DA1895428F41221249945150579</wsa:RelatesTo></soapenv:Header><soapenv:Body><wsrm:CreateSequenceResponsexmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"><wsrm:Identifier>urn:uuid:6F9CED9F2C0D94BAB41249945151542</wsrm:Identifier><wsrm:Accept><wsrm:AcksTo><wsa:Address
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/MeshaRuntime/services/CiscoB2BService</wsa:Address></wsrm:AcksTo></wsrm:Accept></wsrm:CreateSequenceResponse></soapenv:Body></soapenv:Envelope>
Client SideInFlowHandler [DEBUG] Skipping WS-RM exchange
Thanks
Makesh
Re: Axis2 - session management
Posted by Andreas Veithen <an...@gmail.com>.
You need to take into account that Axis2 by default doesn't preserve
CDATA sections (and converts them to text nodes). You can use the
approach described in [1] to change this.
Andreas
[1] http://people.apache.org/~veithen/synapse/faq.html
On Wed, Aug 12, 2009 at 00:39, Ramya K Grama<ra...@gmail.com> wrote:
> Hello,
> I'm using Axis2/Java to create a web service wherein the request and
> response xmls are very much the same except for some additional data from
> the db that gets added on to the request as a response.
> Also, there is a lot of CDATA sections in the request that need to be sent
> back in the response as is without any modification.
>
> In designing this service, we've come up with the strategy of saving the
> incoming SOAP request.xml(in memory) somewhere so that it can be used to
> recreate the response + updated data from the db (stuffing in empty tags
> with data from db).
>
> Is this a good approach as far as Axis2 is concerned. If so what/how would
> be teh best place of storing the request.xml. Are there any multi-threading
> issues that i need to be concerned about. What would be a fool-proof and
> optimal approach of doing this in Axis2.
>
> From my initial research, I've found that OperationContext with SOAPSession
> scope can be used for this. Am I correct here?
>
> Also, since there are a lot of CDATA sections in the request and response
> xmls, is there anything special that needs to be done?
>
> Your feedback will be very helpful in designing my service further.
>
> Thanks,
> wsNewbie.