User login

Invoking services that don't require XML Input (An example please)

Forums :

Hi,

I've been trying to follow the AJAX tutorial to invoke a service through Firefox that I had earlier deployed on Mashup Server. This is a simple service in "$MASHUP_HOME/scripts/admin/groceryList.js" whose code is as follows: 

function getList()
{
    var a = new XML();

    a = <order/>;
    var b = <line-item prod="tomato" qty="4"/>;
    var c = <line-item prod="potato" qty="3"/>;
    var d = <line-item prod="onion" qty="6"/>;
    var e = <line-item prod="chilli" qty="40"/>;

    a.appendChild(b);
    a.appendChild(c);
    a.appendChild(d);
    a.appendChild(e);

    return <response>{a}</response>;
}

This service does not require any XML input. How should I invoke it? The user guide (http://wso2.org/projects/wsf/ajax/xpi/0.1/docs/userguide.html) only has the XML In/XML Out example. I tried a few variations on the example code but nothing worked. (The XPI is correctly installed, and I've verified it by running the test code provided in the user guide.)

Regards,

Ganesh

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Please try out the native WSRequest

Hi Ganesh,

 

I'm afraid we havent spend much time lately on the XPI and activex stuff, We have been concentrating on the native WSRequest for the moment. I too tried this out but could not get it to work and I think we might need to do some work on it. Did you try invoking the code using the native WSRequest? (You can even use the stub which in turn uses the native WSRequest). If you are using the native WSRequest directly you can call the service as req.send(null); The native WSRequest is avalable in the mashup server at /js/wso2/WSRequest.js

Please do let us know if you have any concerns with the native WSRequest. Also it looks like you have tried out the 1.0beta release. What do you think of the new UI we've put in? Comments and suggetions are always welcome.

 

Thanks & Regards,

Keith.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.