How set priority while creating incident via HPSM WebService (618 Views)
Reply
Occasional Contributor
mher
Posts: 4
Registered: ‎03-15-2013
Message 1 of 6 (618 Views)

How set priority while creating incident via HPSM WebService

[ Edited ]

I am trying to create incident by CreateIncident method from HPSM web service.

I am receiving following response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <CreateIncidentResponse message="Validation failed" returnCode="71" schemaRevisionDate="2012-08-30" schemaRevisionLevel="2" status="FAILURE" xsi:schemaLocation="http://schemas.hp.com/SM/7 http://<server>:<port>/SM/7/Incident.xsd" xmlns="http://schemas.hp.com/SM/7" xmlns:cmn="http://schemas.hp.com/SM/7/Common" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <model>
            <keys>
               <IncidentID type="String" xsi:nil="true"/>
            </keys>
            <instance recordid="Sample from SOAPUI" uniquequery="number=NULL">
               <Category type="String">maintanance</Category>
               <OpenTime type="DateTime">2013-03-15T10:00:00+00:00</OpenTime>
...
            </instance>
         </model>
         <messages>
            <cmn:message>Pole Priorytet jest wymagane</cmn:message>
         </messages>
      </CreateIncidentResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 Message means: "Field Priority is mandatory". (I use Polish version of software so I get error messages in Polish).

 

Please help me how to deal with this error.

I have tired putting values in Urgency, UserPriority and Impact fields, but none of them work.

 

Edit:

I don't know is it important, but when using HPSM site via web browser I can create incident. When incident type is incident, maitenance or rma then field Priority is visible and mandatory. When incident type is consultation then field Prioity is not visible.

Please use plain text.
Trusted Contributor
Andy_ABB
Posts: 152
Registered: ‎03-22-2012
Message 2 of 6 (608 Views)

Re: How set priority while creating incident via HPSM WebService

Hi

 

Please post full request you sent throught SOAP UI

 

Best

 

Witam kolejnego polaka :)

Please use plain text.
Occasional Contributor
mher
Posts: 4
Registered: ‎03-15-2013
Message 3 of 6 (606 Views)

Re: How set priority while creating incident via HPSM WebService

