Highlighted
Absent Member.. Absent Member..
Absent Member..
10910 views

Attachment and Webservice

Jump to solution

Hi experts,

 

Working on SM7.02.

 

How could I get back information about attachment with the "RetrieveIncident" webservice ? (trying with SoapUI or with my website). I do not know JS.... 😞

 

Is it possible to get the attachment back using webservice out of SM7 ?

 

Thanks.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

Here is the solution :

 

Solution in SoapUI for creating :

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://servicecenter.peregrine.com/PWS" xmlns:com="http://servicecenter.peregrine.com/PWS/Common">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:CreateIncidentRequest attachmentInfo="true" attachmentData="true" ignoreEmptyElements="true">
         <pws:model>
            <pws:keys>
               <pws:IncidentID></pws:IncidentID>
            </pws:keys>
            <pws:instance>
               <pws:IncidentID></pws:IncidentID>
               <pws:severity>3</pws:severity>
               <pws:InitialImpact>3</pws:InitialImpact>
               <pws:Category>International Applications</pws:Category>
               <pws:PrimaryAssignmentGroup>Administration</pws:PrimaryAssignmentGroup>
               <pws:IncidentDescription>
                  <pws:IncidentDescription>Test </pws:IncidentDescription>
               </pws:IncidentDescription>
               <pws:AssigneeName>YOURASSIGNEENAME</pws:AssigneeName>
               <pws:Contact>YOURCONTACTNAME</pws:Contact>
               <pws:BriefDescription>Test Création</pws:BriefDescription>
               <pws:Subcategory>Service Manager</pws:Subcategory>
               <pws:ProductType>User Administration</pws:ProductType>
               <pws:ProblemType>N/A</pws:ProblemType>
        <pws:attachments>
                  <com:attachment href="&lt;UserData.txt>" contentId="" action="add" name="UserData.txt" type="" len="" charset="" attachmentType=""/>
               </pws:attachments>
            </pws:instance>
            <pws:messages>
               <com:message></com:message>
            </pws:messages>
         </pws:model>
      </pws:CreateIncidentRequest>
   </soapenv:Body>
</soapenv:Envelope>

 

As you can see, careful to the attribut "com:attachment" : 

The href should start with &lt; because it the non coded html tag (Ex : href="&lt;UserData.txt>") and finish by the usual tag ">"

 

 

Hope this help someone one day.

 

Best regards

View solution in original post

20 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Attachment and Webservice

Jump to solution

Hi chubaka,

 

Would you like to retrieve attachments from incidents tickets?

 

I guess earlier froum discuss this thing.

 

 

Thanks and regards,

abhijit khewale

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

yes indeed,

 

but none about how I can get the data back outside SM7.

 

For example, I try to get the data from SoapUI. I put the value "true" to attachmentInfo and attachmentData in the RetrieveIncidentRequest.

I've got his in response :

               <attachments>
                  <cmn:attachment href="cid:id4e8dbbec002d704003656d88" len="2870" name="JS_Attach.txt" type="text/plain"/>
               </attachments>

Now, could you explain me which webservices should be invoke to get the data back that I can read it ?

What is the syntax for this ?

 

Thanks for your help

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Attachment and Webservice

Jump to solution

Hi C,

 

You  are trying to get attachments from IncidentManagement wsdl thats is not possible because attachments are stored in file SYSATTACHMENTS.

 

Incidents stores only reference id to that attachments.

 

re,

abhijit

Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

HI,

 

Thanks for your answer.

 

I understood that I could not get data from this wsdl but only information about the attachment.

 

What I try to ask is ; do I need to invoke another wsdl ? If yes, which one ? And if it is not present, should I build a custom one which can allow me to get the data back ? And what will be the parameters for it ?

 

I try to make a new one named Attachments on SYSATTACHMENT table.

 

I have now a new wsdl that I added in SoapUI. Even in that case, I can not get data (or binaries) of the attachment.

I'm a bit lost now and I do not know what to do to get these files attached to an incident.

 

Thanks all for your help

 

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

anyone ?

 

 

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

Solved

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

Here is the solution :

 

Solution in SoapUI for creating :

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://servicecenter.peregrine.com/PWS" xmlns:com="http://servicecenter.peregrine.com/PWS/Common">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:CreateIncidentRequest attachmentInfo="true" attachmentData="true" ignoreEmptyElements="true">
         <pws:model>
            <pws:keys>
               <pws:IncidentID></pws:IncidentID>
            </pws:keys>
            <pws:instance>
               <pws:IncidentID></pws:IncidentID>
               <pws:severity>3</pws:severity>
               <pws:InitialImpact>3</pws:InitialImpact>
               <pws:Category>International Applications</pws:Category>
               <pws:PrimaryAssignmentGroup>Administration</pws:PrimaryAssignmentGroup>
               <pws:IncidentDescription>
                  <pws:IncidentDescription>Test </pws:IncidentDescription>
               </pws:IncidentDescription>
               <pws:AssigneeName>YOURASSIGNEENAME</pws:AssigneeName>
               <pws:Contact>YOURCONTACTNAME</pws:Contact>
               <pws:BriefDescription>Test Création</pws:BriefDescription>
               <pws:Subcategory>Service Manager</pws:Subcategory>
               <pws:ProductType>User Administration</pws:ProductType>
               <pws:ProblemType>N/A</pws:ProblemType>
        <pws:attachments>
                  <com:attachment href="&lt;UserData.txt>" contentId="" action="add" name="UserData.txt" type="" len="" charset="" attachmentType=""/>
               </pws:attachments>
            </pws:instance>
            <pws:messages>
               <com:message></com:message>
            </pws:messages>
         </pws:model>
      </pws:CreateIncidentRequest>
   </soapenv:Body>
</soapenv:Envelope>

 

As you can see, careful to the attribut "com:attachment" : 

The href should start with &lt; because it the non coded html tag (Ex : href="&lt;UserData.txt>") and finish by the usual tag ">"

 

 

Hope this help someone one day.

 

Best regards

View solution in original post

Highlighted
Established Member..
Established Member..

Re: Attachment and Webservice

Jump to solution

Hello Chubaka,

 

The solution is to insert attachment to a Incident via webservice. Is there any way to get the attachement from Service manager using webservice (or using Connect IT).

 

Thanks & Regards,

Madhava

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attachment and Webservice

Jump to solution

Hi

 

 

 

 

 

 

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Attachment and Webservice

Jump to solution
Hi Chubaka,

Thanks for sharing this.

Regards,
abhijit k
0 Likes
Highlighted
Established Member..
Established Member..

Re: Attachment and Webservice

Jump to solution

Hello Chubaka,

 

Thanks for your help.

 

Thanks & Regards,

Madhava

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.