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 George Stanchev <Gs...@serena.com> on 2006/12/20 19:15:35 UTC

serializing/deserializing SOAP message and response

Hi,
 
I have a strange scenario which I am not sure how to implement.
I have 2 parties. Party #1 needs to generate a SOAP message via
axis2 - do the processing, attach security etc. However this
message needs not to be wired - it needs to be serialized into
a sting. Then this string is transmitted via some method (not
of importantance) to party#2. The party#2 needs to take the string 
as it is and call a remote service with the string message as a call
and then to take the response and using similiar mechanism
to package it into string and relay it back to party #1 which
needs to "receive" it using axis2 again. The 2 parties are independent
of each other (separate machines). It is imporant they exchange 
the message/response as SOAP-compliant XML string. The
protocol for that exchange doesn't matter - thats why i need it
reduced to string.
 
The sending should be the easier of both operations though. 
Where I am out of ideas is how to tackle the receiving of a 
local message.
 
I see there is a local trasport in org.apache.axis2.transport.local
but I was unable to find examples for it. Do you think this is what
I need?
 
Any advise/suggestions on how to tackle this problem would
be appreciated.

**********************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


RE: serializing/deserializing SOAP message and response

Posted by George Stanchev <Gs...@serena.com>.
I am sending this, so if someone needs similiar thing in the
future, to have ideas for reference
 
I ended up creating a custom transport based on the local
transport. It reflects back the message as base64 encoded
string. For the response handling, i base64 encode the 
response and set it as options property. In the same local
transport i put together, i check if this property is present
on the options and if so i inject the response in the 
TRANSPORT_IN stream and set it on the context. In this
case the outgoing msg is discarded.
 
If both contexts are the same (and since I control the enviornment
i know they are), this should solve the problem.
 
One has to be carefull with the addressing since its party #2
which actually emits the call.
 
George

________________________________

From: George Stanchev [mailto:Gstanchev@serena.com]
Sent: Wed 12/20/2006 11:15 AM
To: axis-user@ws.apache.org
Subject: serializing/deserializing SOAP message and response



Hi,

 

I have a strange scenario which I am not sure how to implement.

I have 2 parties. Party #1 needs to generate a SOAP message via

axis2 - do the processing, attach security etc. However this

message needs not to be wired - it needs to be serialized into

a sting. Then this string is transmitted via some method (not

of importantance) to party#2. The party#2 needs to take the string 

as it is and call a remote service with the string message as a call

and then to take the response and using similiar mechanism

to package it into string and relay it back to party #1 which

needs to "receive" it using axis2 again. The 2 parties are independent

of each other (separate machines). It is imporant they exchange 

the message/response as SOAP-compliant XML string. The

protocol for that exchange doesn't matter - thats why i need it

reduced to string.

 

The sending  should be the easier of both operations though. 

Where I am out of ideas is how to tackle the receiving of a 

local message.

 

I see there is a local trasport in org.apache.axis2.transport.local

but I was unable to find examples for it. Do you think this is what

I need?

 

Any advise/suggestions on how to tackle this problem would

be appreciated.

**********************************************************************

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.