aspose file tools*
The moose likes Web Services and the fly likes IllegalArgumentException while creating SOAP message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "IllegalArgumentException while creating SOAP message" Watch "IllegalArgumentException while creating SOAP message" New topic
Author

IllegalArgumentException while creating SOAP message

Krithi Raghu
Greenhorn

Joined: Jan 15, 2008
Posts: 23
Hi,

I have an input xml file and am trying to convert this to a SOAP message. For this I am using the following code

But I get an error during runtime.

I could not make out what exactly is going wrong in this. Could someone please help me out?
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
IF the order.xml is the entire SOAP envelope (message) then this example shows you how to do it - you would have to adapt your FileInpuStream to a StreamSource.

IF however order.xml only contains the content for the SOAP body then you have to read it in as an org.w3c.dom.Document and then set the SOAPBody as described here.
[ May 07, 2008: Message edited by: Peer Reynders ]
Krithi Raghu
Greenhorn

Joined: Jan 15, 2008
Posts: 23
Thanks Peer. It is working now...
I made the following changes in my code...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IllegalArgumentException while creating SOAP message