File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Setting CDATA in SOAP message using Axis2 client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Setting CDATA in SOAP message using Axis2 client" Watch "Setting CDATA in SOAP message using Axis2 client" New topic
Author

Setting CDATA in SOAP message using Axis2 client

chandan talukdar
Greenhorn

Joined: Feb 02, 2009
Posts: 5
Hi All,

My application has an Axis2 based client which sends requests to a remote server. The SOAP request which is sent from the client side has three parameters, one of which should be a CDATA elemet (the data within the CDATA section is unescaped). But, I am not finding any way, how to put a CDATA section in the SOAP request. If I set the CDATA section as "<![CDATA[<command>]]>", it is converted to <!CDATA[<command>]]> . I am pasting here the following code snippet:

public Long executeCommand(String command) throws Exception {
ExecuteAsynchronousCommand executeAsynchronousCommand = new ProvisioningManagerServiceStub.ExecuteAsynchronousCommand();

executeAsynchronousCommand.setFilename("pm");
executeAsynchronousCommand.setCommand(command);
executeAsynchronousCommand.setToken(token_);

provisioningStub_._getServiceClient().getOptions().setTimeOutInMilliSeconds(40000);

ExecuteAsynchronousCommandResponse execAsyncCmdresp = provisioningStub_.executeAsynchronousCommand(executeAsynchronousCommand);
Long invocationId = (Long) execAsyncCmdresp.getExecuteAsynchronousCommandReturn().getID();
System.out.println("Invocation Id:: "+invocationId );
return invocationId;
}

The "command" parameter above should be wrapped by CDATA.

I would be greatful if anyone can provide me a solution for this.


Thanks in advance
Chandan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting CDATA in SOAP message using Axis2 client
 
Similar Threads
How to create a web wervice in java/Axis2 which should keep publishing data
Getting Client Certificate after SSL Handshake
XML within string parameter to RPC Service
Apache Rampart - Password Callback handler - Get request data
problem with CLOSE_WAIT