File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Confusing SOAPFaultException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Confusing SOAPFaultException" Watch "Confusing SOAPFaultException" New topic
Author

Confusing SOAPFaultException

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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

Joined: Jul 12, 2002
Posts: 1034
Duh, but how to fix?

Thanks.

Mike
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Duh, check the server log and see where the exception occurs!
Best wishes!
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
Duh, did that.

Seriously, though, thanks for your reply.

Mike

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confusing SOAPFaultException
 
Similar Threads
problem with webservice dynamic proxyclient
WSDL file questions
Calculator example
MTOM example
Query regarding RPC/Document Style,WSGEN and WSIMPORT