How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Russell H. Your Own Question
Russell H.
Russell H., Electronics and systems professinal
Category: Homework
Satisfied Customers: 10803
Experience:  Educated in electronics and experienced in multiple technologies, I fix things, and also explain them.
Type Your Homework Question Here...
Russell H. is online now
A new question is answered every 9 seconds

Actually I'm doing one integration of HPSM and ServiceNow

Customer Question

Actually I'm doing one integration of HPSM and ServiceNow and stuck with below:-
Requirement is to send update from HPSM to Servicenow.
For this I used ServiceNow WSDL and converted it in HPSM using "wsdlToJS", and attached is the js.
Below is the javascript which I used to invoke soap.
SOAP operation for update ticket is "update" and for create ticket is "insert".
Below script works fine and create ticket in ServiceNow on insert(). But i want to update ticket in servicenow.
but before updating I need to compare the field name(number and sys_id), if it matches then update that ticket. something like below:-
if (number in HPSM == sys_id in Servicenow) then update the matching ticket at servicenow.
Please let me know what changes I need to make in below script.
var updateIncident = new lib.ServiceNow_incident.ServiceNow_incident();
var myRequest = new lib.ServiceNow_incident.insert();
myRequest.description.setValue( "Test from HPSM ok" );
myRequest.short_description.setValue( "Test from HPSM okie " );
myRequest.work_notes.setValue( "Test from HPSM" );
myRequest.category.setValue( "Reset" );
myRequest.assignment_group.setValue( "Austin" );
myRequest.cmdb_ci.setValue( "SASP28BR" );
myRequest.caller_id.setValue( "Zubin Parikh" );
var updateResponse = updateIncident.invoke( myRequest );
if ( updateResponse.isFault() )
print( updateResponse.faultstring.getValue() );
var result = updateResponse.sys_id.getValue();
print("Sys id is "+result);
if ( result.Error.Desc.getValue() != null )
print( result.Error.Desc.getValue() );
print( "That address is in " + result.number.getValue());
catch( e )
print( e.toString() );
Submitted: 1 year ago.
Category: Homework
Customer: replied 1 year ago.
Posted by JustAnswer at customer's request) Hello. I would like to request the following Expert Service(s) from you: Secure Remote Assistance. Let me know if you need more information, or send me the service offer(s) so we can proceed.
Expert:  Russell H. replied 1 year ago.

Hi, thank you for contacting My name is Russell. I will do my best to provide the right answer to your question.

I think you left out (or missed) the closing bracket, or


for the terminating "catch(e)" statement's body.

The Strings are properly concatenated, I think.

The statement about

var updateResponse = updateIncident.invoke( myRequest );
is obscure to me, since I don't know the "updateIncident.invoke()" class/method/whatever.

But I don't see anything overtly wrong with it.

(I regret that I am not able to offer Live Phone Call service at this time; However, your request is still open to other Experts in this category, and one of them may pick up on it at any time.)

Thanks for your patience.

Customer: replied 1 year ago.
below is the main WSDL which is installed. Now the mentioned script is used to invoke "update()" SOAP operation from it. Problem is for update I have to pass SYS_ID and compare it with same field at another tool and then update that same ticket
Expert:  Russell H. replied 1 year ago.

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 1 year ago.
actually I'm not at good in scripting.
But if first invoke and get the sys_id and then again invoke and update ticket with reference to sys_id.
This login can be implemented but can't play with script with limited knowledge. I can share the system where you can see the tool.
The script can be compiled to get any error by the tool just modification needs to be done in the script but don't know the comparison mechanism

Related Homework Questions