Hello,
I am creating a process in workbench which will take a logged in users id, call a web service to get account information, and then prefill and render a form based on the resultant data. The webservice is an external SOAP webservice, and I am unsure of how to specify a variable as an input to the SOAP request in the process design or how to map the data returned in the soap message into an XML document to use for prefilling the form.
I saw this link, but am still looking for more insight: http://kb2.adobe.com/cps/499/cpsid_49980.html
Matthew
Solved! Go to Solution.
Views
Replies
Total Likes
Matthew,
I put together a sample that calls a public Web Service, maps the data from the SOAP response to a process variable of type 'xml' and renders a PDF using the xml.
I found public Web Services at http://wiki.cdyne.com/wiki/index.php?title=CDYNE_Weather which exposes WSDL at http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl and choose the operation GetCityWeatherByZIP. The operation takes a input string of ZIP code and produces the SOAP response, below.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<GetCityWeatherByZIPResponse xmlns="http://ws.cdyne.com/WeatherWS/">
<GetCityWeatherByZIPResult>
<Success>true</Success>
<ResponseText>City Found</ResponseText>
<State>CA</State>
<City>Sacramento</City>
<WeatherStationCity>Roseville</WeatherStationCity>
<WeatherID>15</WeatherID>
<Description>N/A</Description>
<Temperature>91</Temperature>
<RelativeHumidity>10</RelativeHumidity>
<Wind>MISG</Wind>
<Pressure>N/A</Pressure>
<Visibility/>
<WindChill/>
<Remarks/>
</GetCityWeatherByZIPResult>
</GetCityWeatherByZIPResponse>
</soap:Body>
</soap:Envelope>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="GetCityWeatherByZIPResult">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Success" type="xsd:string"/>
<xsd:element name="ResponseText" type="xsd:string"/>
<xsd:element name="State" type="xsd:string"/>
<xsd:element name="City" type="xsd:string"/>
<xsd:element name="WeatherStationCity" type="xsd:string"/>
<xsd:element name="WeatherID" type="xsd:string"/>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Temperature" type="xsd:string"/>
<xsd:element name="RelativeHumidity" type="xsd:string"/>
<xsd:element name="Wind" type="xsd:string"/>
<xsd:element name="Pressure" type="xsd:string"/>
<xsd:element name="Visibility" type="xsd:string"/>
<xsd:element name="WindChill" type="xsd:string"/>
<xsd:element name="Remarks" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I then built a PDF, added a data connection to the schema GetCityWeatherByZIP.xsd and added a number of fields bound to the schema. Finally, I got on with building an ES2 process to call the Web Service, extract the GetCityWeatherByZIPResult from the SOAP response and render a PDF using the extracted XML.
The Web Service settings are depicted below.
I created an input process variable of type 'string' called zip and added the reference in the Web Service Request using XPath.
The SetValue service extracts a process variable of type 'xml' called cityWeatherByZIP which I loaded with the schema GetCityWeatherByZIP.xsd. The FormService renderPDFForm then uses the XML cityWeatherByZip to bind to the form. I simply invoked the process from Workbench which creates an output process variable of type 'document' depicted below.
The LiveCycle ES2 archive is attached.
Steve
Views
Replies
Total Likes
Matthew,
I put together a sample that calls a public Web Service, maps the data from the SOAP response to a process variable of type 'xml' and renders a PDF using the xml.
I found public Web Services at http://wiki.cdyne.com/wiki/index.php?title=CDYNE_Weather which exposes WSDL at http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl and choose the operation GetCityWeatherByZIP. The operation takes a input string of ZIP code and produces the SOAP response, below.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<GetCityWeatherByZIPResponse xmlns="http://ws.cdyne.com/WeatherWS/">
<GetCityWeatherByZIPResult>
<Success>true</Success>
<ResponseText>City Found</ResponseText>
<State>CA</State>
<City>Sacramento</City>
<WeatherStationCity>Roseville</WeatherStationCity>
<WeatherID>15</WeatherID>
<Description>N/A</Description>
<Temperature>91</Temperature>
<RelativeHumidity>10</RelativeHumidity>
<Wind>MISG</Wind>
<Pressure>N/A</Pressure>
<Visibility/>
<WindChill/>
<Remarks/>
</GetCityWeatherByZIPResult>
</GetCityWeatherByZIPResponse>
</soap:Body>
</soap:Envelope>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="GetCityWeatherByZIPResult">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Success" type="xsd:string"/>
<xsd:element name="ResponseText" type="xsd:string"/>
<xsd:element name="State" type="xsd:string"/>
<xsd:element name="City" type="xsd:string"/>
<xsd:element name="WeatherStationCity" type="xsd:string"/>
<xsd:element name="WeatherID" type="xsd:string"/>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Temperature" type="xsd:string"/>
<xsd:element name="RelativeHumidity" type="xsd:string"/>
<xsd:element name="Wind" type="xsd:string"/>
<xsd:element name="Pressure" type="xsd:string"/>
<xsd:element name="Visibility" type="xsd:string"/>
<xsd:element name="WindChill" type="xsd:string"/>
<xsd:element name="Remarks" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I then built a PDF, added a data connection to the schema GetCityWeatherByZIP.xsd and added a number of fields bound to the schema. Finally, I got on with building an ES2 process to call the Web Service, extract the GetCityWeatherByZIPResult from the SOAP response and render a PDF using the extracted XML.
The Web Service settings are depicted below.
I created an input process variable of type 'string' called zip and added the reference in the Web Service Request using XPath.
The SetValue service extracts a process variable of type 'xml' called cityWeatherByZIP which I loaded with the schema GetCityWeatherByZIP.xsd. The FormService renderPDFForm then uses the XML cityWeatherByZip to bind to the form. I simply invoked the process from Workbench which creates an output process variable of type 'document' depicted below.
The LiveCycle ES2 archive is attached.
Steve
Views
Replies
Total Likes
This was perfect - thank you very much for your effort / input!
Matthew
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies