Hi All,

I am trying to send some payload in a Jaggey WSRequest, according to the
sample in [1]. But this pay load is not received in the carbon admin server
end.

Following is how I am sending the message in the Jaggery App. But message
is null in the action echoString.

Any idea why message is null at the carbon admin service end?


Jaggery Code
--------------------
var ws = require('ws');
var options = new Array();
options.useSOAP = false;
options.action = 'urn:echoString';
options.HTTPMethod = "GET";
options["HTTPHeaders"] = [ { name : "Authorization", value : "Basic
YWRtaW46YWRtaW4="} ];

ws_request.open(options, node.adminServiceURL + "services/
OperationCenterAgentService/echoString", false);

//var test = '<message>ABC</message>';
var test = '<soap:Envelope xmlns:soap="
http://www.w3.org/2003/05/soap-envelope"; xmlns:ser="
http://services.oc.carbon.wso2.org";><soap:Header/>'
                           +
'<soap:Body><ser:echoString><ser:message><![CDATA[<metadata
xmlns="http://org.wso2.carbon.oc.services/agents";><name>ad</
name></metadata>]]></ser:message></ser:echoString>'
                           + '</soap:Body></soap:Envelope>';
ws_request.send(test);
var result = ws_request.responseE4X;
print(result);


Admin Service
---------------------
public String echoString(String message){
        System.out.println("===echoString=== [Message=" + message + "]");
        return message;
}


[1] http://jaggeryjs.org/documentation.jag?api=ws


*Jayanga Dissanayake*
Senior Software Engineer
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
email: jaya...@wso2.com
mobile: +94772207259
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to