This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusing SOAPFaultException

 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running a JAX-WS client code like this:



The project compiles and the web service publishes fine, but when I run the client it gives me the error below on the very first assignment: byte[] image = port.getImage("nordic");

SOAPFaultException: javax.xml.ws.soap.SOAPFaultException: java.awt.image.BufferedImage cannot be cast to [B

----

The WSDL looks like this so I'm not sure what's wrong:




How best to debug this type of runtime problem?

Any suggestions appreciated.

Thanks in advance.

Mike
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
You get a class cast exception in your web service, which tries to cast a java.awt.image.BufferedImage to a byte arrray.
Best wishes!
 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duh, but how to fix?

Thanks.

Mike
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Duh, check the server log and see where the exception occurs!
Best wishes!
 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duh, did that.

Seriously, though, thanks for your reply.

Mike

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic