I've created a process that runs a Jasper report via web services using the runReport method and it's working almost fine. The problem is: this SOAP operation outputs the report attached to the message and I'm not able to find it after running the PAM process. I haven't added any information under the MIME attachment section yet, because it asks for the file URL, but I do not have any since I'm calling a web service that will return it to me.
My question is: How to fetch web service attachments via PAM?
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://axis2.ws.jasperserver.jaspersoft.com"> <soapenv:Header/> <soapenv:Body> <axis:runReport soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <requestXmlString xsi:type="xsd:string"> <![CDATA[<request operationName="runReport" locale="en"> <argument name="RUN_OUTPUT_FORMAT">PDF</argument> <resourceDescriptor name="" wsType="" uriString="/organizations/servicemanagement/capability/reports/CA_Service_Desk/Requests/Volume/Active_Request_List" isNew="false"> <label>null</label> </resourceDescriptor> </request> ]]> </requestXmlString> </axis:runReport> </soapenv:Body></soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:runReportResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://axis2.ws.jasperserver.jaspersoft.com"> <runReportReturn xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="UTF-8"?><operationResult version="2.0.1"> <returnCode><![CDATA]]]>><![CDATA[</returnCode></operationResult>]]></runReportReturn> </ns1:runReportResponse> </soapenv:Body></soapenv:Envelope>
Just filled the MIME attachment section as following:
Content Type: "application/pdf"
Content ID: "<report>"
File URL: "jreport.pdf"
But it returns the following error:
"SOAP invocation failed: Unable to resolve protocol"
So you are running a web service call into a CA Service Desk and the results of that web service call are returned as a .pdf file?
There is no mechanism within Process Automation to download and store a PDF file so I do not believe this is going to work without otherwise designing into Process Automation a link to the actual file and use the file operators to move it around.
Here is another discussion on service desk attachments that seems relevant:
Yes and no. I'm running a web service call into Jaspersoft and the result of that call is a .pdf file. Jaspersoft allows me to run a report via web services, but when I do it Jasper returns the report as an attached .pdf file and does not provide any path or link to that file.
The next thing I would do is to upload that file to SDM, but if PAM does not store the web service attachment it won't be possible.
Can you get the report with a call to the Jaspersoft REST API? The REST operators support saving attachments in responses. I have a process that downloads files from Box this way.
Thanks, Bill! Really appreciate your help.