I am new to worklight and using http adapter for posting xml to webservices so that i can get the result.But I am not able to do that it is giving some error. My code is in adapter.js
function getStories(interest) {
path = getPath(interest);
var input = {
method : 'post',
returnedContentType : 'xml',
path : path
parameters : '<HOME><REQUEST><USERID>701692</USERID><SECURE_KEY>B6F86B1B11E9EAFC</SECURE_KEY><EMPLOYEE_ID>000000000000035B</REQUEST></HOME>'
};
return WL.Server.invokeHttp(input);
}
It is giving output like this
{ "errors": [ "Premature end of file.", "Failed to parse the payload from backend (procedure: HttpRequest)" ], "info": [ ], "isSuccessful": false,
"responseHeaders": { "Cache-Control": "private", "Content-Length": "0", "Date": "Mon, 15 Oct 2012 10:29:01 GMT", "Server": "Microsoft-IIS/6.0", "X-AspNet-Version": "2.0.50727", "X-Powered-By": "ASP.NET" }, "statusCode": 200, "statusReason": "OK", "warnings": [ ] }
I want to have this code (given below ) to be implemented in worklight , how can i do that.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<form name="f1" id="fi" action="http://mydoman.aspx" method="post">
<input TYPE="hidden" name="xml" value="<HOME><REQUEST><USERID>701692</USERID><SECURE_KEY>B6F86B1B11E9EAFC17F5844EE9B16669</SECURE_KEY></REQUEST></HOME>"/>
<input type="submit" value="submit"/>
</form>
</BODY>
</HTML>