on 04-26-2007 2:08 PM
Dear All,
I have a wsdl document. I am trying to manipulate the file into a desirable format using xMII Logic Editor and xMII as a web service. Anybody can please suggest me the steps of how to achieve this.
The wsdl url is :- http://www.webservicex.net/WeatherForecast.asmx?wsdl
The desirable output is something like this:--
<?xml version="1.0" encoding="UTF-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <XacuteResponse xmlns="http://www.lighthammer.com/Xacute">
- <Rowsets DateCreated="2007-04-26T18:35:25" EndDate="2007-04-26T18:35:25" StartDate="2007-04-26T18:35:25" Version="11.5.1">
- <Rowset>
- <Columns>
<Column Description="" MaxRange="0" MinRange="0" Name="Day" SQLDataType="1" SourceColumn="Day" />
<Column Description="" MaxRange="0" MinRange="0" Name="MaxTempC" SQLDataType="1" SourceColumn="MaxTempC" />
<Column Description="" MaxRange="0" MinRange="0" Name="MaxTempF" SQLDataType="1" SourceColumn="MaxTempF" />
<Column Description="" MaxRange="0" MinRange="0" Name="MinTempC" SQLDataType="1" SourceColumn="MinTempC" />
<Column Description="" MaxRange="0" MinRange="0" Name="MinTempF" SQLDataType="1" SourceColumn="MinTempF" />
<Column Description="" MaxRange="0" MinRange="0" Name="WeatherImg" SQLDataType="1" SourceColumn="WeatherImg" />
</Columns>
- <Row>
<Day>Thursday, April 26, 2007</Day>
<MaxTempC>14</MaxTempC>
<MaxTempF>57</MaxTempF>
<MinTempC>9</MinTempC>
<MinTempF>49</MinTempF>
<WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/bkn.jpg</WeatherImg>
</Row>
<Row>
<Day>Friday, April 27, 2007</Day>
<MaxTempC>15</MaxTempC>
<MaxTempF>51</MaxTempF>
<MinTempC>10</MinTempC>
<MinTempF>39</MinTempF>
<WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/ft.jpg</WeatherImg>
</Row>
<Row>
<Day>Saturday, April 28, 2007</Day>
<MaxTempC>16</MaxTempC>
<MaxTempF>47</MaxTempF>
<MinTempC>18</MinTempC>
<MinTempF>29</MinTempF>
<WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/bkn.jpg</WeatherImg>
</Row>
</Rowset>
</Rowsets>
</XacuteResponse>
</soap:Body>
</soap:Envelope>
Input is any USA city. Lets say, New York.
Thanks in Advance,
Regards,
Lipsa.
Lipsa,
I highly recommend becomming familiar with the xMII XML Output actions in order to build this. Start with a simple XML structure and work up from there. Once your comfortable then you can call a transaction as a Web Service with the following URL: http://<Server>/Lighthammer/WSDLGen/<TransactionPath>/<TransactionName>;
To return any value from the transaction call it has to be of type string and will be returned in the following XML Structure:
<?xml version="1.0" encoding="utf-8"?>
<XacuteResponse xmlns="http://www.sap.com/xMII">
<Rowset>
<Row>
<OutputString>Some encoded XML</OutputString>
</Row>
</Rowset>
</XacuteResponse>
In your case the transaction flow will be along these lines:
1) Web Service call for Weather and Add Document (Configure Columns)
2) Repeat on "WebService.GetWeatherByZipCodeResponse{/ns1:GetWeatherByZipCodeResponse/ns1:GetWeatherByZipCodeResult/ns1:Details/ns1:WeatherData}"
3) Configure Row and link from Repeater to document
4) Outside of the repeater assign the document XML to the string output of the transaction
Hope this helps to clarify how the transaction operates.
-Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
Thanks for answering my question. I am completely new to SAP xMII. So, can you please write the steps bit precisely. I am unable to replicate the steps which you suggest. Lets consider one of the operation i.e, GetWeatherbyPlaceName. Now, in respect of this particular SOAP operation, please tell me the steps in details.
Thanks,
Lipsa.
Lipsa,
XMII XML document in Business Logic editor will help you build this XML structure.
1. First call your web service using webservice action block
2. Link corresponding inputs to your web service
3. Have a document action block from XMII XML output tab.Right click and configure the document (this will add columns to your XML) So you have to add Day, MaxTempC, MaxTempF,MinTempC,MinTempF,WeatherImg in the configure window.
4.You can have both the above blocks in one sequence
5. Next to it have a repeater to repeat on the response of the webservice
6.Have a Row action block next to it and configure it to the document output xml.this enables you to add rows to your xml
7.Link output from your repeater output xml to row.
8.Have an assignment block below the first sequence and now you can assign the encoded output of the document to a string variable in your transaction properties
Hope this helps you....
Thanks,
Ajitha
Reward points for useful answers!!!!
Hi Lipsa,
As Suggested by Sam Be familiar with XMII XML output.
Follow these steps:
1. Call webservice by using webservice action. Before that check proxy settings for the server.
2. Using the link editor give the required inptus to xacute request.
3. Add a sequence and drag and drop the document action from XMII XML output tab.
4. Write click on this action and define the required columns
5. Add a repeater and configure the it with the webservice action.
For example
WebService.GetWeatherByZipCodeResponse{/ns1:GetWeatherByZipCodeResponse/ns1:GetWeatherByZipCodeResult/ns1:Details/ns1:WeatherData}
6. Add a Row( XMII XML output) below the Repeatr action. While configuring assign the document created as source. Then go to links and link the values from REPEATER.
6. Add another sequence in the repeater block( default path) and add assignment action. Create a output transaction property of string type.
7. Go to the links of assignment action. Click on the + action in bottom left. Use the function XMLENCODE(<Documentname>.Output). This will give output as an string.
8. To enter the city name as a user input, create a city name in transaction property as input type. Then link this with <webservicename>.xacuteRequest._________.
9. Save this transaction.
Now it can be called as a webservice from anywhere by using
http:
<severname>\Lighthammer\WSDLGen\<Transaction Path>\<Transaction Name>
Check the output from webservice call, The form is as per the requirement.
Hope this helps you.....
Regards,
Kishore
Hi Kishore,
I followed the steps as you said.
Still I get the following output :-
<?xml version="1.0" encoding="UTF-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <XacuteResponse xmlns="http://www.lighthammer.com/Xacute">
- <Rowsets DateCreated="2007-04-27T11:16:28" EndDate="2007-04-27T11:16:28" StartDate="2007-04-27T11:16:28" Version="11.5.1">
- <Rowset>
<Row />
</Rowset>
</Rowsets>
</XacuteResponse>
</soap:Body>
</soap:Envelope>
I have few doubts.
1. What is the difference between the 2nd and 8th steps? Are they not the same?
2. In the 6th step, we are creating a output transaction property of string type. Where should I create this property? In the link editor of the assignment block??
3. And morever, where am I going to use it?
4. In the 7th step, I am suppose to use the XMLENCODE function. On clicking the + action, there is a feild called Target Xpath. Dont I have to specify the value for that feild?
5. What is (<Documentname>.Output) in the 7th step? I have given it as IlluminatorDocument_0.Output. Is this correct?
Thanks,
Lipsa.
Hi Lipsa,
1. No they are not the same. ?In the second step, harcoded city name is there, In the 8th, city name can be passed from outside.
2. In Logic editor menu bar, click on transaction and choos property. Here the output and input proerties can be created.
3.When a xMII transaction called as webservice from another system and the output property as the XML type, it gives some error. Thats why, It is better to have whole xml encoded as a string property.
4. The target value is Transaction.<output property name>
From the function select xmlencode
in the place of string put your Illuminator_Dcument.Output
5. Yes correct.
Regards,
Kishore
Message was edited by:
kishore kumar
Lipsa,
What I meant in the last step is that you can have an assignment action block outside the scope of the repeater ( You can have it under your first sequence which has the webservice and document action blocks)
Create a transaction property of type string, say OUTPUT (this has to be done in transaction -> Properties in the menu panel)and click on the output checkbox to make it an output variable
Now you have to assign the output of your document to this transaction OUTPUT
But the document output is of xml type so you have to encode it before assigning it to a string variable output
Right click on the assignment block and click links.
Click the + button in the Link editor and now you can see the expression editor.
In Functions drop down you have "XMLENCODE" function and have an expression like
xmlencode < YourDocument.Output>
and assign this to your Transaction OUTPUT variable
That will do....
Thanks,
Ajitha
Friends,
Thank you very much for your instant response. Finally I got this output:-
<?xml version="1.0" encoding="UTF-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <XacuteResponse xmlns="http://www.lighthammer.com/Xacute">
- <Rowsets DateCreated="2007-04-27T12:22:56" EndDate="2007-04-27T12:22:56" StartDate="2007-04-27T12:22:56" Version="11.5.1">
- <Rowset>
- <Columns>
<Column Description="" MaxRange="0" MinRange="0" Name="Output" SQLDataType="1" SourceColumn="Output" />
</Columns>
- <Row>
<Output><?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-04-27T12:22:55" EndDate="2007-04-27T12:04:05" StartDate="2007-04-27T12:04:05" Version="11.5.1"><Rowset><Columns><Column Description="" MaxRange="1" MinRange="0" Name="Day" SQLDataType="1" SourceColumn="Day"/><Column Description="" MaxRange="1" MinRange="0" Name="WeatherImg" SQLDataType="1" SourceColumn="WeatherImg"/><Column Description="" MaxRange="1" MinRange="0" Name="MaxTempF" SQLDataType="1" SourceColumn="MaxTempF"/><Column Description="" MaxRange="1" MinRange="0" Name="MaxTempC" SQLDataType="1" SourceColumn="MaxTempC"/><Column Description="" MaxRange="1" MinRange="0" Name="MinTempF" SQLDataType="1" SourceColumn="MinTempF"/><Column Description="" MaxRange="1" MinRange="0" Name="MinTempC" SQLDataType="1" SourceColumn="MinTempC"/></Columns><Row><Day>Friday, April 27, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/ra90.jpg</WeatherImg><MaxTempF>62</MaxTempF><MinTempF>48</MinTempF><MaxTempC>17</MaxTempC><MinTempC>9</MinTempC></Row><Row><Day>Saturday, April 28, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/tsra30.jpg</WeatherImg><MaxTempF>67</MaxTempF><MinTempF>55</MinTempF><MaxTempC>19</MaxTempC><MinTempC>13</MinTempC></Row><Row><Day>Sunday, April 29, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg</WeatherImg><MaxTempF>69</MaxTempF><MinTempF>51</MinTempF><MaxTempC>21</MaxTempC><MinTempC>11</MinTempC></Row><Row><Day>Monday, April 30, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg</WeatherImg><MaxTempF>73</MaxTempF><MinTempF>50</MinTempF><MaxTempC>23</MaxTempC><MinTempC>10</MinTempC></Row><Row><Day>Tuesday, May 01, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/hi_shwrs30.jpg</WeatherImg><MaxTempF>76</MaxTempF><MinTempF>55</MinTempF><MaxTempC>24</MaxTempC><MinTempC>13</MinTempC></Row><Row><Day>Wednesday, May 02, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg</WeatherImg><MaxTempF>69</MaxTempF><MinTempF>53</MinTempF><MaxTempC>21</MaxTempC><MinTempC>12</MinTempC></Row><Row><Day>Thursday, May 03, 2007</Day><WeatherImg>http://www.nws.noaa.gov/weather/images/fcicons/sct.jpg</WeatherImg><MaxTempF>66</MaxTempF><MinTempF>50</MinTempF><MaxTempC>19</MaxTempC><MinTempC>10</MinTempC></Row></Rowset></Rowsets></Output>
</Row>
</Rowset>
</Rowsets>
</XacuteResponse>
</soap:Body>
</soap:Envelope>
Now, my next target is to extract the the xml data within the output tag of the above xml file and display it in grid format.
Can anybody help???
Thanks,
Lipsa.
Hi,
In transaction property create a output of XML type(say OUTPUT1)
Check output Parameter check box
Link Illmdcoument.Output to this xml type output property.
call this transaction through xacute query.
Opne query templates
Click on new and select xaute query
Mode: Query
Under the transaction tab:
Select transaction
Output parameter: OUTPUT1
Test this and check the result. Once output is fine save the xacute query.
open display template. Select new and choose iGrid.
In the datamapping tab call xaute query and assign the required columns in the value columns.
Save this diaply template.
Through dynamic page editor, select xacute query and corresponding display template and click on generate page.
It gives the applet.
Hi Friends,
I have done it.
One small problem,
While testing the query template, I am able to see all the data.
But in Dynamic Page Generator, when I select the query and the corresponding display template, I dont see the full table.
The Horizontal Tab is not appearing in the grid output, though I have checked the "Show Horizontal Tab Bar?" option under General Tab in the display template.
Can anybody tell me what might be the possible reason for this???
And how can I resolve it???
Thanks,
Lipsa.
Kishore,
I am yet stuck up with another wsdl. Though I am follwing ur steps, yet i am not getting the output.
Can anybody please let me know the steps required for this particular wsdl???
url is :- http://www.webservicex.net/globalweather.asmx?wsdl
Regards,
Lipsa
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.