Hi Iroshan,

Can you give full error trace (/log)?
Here[1,2] are references for WSRequest

[1]
http://madhukaudantha.blogspot.com/2013/02/invoke-web-service-with-jaggery-with.html
[2] http://jaggeryjs.org/apidocs/ws.jag


On Thu, Jan 9, 2014 at 11:15 AM, Iroshan Wickramarathna <iros...@wso2.com>wrote:

> Hi all,
>
> I'm trying to invoke a data service using a simple jaggery app. When I
> invoke a operation which doesn't give any result. it gives an error.
>
> Ex. trying to invoke a insert drink operation
>
>       function invokeinsertDrink() {
>         var log = new Log();
>         var ws = require("ws");
>
>      var CSDS = new ws.WSRequest();
>      var options = new Array();
>      options.useSOAP = 1.2;
>      options.action = "urn:insert_drink_operation";
>      var payload =' <p:insert_drink_operation xmlns:p="
> http://ws.wso2.org/dataservice";><xs:id xmlns:xs="
> http://ws.wso2.org/dataservice";>3</xs:id><xs:name xmlns:xs="
> http://ws.wso2.org/dataservice";>cococola</xs:name> <xs:cost xmlns:xs="
> http://ws.wso2.org/dataservice";>50</xs:cost></p:insert_drink_operation>';
>
>     var result;
>
>      try {
>          CSDS.open(options,"
> https://10.100.4.53:9443/services/CofeeShopService/";, false);
>          CSDS.send(payload);
>          result = CSDS;
>      } catch (e) {
>          log.error(e.toString());
>          return e.toString();
>     }
>      return result.responseText;
>
> }
>     print(invokeinsertDrink());
>
>
> }
>
>
>
> Even though data has been added to the data base properly it gives
> following error.
>
>  JavaException: org.jaggeryjs.scriptengine.exceptions.ScriptException:
> Error occured while invoking the service
>
> how can I handle this error?
>
> --
> Thanx.
> Ujitha Iroshan
>
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Madhuka* Udantha
Senior Software Engineer
Development Technologies
WSO2 Inc. : http://wso2.com

*Mobile*: +94774066336
*Blog*: http://madhukaudantha.blogspot.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to