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 Fabien Couble <fa...@capgemini.com> on 2006/07/31 12:33:17 UTC

[AXIS2] soap header

Hi all,
I'd like to know if it is possible to have access to the SOAP  header in the implementation of the service (skeleton). Actually, I'd like to get some information. 
If it is not possible, I suppose I have to get this information in a module!!?

Thx 
Fabien

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.

Re: [AXIS2] soap header

Posted by Paul Fremantle <pz...@gmail.com>.
Oh thanks David and Chinthaka.... I'd missed that.

Paul

On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> Paul Fremantle wrote:
> > Fabien
> >
> > If you write your own message receiver then you can get this info, as
> > you are passed the MessageContext. From there you can navigate to the
> > headers.
>
> One more addition. If you use any of the in-built message receiver, then
> again you will have access to the message context.
>
> -- Chinthaka
>
>
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
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


Re: [AXIS2] soap header

Posted by Eran Chinthaka <ch...@opensource.lk>.
Paul Fremantle wrote:
> Fabien
> 
> If you write your own message receiver then you can get this info, as
> you are passed the MessageContext. From there you can navigate to the
> headers.

One more addition. If you use any of the in-built message receiver, then
again you will have access to the message context.

-- Chinthaka


Re: [AXIS2] soap header

Posted by Paul Fremantle <pz...@gmail.com>.
Fabien

If you write your own message receiver then you can get this info, as you
are passed the MessageContext. From there you can navigate to the headers.
In a codegen skeleton I don't think you can (maybe I missed it). You could
also modify the generated MessageReceiver to set it onto the object, but
you'd have to be careful to not regenerate.

Paul

On 7/31/06, Fabien Couble <fa...@capgemini.com> wrote:
>
>  Hi all,
> I'd like to know if it is possible to have access to the SOAP  header in
> the implementation of the service (skeleton). Actually, I'd like to get some
> information.
> If it is not possible, I suppose I have to get this information in a
> module!!?
>
> Thx
> Fabien
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient, you
> are not authorized to read, print, retain, copy, disseminate, distribute, or
> use this message or any part thereof. If you receive this message in error,
> please notify the sender immediately and delete all copies of this message.
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

Re: [AXIS2] soap header

Posted by Paul Fremantle <pz...@gmail.com>.
I would rather it wasn't a switch. I think the code should check (*and
cache*) whether the skeleton implements the right method, and then
call if it does.

It seems to me it should always do it, and if you don't want that then
delete the method from the skeleton.

Paul

On 8/1/06, Ajith Ranabahu <aj...@gmail.com> wrote:
> Hi,
> Great ! I guess this could be a switch for the code generator and as a
> helpful hint the change can be fully implemented by modifying the
> MessageReceiverTemplate,SkeletonTemplate  and the
> SkeletonIntefaceTemplate :)
>
> Ajith
>
> On 7/31/06, Paul Fremantle <pz...@gmail.com> wrote:
> > Chinthaka
> >
> > Sounds like a great idea.
> >
> > Paul
> >
> > On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> > > David Illsley wrote:
> > > > Fabien,
> > > > If you want access to the SOAPHeader, you can get it through the
> > > > MessageContext. You can get this by adding the following method to
> > > > your skeleton (I think this works for all MessageReceivers):
> > > >
> > >
> > > No it doesn't happen for all the message receivers. I think the code gen
> > > templates should be modified to implement the Service interface by the
> > > skeleton and the generated message receiver to invoke the
> > > setOperationContext method.
> > >
> > > What do others think about this?
> > >
> > > (If agreed I'd like to implement this as an exercise to get in to code
> > > gen module :) )
> > >
> > > -- Chinthaka
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> --
> Ajith Ranabahu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

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


Re: [AXIS2] soap header

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
Great ! I guess this could be a switch for the code generator and as a
helpful hint the change can be fully implemented by modifying the
MessageReceiverTemplate,SkeletonTemplate  and the
SkeletonIntefaceTemplate :)

Ajith

On 7/31/06, Paul Fremantle <pz...@gmail.com> wrote:
> Chinthaka
>
> Sounds like a great idea.
>
> Paul
>
> On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> > David Illsley wrote:
> > > Fabien,
> > > If you want access to the SOAPHeader, you can get it through the
> > > MessageContext. You can get this by adding the following method to
> > > your skeleton (I think this works for all MessageReceivers):
> > >
> >
> > No it doesn't happen for all the message receivers. I think the code gen
> > templates should be modified to implement the Service interface by the
> > skeleton and the generated message receiver to invoke the
> > setOperationContext method.
> >
> > What do others think about this?
> >
> > (If agreed I'd like to implement this as an exercise to get in to code
> > gen module :) )
> >
> > -- Chinthaka
> >
> >
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Ajith Ranabahu

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


Re: [AXIS2] soap header

Posted by Paul Fremantle <pz...@gmail.com>.
Chinthaka

Sounds like a great idea.

Paul

