cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Apache Neethi ExactlyOne and All serialize methods do not include a prefix
Date Thu, 24 Jan 2013 16:09:36 GMT

On Jan 23, 2013, at 5:00 AM, Jason Pell <> wrote:

> I have opened a jira around this issue - 4774.
> My solution is not to try and fix the neethi issue, but instead to
> work around it.  I am planning to cache the Policy Element in the
> PolicyAttachment class which simplifies the code in
> anyway and avoids
> reserialising the Policy file for the WSDL.
> I am still looking to see if its possible to more tightly integrate
> the external attachments stuff in so that the service model gets the
> ws policy stuff included as part of loading the external attachments.
> So unless anyone has an issue with caching the Element object in
> PolicyAttachment I don't have to worry about trying to fix
> ExactlyOne or All classes in Neethi, which seeing as its been over a
> year since a release of neethi (at least so far as maven repo is
> concerned) thats a good thing :-)

I wouldn't worry about the Neethi release schedule.   It's something we can easily influence.
  There just haven't been any issues logged at NEETHI and all issues are resolved for a year
so no need for a release:


> On Wed, Jan 23, 2013 at 6:15 PM, Jason Pell <> wrote:
>> Hi,
>> I have an issue with latest CXF when serialising a Policy.  The
>> <ExactlyOne> and <All> tags do not include the prefix.  I believe this
>> is causing my jaxws:client to fail when pointing at the WSDL.
>> This only happens when using policy attachments
>> <wsp:Policy xmlns:wsu=""
>> xmlns:wsp=""
>> wsu:Id="UsernameToken"><ExactlyOne><All><sp:SupportingTokens
>> xmlns:sp=""><wsp:Policy
>> xmlns:wsp=""><sp:UsernameToken
>> xmlns:sp=""
>> sp:IncludeToken=""><wsp:Policy><sp:WssUsernameToken10/></wsp:Policy></sp:UsernameToken></wsp:Policy></sp:SupportingTokens></All></ExactlyOne></wsp:Policy>
>> The code in cxf is using W3CDOMStreamWriter and in the ExactlyOne and
>> All classes calling the
>> writer.writeStartElement(namespace,Constants.ELEM_EXACTLYONE);
>> But it does this when the prefix is NOT null.  This seems wrong to me.
>> The classes involved are:
>> org.apache.neethi.ExactlyOne
>> org.apache.neethi.All
>> I think these classes should actually be calling:
>> writer.writeStartElement(prefix, Constants.ELEM_EXACTLYONE, namespace);
>> Basically same as PolicyReference
>> Can someone with familiarity with Neethi help me here please.
>> I have downloaded the neethi trunk and am going to make the changes in
>> my local and see if it fixes my own problem, but I was hoping for some
>> additional assistance with the problem.

Daniel Kulp -
Talend Community Coder -

View raw message