Calling a web service through HPSM

I am trying to integrate HP Service Manager with external vendor application. When a ticket is created / modified, I would like to call the external webservice passing some of the HP Service Manager attributes to create tickets into that external tool. The vendor has already exposed the WSDL file.
Is there a documentation / forum link on how this can be accomplished. Please let me know as soon as possible as this is kind of urgent for me.

I have tried using the link: RUNtoJS. . A javascript file with all the methods has been generated. Please let me know what needs to be done next.
(1) How should i call to the web service now? Do i need to write code to consume the web service.
(2) If i write code to consume the web service, when should my code be triggered?
(3) At present, I just have the HPSM installed, would I need the code of HPSM as well to call the web service?

PLEASE HELP as I need to do this on urgent basis.
  • Hi,

    You need to write your own Java script code in Script Library to call the generated Java Scripts of webserives.

    And then call this java script when you want to create the record in external system.

    You may take the reference from the attached pdf file from sample demo code to consume the java script.
  • Hi Manish,

    Thanks for sharing such a wonderful PDF, i was also exploring web services in SM and able to generate tickets through cmd prompt.

    This PDF was good to understand forward.


    Kindly assign him good points.

    Thanks for sharing once again.

    Thanks and regards,

  • In short answer of your questions are :

    1) Yes you need to write a JS to call the script you have from WSDLtoJS.

    2)You can trigger in different ways scheduling the script can be one of those or i think in your case you can have a trigger to call the JS so that same action can be performed at the external tool.
  • Hi Manish,

    I tried to generate JS for this wsdl



    But it gives the following error:


    Error calling method: doHttpRequest in class:com/hp/ov/sm/server/utility/HttpClient Exception ( connect timed out)
    WSDL request failed with exception Error calling method: doHttpRequest in class:com/hp/ov/sm/server/utility/HttpClient Exception (
    n: connect timed out)


    Any idea on this?

  • Dear all, 

    I faced a problem when consuming webservice of ITSM.

    When I use .Net webservice Studio or SOAPUI to retrieve Incident, I get this message: "Fault string, and possibly fault code, not set".

    I used ITSM 9.21 , my wsdl URL: (It works)

    Can any one help me.

    Thank you so much.

  • Here is the entire message in .Net Webservice Studio:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapHeaderException: Fault string, and possibly fault code, not set
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at IncidentManagement.RetrieveIncidentKeysList(RetrieveIncidentKeysListRequest RetrieveIncidentKeysListRequest)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at WebServiceStudio.MainForm.InvokeWebMethod()
    at WebServiceStudio.MainForm.buttonInvoke_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  • Hi,

    what is the error your are facing when trying to debug in SOAPUI?

    Thanks and regards,
  • Hj, thanks for your reply:)

    When I used SoapUI, I got the response like this:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">
    <faultstring>Fault string, and possibly fault code, not set</faultstring>




  • Hello Manish,

    I fond this post very helpful for my requirement.

    In my case, I need to call external web service having it's URL starting with HTTPS instead of regular http. 

    I tried calling the web service however i am getting certification exception as mentioned below.

    "Error calling method: doHttpRequest in class: com/hp/ov/sm/server/utility/HttpClient Exception (
    cateException: No subject alternative names present)"

    I need your suggestion to fix this issue. To call external web service from HPSM, i believe i need to import ssl certificate of that portal in HPSM but I don't know how and where to import and which parameters I need to set in sm.ini to validate the external certificate and consume response successfully.



  • Same probelm  i have face when calling HTTPs