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 &lt;!CDATA[&lt;command&gt;]]&gt;
. 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 advabce
Chandan
-- 
View this message in context: 
http://old.nabble.com/Setting-CDATA-in-SOAP-message-using-Axis2-client-tp32012559p32012559.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to