My soap header is as follows

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
<ns2:UserDetail xmlns:ns2="http://test/";>
<fname>Raj</fname><lname>Floyd</lname>
</ns2:UserDetail>
</soap:Header>
...
</soap:Envelope>

The output of header.getObject() looks like the following
[ns2:UserDetail: null]

Is that the correct behavior? I mean why it is showing null?

Thx

Raj




On Tue, Apr 12, 2011 at 1:09 PM, Raj Floyd <[email protected]> wrote:

> Thanks Freeman.
>
>
> On Tue, Apr 12, 2011 at 8:08 AM, Freeman Fang <[email protected]>wrote:
>
>> Hi,
>>
>> Something like
>> SoapMessage message =
>> (SoapMessage)PhaseInterceptorChain.getCurrentMessage();
>> for (Header header : message.getHeaders()) {
>>  //print out the soap headers
>> }
>>
>> Freeman
>>
>> On 2011-4-11, at 下午11:50, Raj Floyd wrote:
>>
>>  Hi,
>>>
>>> Does CXF has any API to display the SOAP headers? I saw
>>> org.apache.cxf.headers package and wondering if that can help. Any
>>> example
>>> would be appreciated. Would like to display headers in the service
>>> method.
>>>
>>> Thx
>>>
>>> Raj
>>>
>>
>> ---------------------------------------------
>> Freeman Fang
>>
>> FuseSource
>> Email:[email protected]
>> Web: fusesource.com
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> Connect at CamelOne May 24-26
>> The Open Source Integration Conference
>>
>>
>>
>>
>>
>>
>>
>>
>>
>

Reply via email to