A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Webservices with Axis 1.3
Joined: Oct 04, 2006
Oct 05, 2006 00:22:00
Currently I am working with Axis 1.3 to deploy webservices.My webservice has got 3 methods
I am facing problem when the Soap request format is similar to the one below.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><
In the above Soaprequest the contents under <sObjects> tag should be treated as a
. Is there any way to solve this problem?
Any help would be greatly appreciated
Joined: Apr 17, 2006
Oct 05, 2006 03:06:00
You can pass XML content to be not parsed and hence be treated as string text by demarcating that XML content as a CDATA section in your SOAP message.
<sObjects> <![CDATA[<sampletag>testvalue</sampletag>]]> </sObjects>
And you can add a CDATA section to your XML document (programmatically) using the DOM 2.0 API as:
// Create a new Document object with a root element named example. Document xmlDoc = domImpl.createDocument(null,"example",null); Element root = xmlDoc.getDocumentElement(); // Create a new CDATASection with the XML document as its content. String cdataContent = "<sampletag>testvalue</sampletag>"; [B]CDATASection cdata = xmlDoc.createCDATASection(cdataContent);[/B] root.appendChild(cdata);
I am not sure if this is what you were looking for?
SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)
Joined: Oct 04, 2006
Oct 05, 2006 23:40:00
If I am going to pass the Soap request like the one below
then my request format would change right.
But my request format should be similar to something like
<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
Is there any way to proceed with this aspect? I couldn't figure out the issue happening here.
I agree. Here's the link:
subject: Webservices with Axis 1.3
Server.userException: Exception while executing Client
WAS v6.1 + WS-Security
XML in Payload, fault returned.
SAXException in response
SOAP over TCP
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014