You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Chinthaka THilakarathna <ch...@gmail.com> on 2005/06/20 07:07:46 UTC
[Axis2]Problem with msgContext
Hi All,
i got a problem with msgContext, when i working with a module. pls can
somebody help me to find out whats wrong with that.
ok, this is what I'm going to do.
i used a inflow handler to exact the header blocks from the inflow
soap message and add them to the msgContext as a propety of operation
context.then at the out flow handler i exact that operationContext
propety and then add it to the soap header again with some
modifications.
ah.. but i got some errors.
i try used the following way.
i got the soap header from the msgContext as follows.
SOAPHeader header = msgContext.getEnvelope().getHeader();
it gives null pointer exception when i try to add a header block to the header.
pls can someone explain this.
then i just print the out flow soap message at the OutFlowHandler.
its like follows
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><sample1:echoOk
xmlns:sample1="http://sample1.org/sample1">
</sample1:echoOk></soapenv:Body><soapenv:Header></soapenv:Header></soapenv:Envelope>
u can see the empty header, but after the body.
regards
Chinthaka Thilakarathna
RE: [Axis2]Problem with msgContext
Posted by Eran Chinthaka <ch...@opensource.lk>.
Create a jira for this with a test case.
I will fix this.
-- Eran Chinthaka
> -----Original Message-----
> From: Chinthaka THilakarathna [mailto:chinthakauom@gmail.com]
> Sent: Monday, June 20, 2005 11:08 AM
> To: axis-dev@ws.apache.org
> Subject: [Axis2]Problem with msgContext
>
> Hi All,
>
> i got a problem with msgContext, when i working with a module. pls can
> somebody help me to find out whats wrong with that.
>
> ok, this is what I'm going to do.
>
> i used a inflow handler to exact the header blocks from the inflow
> soap message and add them to the msgContext as a propety of operation
> context.then at the out flow handler i exact that operationContext
> propety and then add it to the soap header again with some
> modifications.
>
> ah.. but i got some errors.
> i try used the following way.
>
> i got the soap header from the msgContext as follows.
>
> SOAPHeader header = msgContext.getEnvelope().getHeader();
>
> it gives null pointer exception when i try to add a header block to the
> header.
> pls can someone explain this.
>
> then i just print the out flow soap message at the OutFlowHandler.
> its like follows
>
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><s
> ample1:echoOk
> xmlns:sample1="http://sample1.org/sample1">
> </sample1:echoOk></soapenv:Body><soapenv:Header></soapenv:Header></soapenv
> :Envelope>
>
>
> u can see the empty header, but after the body.
>
> regards
> Chinthaka Thilakarathna