SOAP Scripted webservice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2016 06:32 AM
I have been trying to create the simple Scripted web service, to use it in Outbound SOAP.
let say for example, if I pass a nodename in request, the reponse should have the text 'Nodename is reachable'
but not able to achieve as I got the below error when try to test from the outbound soap.
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>com.glide.processors.soap.SOAPProcessingException: Insufficient rights to invoke script</faultstring>
<detail>com.glide.processors.soap.SOAPProcessingException: Insufficient rights to invoke script</detail>
</SOAP-ENV:Fault>
but if I use the example scripted webservice 'InstanceInfo' in outbound SOAP, able to test it successfully, got the response without any issues.
not sure what is missing, I assigned all Soap roles to my userid. is it something wrong with the scripted webservice?
can anyone please help me. possible please share the script for scripted webservice.
Thanks,
Chandran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2016 08:16 AM
s = new SOAPMessage('Demo Outbound', 'function_name'); //here you call the outbound SOAP and function
// integration properties
s.setStringParameter('userName', gs.getProperty("BlahBlah"));
s.setStringParameter('password', gs.getProperty("BlahBlah"));
s.setStringParameter('DemoParam1', gs.getProperty("blah"));
s.setStringParameter('DemoParam2', "somevariable");
var response = s.post(true);
this._demofunc("Demotext", response);
_demofunc: function(message, response) {
if (this.requestSucceeded(response)) {
message += ", succeeded";
} else {
var xmlDoc = new XMLDocument(response);
var errorMessage = xmlDoc.getNodeText("//errorMessage");
var faultString = xmlDoc.getNodeText("//faultstring");
if (errorMessage != null) {
message += ", failed (" + errorMessage + ")";
} else if (faultString != null) {
message += ", failed (" + faultString.substring(0, 100) + " ... )";
} else {
message += ", failed." + '\n' + "This Failed Transaction is being retried, please reload your page after 60 seconds for updated information.";
}
return something;
}