On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> David Illsley wrote:
> > Fabien,
> > If you want access to the SOAPHeader, you can get it through the
> > MessageContext. You can get this by adding the following method to
> > your skeleton (I think this works for all MessageReceivers):
> >
>
> No it doesn't happen for all the message receivers. I think the code gen
> templates should be modified to implement the Service interface by the
> skeleton and the generated message receiver to invoke the
> setOperationContext method.
>
> What do others think about this?
>
> (If agreed I'd like to implement this as an exercise to get in to code
> gen module :) )
>
> -- Chinthaka
>
>
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

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


Re: [AXIS2] soap header

Posted by Davanum Srinivas <da...@gmail.com>.
+1 from me Eran

-- dims

On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> David Illsley wrote:
> > Fabien,
> > If you want access to the SOAPHeader, you can get it through the
> > MessageContext. You can get this by adding the following method to
> > your skeleton (I think this works for all MessageReceivers):
> >
>
> No it doesn't happen for all the message receivers. I think the code gen
> templates should be modified to implement the Service interface by the
> skeleton and the generated message receiver to invoke the
> setOperationContext method.
>
> What do others think about this?
>
> (If agreed I'd like to implement this as an exercise to get in to code
> gen module :) )
>
> -- Chinthaka
>
>
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: [AXIS2] soap header

Posted by Davanum Srinivas <da...@gmail.com>.
+1 from me Eran

-- dims

On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> David Illsley wrote:
> > Fabien,
> > If you want access to the SOAPHeader, you can get it through the
> > MessageContext. You can get this by adding the following method to
> > your skeleton (I think this works for all MessageReceivers):
> >
>
> No it doesn't happen for all the message receivers. I think the code gen
> templates should be modified to implement the Service interface by the
> skeleton and the generated message receiver to invoke the
> setOperationContext method.
>
> What do others think about this?
>
> (If agreed I'd like to implement this as an exercise to get in to code
> gen module :) )
>
> -- Chinthaka
>
>
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: [AXIS2] soap header

Posted by Paul Fremantle <pz...@gmail.com>.
Chinthaka

Sounds like a great idea.

Paul

On 7/31/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> David Illsley wrote:
> > Fabien,
> > If you want access to the SOAPHeader, you can get it through the
> > MessageContext. You can get this by adding the following method to
> > your skeleton (I think this works for all MessageReceivers):
> >
>
> No it doesn't happen for all the message receivers. I think the code gen
> templates should be modified to implement the Service interface by the
> skeleton and the generated message receiver to invoke the
> setOperationContext method.
>
> What do others think about this?
>
> (If agreed I'd like to implement this as an exercise to get in to code
> gen module :) )
>
> -- Chinthaka
>
>
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
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


Re: [AXIS2] soap header

Posted by Eran Chinthaka <ch...@opensource.lk>.
David Illsley wrote:
> Fabien,
> If you want access to the SOAPHeader, you can get it through the
> MessageContext. You can get this by adding the following method to
> your skeleton (I think this works for all MessageReceivers):
> 

No it doesn't happen for all the message receivers. I think the code gen
templates should be modified to implement the Service interface by the
skeleton and the generated message receiver to invoke the
setOperationContext method.

What do others think about this?

(If agreed I'd like to implement this as an exercise to get in to code
gen module :) )

-- Chinthaka


Re: [AXIS2] soap header

Posted by Eran Chinthaka <ch...@opensource.lk>.
David Illsley wrote:
> Fabien,
> If you want access to the SOAPHeader, you can get it through the
> MessageContext. You can get this by adding the following method to
> your skeleton (I think this works for all MessageReceivers):
> 

No it doesn't happen for all the message receivers. I think the code gen
templates should be modified to implement the Service interface by the
skeleton and the generated message receiver to invoke the
setOperationContext method.

What do others think about this?

(If agreed I'd like to implement this as an exercise to get in to code
gen module :) )

-- Chinthaka


Re: [AXIS2] soap header

Posted by David Illsley <da...@gmail.com>.
Fabien,
If you want access to the SOAPHeader, you can get it through the
MessageContext. You can get this by adding the following method to
your skeleton (I think this works for all MessageReceivers):

...
    OperationContext _oc;
    public void setOperationContext(OperationContext oc){
        _oc = oc;
    }
...

and then when invoked get the MessageContext using:

MessageContext mc =_oc.getMessageContext("In");

and then get the SOAPEnvelope from mc.

If you are trying to get a WS-Addressing reference parameter (and are
using WS-Addressing 2005/08) you can just call:
_oc.getMessageContext("In").getTo().getAllReferenceParameters().get(qnameOfReferenceParameter);


David

On 31/07/06, Fabien Couble <fa...@capgemini.com> wrote:
>
>
>
> Hi all,
> I'd like to know if it is possible to have access  to the SOAP  header in the implementation of the service (skeleton).  Actually, I'd like to get some information.
> If it is not possible, I suppose I have to get this  information in a module!!?
>
> Thx
> Fabien
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.
>
>



-- 
David Illsley - IBM Web Services Development

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