It is ok to set this property to JAXB Marshaller to control the namespace prefix.

Currently we use hard code to set properties for JAXB Marshaller , maybe we need more flexible way to configure JAXB Marshaller.(use spring
configuration ? )

-Jim

Benson Margulies wrote:
I see a way to get a grip on this problem via
com.sun.xml.bind.namespacePrefixMapper.

Does CXF want to have a way to communicate one of these to the JAXB
marshaller?

-----Original Message-----
From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 14, 2007 5:07 PM
To: [email protected]
Subject: Are namespace prefixes normative in jaxb?

I've got the following situation. I've used annotations to control all
the namespace prefixes in my service. The wsdl I can pull with ?wsdl
or
java2wsdl has the prefixes I expect. However, responses from my
service
do not use the specified prefix.  Here's an example. Note the use of
'ns1', which is nowhere to be seen in my wsdl.

I appreciate that from a pure XSD perspective I have no cause for
complaint here, but my poor tiny-brained scripted language client
would
really like to avoid having a full XML parser, given that IE before
version 7 was/is namespace-ignorant in the DOM.

The critical question here is whether CXF has any influence over the
behavior of the JAXB RI in this respect.


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Body>
<ns1:echoResponse xmlns:ns1="uri:com.basistech.ws.fortest">
<return>Echo This</return>
</ns1:echoResponse>
</soap:Body>
</soap:Envelope>

Reply via email to