You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Peter Liljenberg <pl...@gmail.com> on 2009/01/23 10:32:37 UTC

Bug in ReadHeadersInterceptor?

We tried to use soapheaders by adding a HeaderProcessor. When looking at the
CXF code (2.1.2) we find this:

  HeaderProcessor p = bus.getExtension(HeaderManager.class)
                                .getHeaderProcessor(hel.getNamespaceURI());

 Object obj;
DataBinding dataBinding = null;
if (p == null || p.getDataBinding() == null) {
  obj = node;
} else {
   obj = p.getDataBinding().createReader(Node.class).read(node);
}
//TODO - add the interceptors
SoapHeader shead = new SoapHeader(new
QName(node.getNamespaceURI(),node.getLocalName()), obj, dataBinding);

This looks like a bug to me.

Should the dataBinding that is extraced be used when constructing the
SoapHeader instead of ALWAYS be null. I'm just guessing but shouldn't it
look like this:

} else {
   dataBinding = p.getDataBinding();
   obj = dataBinding.createReader(Node.class).read(node);
}
This might be fixed in later version already, or there might even exist an
issue for this?

/Peter
-- 
View this message in context: http://www.nabble.com/Bug-in-ReadHeadersInterceptor--tp21621240p21621240.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: Bug in ReadHeadersInterceptor?

Posted by Peter Liljenberg <pl...@gmail.com>.
Ok, I've created  https://issues.apache.org/jira/browse/CXF-2000 issue-2000 
for you to look at when you can find the time.
Since I'm no expert on Soap and stuff I've very little competence to
contribute to CXF and fixing the errors I might find. We do use the CXF
framework though, so it would be nice to give something back. I will have to
read up on the SOAP specs :)

/Peter



Ulhas Bhole-3 wrote:
> 
> I indeed is worng. Please raise a jira and someone will surely take a 
> look. (probably me but need to find some time.)
> 
> -- Ulhas
> Peter Liljenberg wrote:
>> We tried to use soapheaders by adding a HeaderProcessor. When looking at
>> the
>> CXF code (2.1.2) we find this:
>>
>>   HeaderProcessor p = bus.getExtension(HeaderManager.class)
>>                                
>> .getHeaderProcessor(hel.getNamespaceURI());
>>
>>  Object obj;
>> DataBinding dataBinding = null;
>> if (p == null || p.getDataBinding() == null) {
>>   obj = node;
>> } else {
>>    obj = p.getDataBinding().createReader(Node.class).read(node);
>> }
>> //TODO - add the interceptors
>> SoapHeader shead = new SoapHeader(new
>> QName(node.getNamespaceURI(),node.getLocalName()), obj, dataBinding);
>>
>> This looks like a bug to me.
>>
>> Should the dataBinding that is extraced be used when constructing the
>> SoapHeader instead of ALWAYS be null. I'm just guessing but shouldn't it
>> look like this:
>>
>> } else {
>>    dataBinding = p.getDataBinding();
>>    obj = dataBinding.createReader(Node.class).read(node);
>> }
>> This might be fixed in later version already, or there might even exist
>> an
>> issue for this?
>>
>> /Peter
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Bug-in-ReadHeadersInterceptor--tp21621240p21623544.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: Bug in ReadHeadersInterceptor?

Posted by Ulhas Bhole <ul...@progress.com>.
I indeed is worng. Please raise a jira and someone will surely take a 
look. (probably me but need to find some time.)

-- Ulhas
Peter Liljenberg wrote:
> We tried to use soapheaders by adding a HeaderProcessor. When looking at the
> CXF code (2.1.2) we find this:
>
>   HeaderProcessor p = bus.getExtension(HeaderManager.class)
>                                 .getHeaderProcessor(hel.getNamespaceURI());
>
>  Object obj;
> DataBinding dataBinding = null;
> if (p == null || p.getDataBinding() == null) {
>   obj = node;
> } else {
>    obj = p.getDataBinding().createReader(Node.class).read(node);
> }
> //TODO - add the interceptors
> SoapHeader shead = new SoapHeader(new
> QName(node.getNamespaceURI(),node.getLocalName()), obj, dataBinding);
>
> This looks like a bug to me.
>
> Should the dataBinding that is extraced be used when constructing the
> SoapHeader instead of ALWAYS be null. I'm just guessing but shouldn't it
> look like this:
>
> } else {
>    dataBinding = p.getDataBinding();
>    obj = dataBinding.createReader(Node.class).read(node);
> }
> This might be fixed in later version already, or there might even exist an
> issue for this?
>
> /Peter
>