• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling .net Webservice from Java with byte[] param

 
Markus Jesner
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Markus Jesner
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem was the timeout. you have to set this like this

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic