[jboss-user] [JBossWS] - @XmlAnyElement and namespace
Ratoo
do-not-reply at jboss.com
Wed Feb 20 11:54:47 EST 2008
Hello all,
I have a problem with XmlAnyElement
@XmlAnyElement(lax = true)
JBoss remove the namespace from my object while marshalling.
I just making an echo service with JDK6 client.
So, client sends:
| <?xml version="1.0" encoding="UTF-8"?>
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
| <S:Body>
| <ns1:MOBY xmlns:ns1="http://www.biomoby.org/moby">
| <ns1:mobyContent>
| <ns1:mobyData ns1:queryID="sip_1">
| <ns1:Simple ns1:articleName="id">
| <ns1:Object ns1:id="1pio" ns1:namespace="PDB"/>
| </ns1:Simple>
| </ns1:mobyData>
| </ns1:mobyContent>
| </ns1:MOBY>
| </S:Body>
| </S:Envelope>
|
JBoss serialize it into the object and sends it back
| @WebResult(name="MOBY", targetNamespace="http://www.biomoby.org/moby")
| public MobyMessage runMyService(@WebParam(name="MOBY", targetNamespace="http://www.biomoby.org/moby", mode = WebParam.Mode.IN) MobyMessage msg)
| {
| return msg;
| }
|
so the marshalled by JBoss message is ALMOST the same
| <?xml version="1.0" encoding="UTF-8"?>
| <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
| <env:Header/>
| <env:Body>
| <ns1:MOBY xmlns:ns1="http://www.biomoby.org/moby">
| <ns1:mobyContent>
| <ns1:mobyData ns1:queryID="sip_1">
| <ns1:Simple ns1:articleName="id">
| <Object ns1:id="1pio" ns1:namespace="PDB" xmlns=""/>
| </ns1:Simple>
| </ns1:mobyData>
| </ns1:mobyContent>
| </ns1:MOBY>
| </env:Body>
| </env:Envelope>
|
except that where I have
| @XmlAnyElement(lax = true)
| Object getObject()
|
it puts EMPTY namespace.
is this a bug? Because SUN JAX-WS implementation marshals it OK.
Thank You,
Ratoo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130863#4130863
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130863
More information about the jboss-user
mailing list