cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rduhard <>
Subject Re: CXF return fault when WS-Addressing MAPs are not present?
Date Wed, 27 Jan 2010 22:31:52 GMT

I haven't had a chance to create a sample demonstrating the problem yet but I
did a little bit of digging...

I've found that if you have BOTH the wsa:addressing feature in your Spring
configuration and wsaw:UsingAddressing in your WSDL, it will not work. The
only way i've gotten it to throw the proper soap Fault for not including
MAPs when required is to have it in the WSDL only.

Basically I tracked the problem down to the fact that when setting up the
endpoint, it reads the features section in the configuration and creates a
WSAddressingFeature object for the endpoint.  Then later when reading the
WSDL ( JaxWsEndpointImpl.extractWsdlExtensibilities(EndpointInfo endpoint)
), it reads the addressing requirement from the binding and creates a new
WSAddressingFeature object and sets the "required" attribute accordingly in
the MAPAggregator, however, that new WSAddressingFeature object will get
thrown out since one was already created earlier ( See 
JaxWsEndpointImpl.addAddressingFeature(AbstractFeature a) ) but
unfortunately, this earlier object has no way to specify that addressing is
"required" from the spring config.

Now i'm not sure if these 2 addressing declarations are meant to be mutually
exclusive or not but I would guess not since there's no way in the Spring
configuration to specify "required".  We do have a WSDL first service and I
can leave it as is and remove the Spring configuration addressing feature
out, however, I'm not sure then what that cxf Spring feature definition
actually gives you or what it's purpose truly is.

So I'm not sure if this is a bug in that if you specify addressing in both
places it should combine properties from both into one WSAddressingFeature,
or if this is by design and you are not meant to have both defined within
the same service.   I will work on getting a sample up that will easily
demonstrate the issue as soon as I can but in the meantime I'm hoping this
helps with determining if this is in fact a bug at the very least. 

And regarding the missing MessageID, I believe you're correct in that this
is probably another issue, especially in the case where addressing is
optional but some properties must be present with other properties in cases
where they are sent. I didn't have a chance to look into this at all as I
was only concerned with the case where addressing was required.


rduhard wrote:
> Ok I'll try to whip up a test case and get it posted asap.
> I'm using the latest release 2.2.5 of CXF.
> Thanks!
> dkulp wrote:
>> This SOUND like a bug.   If wsdl:required="true" is there, according to
>> spec, 
>> that implies that the addressing is required.  Please log a bug and
>> attach a 
>> small test case if you can.  (like modify the hello world or something)
>> Actually, you kind of have two bugs.  The "required" bug and the 
>> messageID/ReplyTo thing.
>> BTW:  What version of CXF?     
>> Dan
>> On Thu December 17 2009 8:06:34 pm rduhard wrote:
>>> Is it possible to have CXF reject messages with a Fault automatically
>>> for
>>> endpoints that require Addressing where the request is either missing
>>> them
>>> altogether or missing certain required fields (i.e. missing messageID
>>> when
>>> ReplyTo is present)?
>>> Currently if a client sends a request without MAPs it ignores that fact
>>> and
>>> processes as normal (all i get are warnings in my console) or if there
>>> are
>>> missing elements (i.e. messageID), it eventually faults out on a null
>>> pointer exception when anything tries to process these non-existent
>>> addressing properties.. it seems like CXF should recognize before then
>>> that
>>> certain properties (or all) are missing and fault out before continuing.
>>> I have the following defined in my WSDL:binding
>>> 		<wsaw:UsingAddressing wsdl:required="true" />
>>> and also have the following within my spring endpoint configuration:
>>>                  <jaxws:features>
>>> 			<wsa:addressing/>
>>> 		</jaxws:features>
>>> Is there a way to do this in CXF and I'm maybe missing something or is
>>> this
>>> the expected behaviour?
>>> Thanks,
>>> Rebecca
>> -- 
>> Daniel Kulp

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message