open(httpMethod, url, async); version of WSRequest does not work as expected
----------------------------------------------------------------------------

                 Key: MASHUP-993
                 URL: https://wso2.org/jira/browse/MASHUP-993
             Project: WSO2 Mashup Server
          Issue Type: Bug
            Reporter: Keith Godwin Chapman
            Assignee: Keith Godwin Chapman


function invokeGetVersion1(){
    var version = new WSRequest();
    var options = new Array();
    options.useSOAP = 1.2;
    options.useWSA = 1.0;
    options.action = 
"http://services.mashup.wso2.org/version/ServiceInterface/getVersionRequest";;
    var payload = null;
    try {
        
version.open("GET","http://localhost:7762/services/system/version/getVersion";, 
false);
        version.send(payload);
        result = version.responseE4X;
    } catch (e) {
        system.log(e.toString(),"error");
        return e.toString();        
    }
    return result;
}

If the above code is tried it fails saying "InternalError: 
INVALID_SYNTAX_EXCEPTION. Cannot have the value of useSOAP true, when the 
HTTPMethod is 'GET' (keith-test#27)". The reason is that useSOAP defaults to 
true.

When the open(httpMethod, url, async); version of WSRequest is used it should 
set useSOAP to false when the HTTPMethod is GET/PUT or DELETE. Also in this 
case it should set the cintentType to application/x-www-form-urlencoded
What should it do for POST?
What should the contentType when the method is POST?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
Mashup-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to