Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes Error when receiving SOAP message from a web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error when receiving SOAP message from a web service" Watch "Error when receiving SOAP message from a web service" New topic
Author

Error when receiving SOAP message from a web service

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 57
Hello,

I have built a JAXWS web service which returns an Object (ResultReport) as result. This class contains a result string and a SOAPMessage.

My webservices executes a method which builds a SOAPMessage. In the web service I have build a test class to verify if everything is OK.

My test class:



My buildReport method:


The result is the expected. The value of the SOAPMessage is written on the console and it is:



However, when I call the buildReport webservice method from a client class, I get an error:



The error happens in the buildReport method when I try to build my SOAPMessage (final SOAPMessage m = (SOAPMessage) TestExport.process(xml);).

For now, it is a simple SOAPMessage. But I am doing this because I want to add an attachment into the SOAPMessage and return it to the client who called the web service.

Thanks for any help
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Have you check the content of the xml which is the input to the method? Can you post that?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error when receiving SOAP message from a web service
 
Similar Threads
java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP
web service - send java List
First JAX-WS webservice results in UnsupportedMediaException
Exception when invoking a Web Service using dispatch
Query regarding SAAJ API