Highlighted
mher Absent Member.
Absent Member.
1769 views

How set priority while creating incident via HPSM WebService

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.

0 Likes
5 Replies
Andy_ABB Absent Member.
Absent Member.

Re: How set priority while creating incident via HPSM WebService

Hi

 

Please post full request you sent throught SOAP UI

 

Best

 

Witam kolejnego polaka 🙂

0 Likes
mher Absent Member.
Absent Member.

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>

 

0 Likes
Andy_ABB Absent Member.
Absent Member.

Re: How set priority while creating incident via HPSM WebService

Hi

 

Please try to fill Impact + Urgency + Severity.

 

BR

0 Likes
mher Absent Member.
Absent Member.

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.

0 Likes
mher Absent Member.
Absent Member.

Re: How set priority while creating incident via HPSM WebService

Does anybody knows, how to fix this?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.