Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalArgumentException while creating SOAP message

 
Krithi Raghu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peer. It is working now...
I made the following changes in my code...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic