This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Webservices with Axis 1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservices with Axis 1.3 " Watch "Webservices with Axis 1.3 " New topic
Author

Webservices with Axis 1.3

Amutha Ramesh
Greenhorn

Joined: Oct 04, 2006
Posts: 6
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

Joined: Apr 17, 2006
Posts: 110
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?


SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)
Amutha Ramesh
Greenhorn

Joined: Oct 04, 2006
Posts: 6
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Webservices with Axis 1.3
 
Similar Threads
SAXException in response
Server.userException: Exception while executing Client
XML in Payload, fault returned.
SOAP over TCP
WAS v6.1 + WS-Security