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 Robert Gombotz <ro...@gmail.com> on 2005/03/20 23:49:19 UTC

SOAP message content in the service implementation

Hi.


This is more of a general question I am afraid. 
I would need to have access to some parts of my SOAP message in the
service implementation. More precise, I am sending some info to a WS A
in SOAP headers. This service A in turn makes a call to another WS B(
in doing so WS A is acting as a client/consumer). Now I would like to
include the information, which WS A received in the form of SOAP
headers, to the message that WS A sends to WS B.
I am aware of handlers being able to process messages, but is it
possible to get a hold of the message inside the WS implementation? I
am pretty sure that it is not possible with Axis. After all, the
implementation of the WS would only be working when used as a WS.
So if I am right and it is not possible, does anybody know of other
SOAP enabled application servers that allow you to do something like
that?
Or any hints as to how I could alter the Axis code so that it migh be
possible (I know, that would be a mission and and half, anyway.)


Thanks in advance

Rob

Re: SOAP message content in the service implementation

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
It might be best to treat WS A as a "message-style"  service (that receives
a SOAPEnvelope as argument and returns a SOAPEnvelope or SOAPElement, see
the user guide), but if you can't do this for some reason, you can still use
the MessageContext.

org.apache.axis.MessageContext.getMessageContext(), which gives access to
all parts of the request and response.
Jeff

----- Original Message ----- 
From: "Robert Gombotz" <ro...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Sunday, March 20, 2005 2:49 PM
Subject: SOAP message content in the service implementation


> Hi.
>
>
> This is more of a general question I am afraid.
> I would need to have access to some parts of my SOAP message in the
> service implementation. More precise, I am sending some info to a WS A
> in SOAP headers. This service A in turn makes a call to another WS B(
> in doing so WS A is acting as a client/consumer). Now I would like to
> include the information, which WS A received in the form of SOAP
> headers, to the message that WS A sends to WS B.
> I am aware of handlers being able to process messages, but is it
> possible to get a hold of the message inside the WS implementation? I
> am pretty sure that it is not possible with Axis. After all, the
> implementation of the WS would only be working when used as a WS.
> So if I am right and it is not possible, does anybody know of other
> SOAP enabled application servers that allow you to do something like
> that?
> Or any hints as to how I could alter the Axis code so that it migh be
> possible (I know, that would be a mission and and half, anyway.)
>
>
> Thanks in advance
>
> Rob