J2ME JSR 172 Web services + byte[]

  • Thread starter Kristian Lier Selnæs
  • Start date
K

Kristian Lier Selnæs

Hi!

I've created a web service which will be consumed using a mobile client (J2ME +
JSR 172). I need to send bytestreams between the client and the server, i.e the
server has the following methods: sendFile(byte[] file) and byte[]
getFile(String filename).

According to the standard, a byte[] should be mapped to base64Binary or
hexBinary in the WSDL. This is indeed the case for my service (its mapped to
base64Binary). However, when I try to generate a stub for the service, using
the stub generator in Sun's Wireless Toolkit, I get the following output:
error: Found unknown simple type: byte[]

Here is a snippet from the WSDL i use:
<complexType name="sendFile">
<sequence>
<element name="sessionID" nillable="true" type="xsd:string"/>
<element name="file" type="xsd:base64Binary"/>
</sequence>
</complexType>
The stub is generated without a problem when I remove the element named "file".
Changing base64Binary to hexBinary produces the same error.

Any explanation will be appreciated!


Regards,
Kristian Selnæs
 
Joined
Jun 26, 2006
Messages
1
Reaction score
0
I am also having same problem, if u have got any solution please post....

Regards
Gaurav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top