• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling .net Webservice from Java with byte[] param

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem was the timeout. you have to set this like this

 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic