cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Pell <>
Subject Re: Apache Neethi ExactlyOne and All serialize methods do not include a prefix
Date Wed, 23 Jan 2013 10:00:55 GMT
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 :-)

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.

View raw message