Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 12 of 12

Thread: Unable to Approve changes (soapUI or AlarmPoint)

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    22

    Default Unable to Approve changes (soapUI or AlarmPoint)

    We are trying to implement the AlarmPoint to CM integration. Everything else seems to work, but we are not able to get approvals working. In order to remove anything AlarmPoint out of the equation, we are now trying to use soapUI (3.5.1) to do the approval. No matter what, we get the same error:

    A CXmlApiException was raised in native code : error 19 : scxmlapi(19) - Doc Engine call failed with cc -1

    We are on SM app 7.02, server 7.11.257. We are using the ChangeManagment wdsl:

    http://servername:8000/SM/7/ChangeManageMent.wsdl

    In soapUI, under my project, I select ApproveChange. I put in the query for a specific change that my account does have the privs to approve, but I get the error.

    Here is the soap reques and error from the log filet:

    11965(6622889) 07/20/2010 17:57:39 RTE W Exception occurred for method Approve and XML request <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:com="http://schemas.hp.com/SM/7/Common" xmlns:ns="http://schemas.hp.com/SM/7" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xm="http://www.w3.org/2005/05/xmlmime">
    <soapenv:Header/>
    <soapenv:Body>
    <ns:ApproveChangeRequest attachmentData="?" attachmentInfo="?" ignoreEmptyElements="true">
    <ns:model query="?">
    <ns:keys query="header,number=&quot;CC55068&quot;">
    <!--Optional:-->
    <ns:ChangeNumber mandatory="?" readonly="?" type="String">?</ns:ChangeNumber>
    </ns:keys>
    <ns:instance query="?" recordid="?" uniquequery="?">
    <ns:header type="Structure">
    <!--Optional:-->
    <ns:ChangeNumber mandatory="?" readonly="?" type="String">?</ns:ChangeNumber>
    <!--Optional:-->
    <ns:Category mandatory="?" readonly="?" type="String">?</ns:Category>
    </ns:header>
    </ns:instance>
    <!--Optional:-->
    <ns:messages>
    <!--Zero or more repetitions:-->
    <com:message module="?" severity="?">?</com:message>
    </ns:messages>
    </ns:model>
    </ns:ApproveChangeRequest>
    </soapenv:Body>
    </soapenv:Envelope>

    11965(6622889) 07/20/2010 17:57:39 RTE W scxmlapi(19) - Doc Engine call failed with cc -1
    11965(6622889) 07/20/2010 17:57:39 JRTE W Send error response: A CXmlApiException was raised in native code : error 19 : scxmlapi(19) - Doc Engine call failed with cc -1

    Any ideas what's going on?

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    Are there any other messages in the log file, or maybe the msglog file? Have you run a trace to check for any obvious errors?

  3. #3
    Senior Member glg's Avatar
    Join Date
    Aug 2004
    Location
    Chicago, IL, USA
    Posts
    715

    Default

    You need to look at the sm.log file, messages will go there that don't get returned to the SOAP call.

  4. #4
    Junior Member
    Join Date
    Feb 2010
    Posts
    22

    Default

    Quote Originally Posted by glg View Post
    You need to look at the sm.log file, messages will go there that don't get returned to the SOAP call.
    What I included in the original post is from the sm.log file.

    We have run a trace. We're not seeing anything in the log file, with the exception of what's above. I've searched for anything with "RTE E" in the line, and there are none. Nothings jumping out at me, and there's so much info in the log file, that I'm not sure what else to look for.

    Actually, now that's I've trolled through the log again, I see a few "RAD E" messages. It's doing a DBFIND on cm3rcategory, name="?" and coming up with no results. Error message: "RAD E The Category ? does not exist. Record cannot be processed."

    Why is it doing this name=? search in cm3rcategory? I'm not sending a category value. I'm also not sending cm3rcatphase, but that dbfind is working correctly, in that it's searching for the value from the original change. Shouldnt the category come from the change as well?

  5. #5
    Junior Member
    Join Date
    Jul 2010
    Posts
    4

    Default

    I would assume that is coming from the following reference in the SoapUI transaction that you listed in your log:

    <ns:Category mandatory="?" readonly="?" type="String">?</ns:Category>`

    You might try removing the ? that is located between the "type="String">?</ns:Category>"

  6. #6
    Senior Member
    Join Date
    Sep 2008
    Posts
    115

    Default

    Definitely remove all the ? from the soapUI request. Also, if the operator has two change profiles, approving via WS doesn't work apparently, due to it not knowing which one to use. There is a thread on the official forums about it.

  7. #7
    Junior Member
    Join Date
    Feb 2010
    Posts
    22

    Default

    Thank you all for your help. We had to remove all the question marks, plus, we had an older version of the cm.update process. This older process was calling the RAD app, cm.update, which apparently isnt called anymore. Because of this, our webservices call for approvals was first doing the cm.update process (initialization process), then because of this RAD call, it was just ending before it got to the cm.approve process.

    We got an out-of-box 7.02 version of cm.update (which does NOT call the cm.update rad app), and this fixed the problem. We can now approve and deny change requests via emails sent by AlarmPoint.

    Now, this brings up another question, which I hope is ok to just append to this topic:

    Doing these approvals requires authentication in Service Manager (username / password). But... the user is not physically connecting to Service Manager if they are approving their change via this email from AlarmPoint. In order to get around this, our AlarmPoint guy has added two fields to the AP configuration: sm.login and sm.password. This requires that all of our change approvers, any time they change their network password (we're using ldap authentication), they have to then log in to their AP account and update their SM credentials. If they dont, then next time they try to approve a change via the email, it will fail the login. What a pain.

    So, my question: is there some way to tell SM that if the connection is thru webservices, dont require a password?

    As it is, right now, I'm going to see if there's a way to log in with a generic alarmpoint account, then in the extaccess expressions, change the users login/profile info.

    Is there a better way to do this?

  8. #8
    Senior Member
    Join Date
    Sep 2008
    Posts
    115

    Default

    WS requires authentication. I like your approach tho. In the XML request, have a field that has their username in it. Then in extaccess, change the operator() and $lo.ufname variables. It should use the new ones. You *may* need to query the operator table and put it in the $lo.operator variable, but it's unlikely. Do advise if it works tho.

  9. #9
    Junior Member
    Join Date
    May 2008
    Posts
    24

    Default

    My first concern would be security. The sm username and password information help keep the riff raff out. You will also need to add code to build the environment correctly. The login application builds this $L.env variable based on the credentials passed in. However, if those credentials are not correct, then you might not have the appropriate permissions to update the change for example. Also, in Change, the approval groups are stored in the Change Profile so you might not be able to approve correctly.
    Just some thoughts.

  10. #10
    Junior Member
    Join Date
    May 2008
    Posts
    24

    Default

    Oh, and there is an issue approving Changes through Web Services if the operator has multiple Change Profiles. The cm.environment RAD app only checks if you can approve for your first Change Profile and never checks any of the other ones. HP has "Enhancement Request" (bah) QCCR1E56363 opened for this issue.
    I came up with a workaround, but i have only tested it in 7.11. Hit me up if you are interested.

  11. #11
    Junior Member
    Join Date
    Feb 2010
    Posts
    22

    Default

    Thank you all for your input. This project (at least my involvement) has been put on the back burner for now, but I did do some work on this. I was aware of the issue with only having a single Change Profile (or it only using the first). That's a pain, but we were prepared to give anyone who had multiple groups their own profile. This login workaround my get us past that.

    What I've done so far is, in the expressions tab of the extaccess record for cm3r, I've added the following:

    if (operator()="alarmpoint") then (approvals in $L.env=true)
    if (operator()="alarmpoint") then (operator()="BethQ")
    approval.groups in $L.env=jscall("AlarmPointCMGetGroups.getGroups", operator())
    $lo.ufname=jscall("AlarmPointCMGetGroups.getFullNa me", operator())

    In line 2, I've hardcoded my username for now. Ultimately, I'm hoping that the username will be passed from AlarmPoint.

    The next two lines call a javascript I wrote with two functions. The first one runs a query against the cm3groups table, where the operator id is in the approvers array, to get a list of groups (I think this step will actually solve the 1-profile issue). The second function does a query against operator for the full name.

    I was able to test this using soapUI and so far, it's worked. Hopefully, I'll get back to this project soon, so I can continue. Any thoughts or ideas on this would still be greatly appreciated.

  12. #12

    Default

    Hie,

    Apologies if i am misguiding.. But isnt the URL supposed to be the standard one:
    http://localhostort/sc62server/PWS or WS?

    http://localhostort/sc62server/PWS/ChangeManagement.wsdl

    You can also import the AP WSDL in SM Script library using Tailoring Tool : Run WSDL to JS

    I am currently working on AP SM IM integration for Mobile Gateway, once this is done I will also have to pickup CM.

    Instead of hardcording it in the exta record, may be you can call the values using script library and an sync config xml file

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts