users@jax-rpc.java.net

RE: Bug when binding to SOAPElement

From: Kevin Jones <kevinj_at_develop.com>
Date: Mon, 24 Nov 2003 18:20:42 -0000

Looking at the code inside the generated Tie it does this:

javax.xml.soap.SOAPElement = null;
Object mySOAPElementObj = state.getRequest().getBody().getValue();


Breaking these steps down:

State.getRequest gives me a request from which I can call getMessage.
This gives me the input message which is fine (it looks like the one I
posted in the original email).

Request.getBody().getValue() gives me the 'value' of the 'body' of the
message and this is the thing that has the bug. It looks like the
namespace prefix is being transposed incorrectly inside this code. Can
anybody confirm this?

Thanks,

Kevin Jones
http://kevinj.develop.com

> -----Original Message-----
> From: Kevin Jones [mailto:kevinj_at_develop.com]
> Sent: 23 November 2003 11:21
> To: users_at_jax-rpc.dev.java.net
> Subject: Bug when binding to SOAPElement
>
>
> I have a schema that looks like this
>
> <complexType name="AuthorOrISBNType">
> <choice>
> <sequence>
> <element name="author" type="string" nillable="true"/>
> <element name="title" type="string" nillable="true"/>
> </sequence>
> <element name="isbn" type="string"/>
> </choice>
> </complexType>
>
> <element name="getBookPrice" type="tns:AuthorOrISBNType"/>
>
> The wsdl has the appropriate bits referencing the element.
>
> My generated method looks like
>
> public javax.xml.soap.SOAPElement
> getBookPrice(javax.xml.soap.SOAPElement parameters);
>
> And the SOAP I send looks like
>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns0="urn:com-develop-ejws-data:types">
> <env:Body>
> <ns0:getBookPrice xmlns:b="urn:com-develop-ejws-data:types">
> <isbn>111-222</isbn>
> </ns0:getBookPrice>
> </env:Body>
> </env:Envelope>
>
> However in the getBooksPrice method I see this
>
> <ns:getBookPrice xmlns:b="urn:com-develop-ejws-data:types"
> xmlns:ns0="urn:com-develop-ejws-data:types"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <isbn>111-222</isbn>
> </ns:getBookPrice>
>
> Notice that getBookPrice is in 'ns' and not 'ns0' or 'b' and
> 'ns' is not bound to a namespace.
>
> getBookPrice doesn't have a parent so the ns prefix isn't bound there.
>
> This is in JWSDP 1.3.
>
> Am I missing something obvious?
>
>
> Kevin Jones
> http://kevinj.develop.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net