users@jax-rpc.java.net

anyType problems

From: Sami Lakka <sami.lakka_at_tut.fi>
Date: Mon, 21 Mar 2005 10:42:53 +0200

JWSDP 1.5 generates SOAPElement for the element Value from the following
WSDL snippet.

 

<s:complexType name="ItemValue">

        <s:sequence>

          <s:element minOccurs="0" maxOccurs="1" name="Value" />


        </s:sequence>

</s:complexType>

 

The problem is that a client sends array of bytes (see below)

 

<Value xsi:type="xsd:anyType">[Ljava.lang.Byte;@19977e3</Value>

 

and because JWSDP has generated SOAPElement I'm unable to cast the value
("[Ljava.lang.Byte;@19977e3")

to Byte- array. This is because SOAPElement naturally gives the value as a
String, not as an object. How can I cast the String value
("[Ljava.lang.Byte;@19977e3") to Byte

array? Should I change the WSDL- declaration and set the type of Value as
anyType?

 

 

Best Regards,

- Sami