Forums Register Login

calling .net Webservice from Java with byte[] param

+Pie Number of slices to send: Send
Hello,

I've an .net webservice which has a byte[] as parameter in the webmethod.
I've generated classes with java2wsdl (cxf-2.2.12). When I try to call the method with a "simple" byteArray like "xxx".getBytes(), everything will work fine.
But when I try to call the method with a byte[] from a BLOB (database) oder a file (read as byte[]), I'll get response code 400 (bad request) and an exception
in cxf. Also tried to get bytes from a long string (xml message) with .getBytes() .. same error (400) will occur.



I set the maximum bytes for the webservice (in .net) up to 16MB and the files/blob have only 1-5 KB.

I'm not sure where there is a problem? Maybe the length of the byte[]? or some encoding issues?

Any ideas?

Thank you very much,
Markus
+Pie Number of slices to send: Send
The problem was the timeout. you have to set this like this

No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 873 times.
Similar Threads
Parsing BLOB datatype
CXF Problem
getBytes() or getBlob() fails when resultSet is larger than 1
An SQLException has occuredjava.sql.SQLException: Stream has already been closed
Out of Memory error
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:04:47.