My posted request: (some attributes values replaced by dummy strings, company secrecy)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://schemas.hp.com/SM/7" xmlns:com="http://schemas.hp.com/SM/7/Common" xmlns:xm="http://www.w3.org/2005/05/xmlmime">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:CreateIncidentRequest attachmentInfo="False" attachmentData="False" ignoreEmptyElements="true">
         <ns:model query="">
            <ns:keys query="">
               <!--Optional:-->
               <ns:IncidentID type="String" mandatory="" readonly=""></ns:IncidentID>
            </ns:keys>
            <ns:instance query="" uniquequery="" recordid="">
               <!--Optional:-->
               <ns:IncidentID type="String" mandatory="" readonly=""></ns:IncidentID>
               <!--Optional:-->
               <ns:Category type="String" mandatory="" readonly="">maintanance</ns:Category>
               <!--Optional:-->
               <ns:OpenTime type="DateTime" mandatory="" readonly="">2013-03-15T10:00:00+00:00</ns:OpenTime>
               <!--Optional:-->
               <ns:OpenedBy type="String" mandatory="" readonly="">12345</ns:OpenedBy>
               <!--Optional:-->
               <ns:Urgency type="String" mandatory="" readonly=""></ns:Urgency>
               <!--Optional:-->
               <ns:UpdatedTime type="DateTime" mandatory="" readonly=""></ns:UpdatedTime>
               <!--Optional:-->
               <ns:AssignmentGroup type="String" mandatory="" readonly="">Group</ns:AssignmentGroup>
               <!--Optional:-->
               <ns:ClosedTime type="DateTime" mandatory="" readonly="">2013-03-15T10:00:00+00:00</ns:ClosedTime>
               <!--Optional:-->
               <ns:ClosedBy type="String" mandatory="" readonly="">12345</ns:ClosedBy>
               <!--Optional:-->
               <ns:ClosureCode type="String" mandatory="" readonly="">Code</ns:ClosureCode>
               <!--Optional:-->
               <ns:AffectedCI type="String" mandatory="" readonly=""></ns:AffectedCI>
               <!--Optional:-->
               <ns:Description type="Array">
                  <!--Zero or more repetitions:-->
                  <ns:Description type="String" mandatory="" readonly="">Sample from SPOAPUI</ns:Description>
               </ns:Description>
               <!--Optional:-->
               <ns:Solution type="Array">
                  <!--Zero or more repetitions:-->
                  <ns:Solution type="String" mandatory="" readonly=""></ns:Solution>
               </ns:Solution>
               <!--Optional:-->
               <ns:Assignee type="String" mandatory="" readonly="">12345</ns:Assignee>
               <!--Optional:-->
               <ns:Contact type="String" mandatory="" readonly="">12345</ns:Contact>
               <!--Optional:-->
               <ns:JournalUpdates type="Array">
                  <!--Zero or more repetitions:-->
                  <ns:JournalUpdates type="String" mandatory="" readonly=""></ns:JournalUpdates>
               </ns:JournalUpdates>
               <!--Optional:-->
               <ns:AlertStatus type="String" mandatory="" readonly=""></ns:AlertStatus>
               <!--Optional:-->
               <ns:ContactLastName type="String" mandatory="" readonly=""></ns:ContactLastName>
               <!--Optional:-->
               <ns:ContactFirstName type="String" mandatory="" readonly=""></ns:ContactFirstName>
               <!--Optional:-->
               <ns:Company type="String" mandatory="" readonly="">Company</ns:Company>
               <!--Optional:-->
               <ns:Title type="String" mandatory="" readonly="">Sample from SOAPUI</ns:Title>
               <!--Optional:-->
               <ns:TicketOwner type="String" mandatory="" readonly="">mher</ns:TicketOwner>
               <!--Optional:-->
               <ns:UpdatedBy type="String" mandatory="" readonly=""></ns:UpdatedBy>
               <!--Optional:-->
               <ns:Status type="String" mandatory="" readonly="">Closed</ns:Status>
               <!--Optional:-->
               <ns:Area type="String" mandatory="" readonly=""></ns:Area>
               <!--Optional:-->
               <ns:SLAAgreementID type="Decimal" mandatory="" readonly=""></ns:SLAAgreementID>
               <!--Optional:-->
               <ns:SiteCategory type="String" mandatory="" readonly=""></ns:SiteCategory>
               <!--Optional:-->
               <ns:Subarea type="String" mandatory="" readonly=""></ns:Subarea>
               <!--Optional:-->
               <ns:ProblemType type="String" mandatory="" readonly=""></ns:ProblemType>
               <!--Optional:-->
               <ns:ResolutionFixType type="String" mandatory="" readonly=""></ns:ResolutionFixType>
               <!--Optional:-->
               <ns:UserPriority type="String" mandatory="" readonly=""></ns:UserPriority>
               <!--Optional:-->
               <ns:Location type="String" mandatory="" readonly=""></ns:Location>
               <!--Optional:-->
               <ns:explanation type="Array">
                  <!--Zero or more repetitions:-->
                  <ns:explanation type="String" mandatory="" readonly="">Sample explanation</ns:explanation>
               </ns:explanation>
               <!--Optional:-->
               <ns:Impact type="String" mandatory="" readonly=""></ns:Impact>
               <!--Optional:-->
               <ns:folder type="String" mandatory="" readonly=""></ns:folder>
               <!--Optional:-->
               <ns:Service type="String" mandatory="" readonly="">Service</ns:Service>
               <!--Optional:-->
               <ns:attachments>
                  <!--Zero or more repetitions:-->
                  <com:attachment xm:contentType="application" href="" contentId="" action="" name="" type="" len="" charset="" attachmentType=""></com:attachment>
               </ns:attachments>
            </ns:instance>
            <!--Optional:-->
            <ns:messages>
               <!--Zero or more repetitions:-->
               <com:message severity="1" module=""></com:message>
            </ns:messages>
         </ns:model>
      </ns:CreateIncidentRequest>
   </soapenv:Body>
</soapenv:Envelope>

 

Please use plain text.
Trusted Contributor
Andy_ABB
Posts: 152
Registered: ‎03-22-2012
Message 4 of 6 (602 Views)

Re: How set priority while creating incident via HPSM WebService

Hi

 

Please try to fill Impact + Urgency + Severity.

 

BR

Please use plain text.
Occasional Contributor
mher
Posts: 4
Registered: ‎03-15-2013
Message 5 of 6 (597 Views)

Re: How set priority while creating incident via HPSM WebService

I have filled Impact + Urgency + UserPriority (all to value "3") and still have the same failure.

 

Severity is attribute of node com:message and I don't know how can I fill it.

Please use plain text.
Occasional Contributor
mher
Posts: 4
Registered: ‎03-15-2013
Message 6 of 6 (537 Views)

Re: How set priority while creating incident via HPSM WebService

Does anybody knows, how to fix this?
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation