I have desinged a web service which will return a list object and a map object..
I could drag the fields from the Data View pallete to the form, which shows the dynamic output.
However, is there any way to save the result in a javascript variable to access them programattically?
Nith
Solved! Go to Solution.
Views
Replies
Total Likes
Here's an example (with WSSE headers).
function callWS(webServiceURL, userEM, passEM, user, pass){
var response = null;
var url = webServiceURL
var wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
var wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
var param = "my input data";
var stringRequest = {
"YOUR_SERVICE_NAMESPACE/:YOUR_SERVICE_METHOD":{
"param" : param,
"user" : user,
"pass" : pass
}
};
var oHeader = { "Security":
{ soapAttributes:
{ xmlns: wsse }, "UsernameToken":
{ soapValue: [ {soapName: "Username", soapAttributes: { "xmlns:wsse": wsse }, soapValue: userEM},
{ soapName: "Password", soapAttributes: {Type:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText", "xmlns:wsse": wsse }, soapValue: passEM },
] } }};
response = SOAP.request({
cURL: url ,
oReqHeader: oHeader,
oRequest: stringRequest ,
cAction: "YOUR_SERVICE_NAMESPACE",
bEncoded: false,
cNamespace: "http://schemas.xmlsoap.org/wsdl/http/",
cResponseStyle: "Message"
});
return response[0].soapValue[0].soapValue
}
Hope this helps
Views
Replies
Total Likes
Here's an example (with WSSE headers).
function callWS(webServiceURL, userEM, passEM, user, pass){
var response = null;
var url = webServiceURL
var wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
var wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
var param = "my input data";
var stringRequest = {
"YOUR_SERVICE_NAMESPACE/:YOUR_SERVICE_METHOD":{
"param" : param,
"user" : user,
"pass" : pass
}
};
var oHeader = { "Security":
{ soapAttributes:
{ xmlns: wsse }, "UsernameToken":
{ soapValue: [ {soapName: "Username", soapAttributes: { "xmlns:wsse": wsse }, soapValue: userEM},
{ soapName: "Password", soapAttributes: {Type:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText", "xmlns:wsse": wsse }, soapValue: passEM },
] } }};
response = SOAP.request({
cURL: url ,
oReqHeader: oHeader,
oRequest: stringRequest ,
cAction: "YOUR_SERVICE_NAMESPACE",
bEncoded: false,
cNamespace: "http://schemas.xmlsoap.org/wsdl/http/",
cResponseStyle: "Message"
});
return response[0].soapValue[0].soapValue
}
Hope this helps
Views
Replies
Total Likes
This is what i want..
many thanks
Nith
Views
Replies
Total Likes
This is what i want..
many thanks
Nith
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies