Results 1 to 4 of 4
- 12-22-2011, 12:13 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
SOAPElement addTextNode() with XML content
Hi everybody,
I have a big problem. I've got a requirement here that the XML request for <xmlRequest> element must be actual XML content. The SOAP envelope has this requirement:
When I construct SOAPElement as follows:Java Code:<requestXML>string</requestXML>
and call webservice, I get the following back:Java Code:QName name = new QName("requestXML"); SOAPElement requestXML = bodyElement.addChildElement(name); requestXML.addTextNode("<XML content>");
So it seems that when I pass XML Content into addTextNode() the '<' and '>' tags change into other characters and XML content is not recognized.Java Code:<requestXML><XML content></requestXML> Code="1001">XML request cannot be empty.</Error><
Does anybody know how to pass XML Content into addTextNode() as string and preserve XML Content?
Thank you,
Victor.
- 12-22-2011, 09:33 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Re: SOAPElement addTextNode() with XML content
Find out from the web service exactly what it expects first off.
Then find out what that error means, because I wouldn't expect that sort of error if it was unable to parse the XML.
- 12-23-2011, 04:05 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
Re: SOAPElement addTextNode() with XML content
Thanks for replying but I found a different approach using NetBeans webservices feature. Hopefully this will help others. NetBeans automatically generated WS classes and I could successfully pass XML request as String parameter into webservice operation that NetBeans generated
- 12-23-2011, 09:36 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
mail content are not encoded as per content-transfer- encoding
By Luna Lovegood in forum New To JavaReplies: 1Last Post: 04-19-2011, 08:52 AM -
Content Filtering
By redforce.bala in forum Java ServletReplies: 3Last Post: 10-28-2010, 04:01 PM -
Content type for MS files "content/unknown" with URLConnection
By serjant in forum NetworkingReplies: 2Last Post: 05-30-2009, 10:42 AM -
Can not see the content of the url
By neeraj.singh in forum Java 2DReplies: 0Last Post: 02-17-2009, 01:44 PM -
Two content panes in one GUI?
By Leprechaun in forum New To JavaReplies: 1Last Post: 01-31-2008, 04:02 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks