Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Webservices with Axis 1.3

 
Amutha Ramesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Currently I am working with Axis 1.3 to deploy webservices.My webservice has got 3 methods
* login
* create
* query
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><test xmlns="urn:WithoutTag"><sObjects><sampletag>testvalue</sampletag></sObjects></test></soapenv:Body></soapenv:Envelope>

In the above Soaprequest the contents under <sObjects> tag should be treated as a string. Is there any way to solve this problem?

Any help would be greatly appreciated
 
Watsh Rajneesh
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


And you can add a CDATA section to your XML document (programmatically) using the DOM 2.0 API as:



I am not sure if this is what you were looking for?
 
Amutha Ramesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Rajneesh.

If I am going to pass the Soap request like the one below

<sObjects><![CDATA[<sampletag>testvalue</sampletag>]]></sObjects>

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\">
<soapenv:Body>
<test xmlns=\"urn:WithoutTag\">
<sObjects>
<Accountname>testname</Accountname>
</sObjects>
</test>
</soapenv:Body>
</soapenv:Envelope>

My client invoking the webservice is thru javascript.
Is there any way to proceed with this aspect? I couldn't figure out the issue happening here.

With Regards,
Amutha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic