2008 Dec 22 2:14 PM
Hi Experts,
I was trying the example [Quickstart Using Flex and SAP Web Services|https://wiki.sdn.sap.com/wiki/display/EmTech/QuickstartUsingFlexandSAPWebServices] and got stuck while importing the WSDL into Flex.
I followed the steps Data -> Import Web Services (WSDL), here when I provide the URL for my WSDL in SAP, the wizard througs the error "There are no services specified in the current WSDL file.".
I also tried the steps that are explained in the Wiki Tutorials, here the WSDL is not getting loaded and the "Get Data" button is always disabled.
I am using NetWeaver 7.0 for providing the Web Service.
Any help or pointers would be much appreciated. Thanks a lot in advance for all the help & support.
Best Regards
Kathirvel
2008 Dec 22 2:35 PM
What does the error event says in the error event handler?
"flightWS.addEventListener(FaultEvent.FAULT,onWSError);" The onWSError method's error parameter should have some useful information.
-d
Hi Experts,
I was trying the example [Quickstart Using Flex and SAP Web Services|https://wiki.sdn.sap.com/wiki/display/EmTech/QuickstartUsingFlexandSAPWebServices] and got stuck while importing the WSDL into Flex.
I followed the steps Data -> Import Web Services (WSDL), here when I provide the URL for my WSDL in SAP, the wizard througs the error "There are no services specified in the current WSDL file.".
I also tried the steps that are explained in the Wiki Tutorials, here the WSDL is not getting loaded and the "Get Data" button is always disabled.
I am using NetWeaver 7.0 for providing the Web Service.
Any help or pointers would be much appreciated. Thanks a lot in advance for all the help & support.
Best Regards
Kathirvel
2008 Dec 22 2:35 PM
What does the error event says in the error event handler?
"flightWS.addEventListener(FaultEvent.FAULT,onWSError);" The onWSError method's error parameter should have some useful information.
-d
2008 Dec 22 2:55 PM
Hi Dan,
I was using the WSDL from SE80, hence it had some issues as the "Service" section was not found.
This thread was helpful.
Now, I generated the wsdl from SOAMANAGER and the system is able to load that. I got the WSDL loaded, but the I am not getting the results to the datagrid. Any help here is much appreciated.
Regards
Kathirvel
2008 Dec 22 3:30 PM
Dan,
Please find the error message below:
Error: Unknown Property: 'FlightList'.
at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:694]
at FlightsWebService/onFlightWSGotResult()[C:\Kathirvel_Laptop\FlexWorkSpace\FlexWSExample\src\FlightsWebService.mxml:44]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractService/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractService.as:237]
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:202]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:43]
at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:403]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Regards
Kathirvel
2008 Dec 22 3:53 PM
Have you looked in the debugger to see what is being returned? Maybe the case is different?
2008 Dec 22 4:14 PM
Thanks Dan, I did check the event object, but I could find the table that will be returned from the ABAP WS.
But I tested in WS, the beloe are the results:
Request
- <SOAP-ENV:Body>
- <ns1:ZwsFlightGetlist xmlns:ns1="urn:sap-com:document:sap:soap:functions:mc-style">
<Airline>AA</Airline>
- <FlightList>
- <item>
<Airlineid />
<Airline />
<Connectid />
<Flightdate />
<Airportfr />
<Cityfrom />
<Airportto />
<Cityto />
<Deptime />
<Arrtime />
<Arrdate />
<Price>0</Price>
<Curr />
<CurrIso />
</item>
</FlightList>
</ns1:ZwsFlightGetlist>
</SOAP-ENV:Body>Response
- <soap-env:Body>
- <n0:ZwsFlightGetlistResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
- <FlightList>
- <item>
<Airlineid>AA</Airlineid>
<Airline>American Airlines</Airline>
<Connectid>0017</Connectid>
<Flightdate>2008-05-21</Flightdate>
<Airportfr>JFK</Airportfr>
<Cityfrom>NEW YORK</Cityfrom>
<Airportto>SFO</Airportto>
<Cityto>SAN FRANCISCO</Cityto>
<Deptime>11:00:00</Deptime>
<Arrtime>14:01:00</Arrtime>
<Arrdate>2008-05-21</Arrdate>
<Price>422.94</Price>
<Curr>USD</Curr>
<CurrIso>USD</CurrIso>
</item>
- <item>
<Airlineid>AA</Airlineid>
<Airline>American Airlines</Airline>
<Connectid>0017</Connectid>
<Flightdate>2008-06-18</Flightdate>
<Airportfr>JFK</Airportfr>
<Cityfrom>NEW YORK</Cityfrom>
<Airportto>SFO</Airportto>
<Cityto>SAN FRANCISCO</Cityto>
<Deptime>11:00:00</Deptime>
<Arrtime>14:01:00</Arrtime>
<Arrdate>2008-06-18</Arrdate>
<Price>422.94</Price>
<Curr>USD</Curr>
<CurrIso>USD</CurrIso>
</item>
</FlightList>
</n0:ZwsFlightGetlistResponse>
</soap-env:Body>My Code in mxml file
private function getData():void{
var operation:AbstractOperation = flightWS.getOperation("ZwsFlightGetlist");
var input:Object = new Object();
input.Airline = txtAirline.text.toUpperCase();
input.FlightList = flightData;
operation.arguments = input;
operation.send();
}
private function onFlightWSGotResult(event:ResultEvent):void{
flightData = event.result.FlightList;
}
Note: The rest of the steps are same as the SDN wiki example.
Am i missing something here? Could you please help?
Regards
Kathirvel
Edited by: Kathirvel Balakrishnan on Dec 22, 2008 4:14 PM
2008 Dec 22 9:29 PM
This looks like XML output, what do the objects look like onFlightWSGotResult? Does the event.result have anything in it?
-d
2008 Dec 23 10:20 AM
Dan,
This is the content of the "event.result".
event.result = mx.collections.ArrayCollection (@2f84241)
dispatchResetEvent = true
filterFunction = null
length = 0
list = mx.collections.ArrayList (@3035b51)
[inherited] =
length = 0
source = Array (@2fca7b1)
length = 0
uid = "820E6DA7-0199-C1B2-F3F0-63576D461244"
sort = null
source = Array (@2fca7b1)
length = 0Regards
Kathirvel
2008 Dec 23 10:34 AM
Hi Dan,
I am getting results in the event.result as given below, but this is not getting displayed in the DataGrid.
I add the below line in the getData() function, as FlightList is a table parameter in my RFC function module.
input.FlightList = "";Could you please help?
event.result = mx.collections.ArrayCollection (@2f84d01)
[0] = mx.utils.ObjectProxy (@2f24599)
[1] = mx.utils.ObjectProxy (@2f24551)
[2] = mx.utils.ObjectProxy (@2f249d1)
[3] = mx.utils.ObjectProxy (@2f24a19)
[4] = mx.utils.ObjectProxy (@2f24a61)
[5] = mx.utils.ObjectProxy (@2f24aa9)
[6] = mx.utils.ObjectProxy (@2f24af1)
[7] = mx.utils.ObjectProxy (@2f24b39)
[8] = mx.utils.ObjectProxy (@2f24b81)
[9] = mx.utils.ObjectProxy (@2f24bc9)
[10] = mx.utils.ObjectProxy (@2f24c11)
[11] = mx.utils.ObjectProxy (@2f24c59)
[12] = mx.utils.ObjectProxy (@2f24ca1)
[13] = mx.utils.ObjectProxy (@2f24ce9)
[14] = mx.utils.ObjectProxy (@2f24d31)
[15] = mx.utils.ObjectProxy (@2f24d79)
[16] = mx.utils.ObjectProxy (@2f24dc1)
[17] = mx.utils.ObjectProxy (@2f24e09)
[18] = mx.utils.ObjectProxy (@2f24e51)
[19] = mx.utils.ObjectProxy (@2f24e99)
[20] = mx.utils.ObjectProxy (@2f24ee1)
[21] = mx.utils.ObjectProxy (@2f24f29)
[22] = mx.utils.ObjectProxy (@2f24f71)
[23] = mx.utils.ObjectProxy (@2f24fb9)
[24] = mx.utils.ObjectProxy (@30b9041)
[25] = mx.utils.ObjectProxy (@30b9089)
[26] = mx.utils.ObjectProxy (@30b90d1)
[27] = mx.utils.ObjectProxy (@30b9119)
[28] = mx.utils.ObjectProxy (@30b9161)
[29] = mx.utils.ObjectProxy (@30b91a9)
dispatchResetEvent = true
filterFunction = null
length = 30 [0x1e]
list = mx.collections.ArrayList (@3024a11)
sort = null
source = Array (@304d4a1)
[0] = mx.utils.ObjectProxy (@2f24599)
[1] = mx.utils.ObjectProxy (@2f24551)
[2] = mx.utils.ObjectProxy (@2f249d1)
[3] = mx.utils.ObjectProxy (@2f24a19)
[4] = mx.utils.ObjectProxy (@2f24a61)
[5] = mx.utils.ObjectProxy (@2f24aa9)
[6] = mx.utils.ObjectProxy (@2f24af1)
[7] = mx.utils.ObjectProxy (@2f24b39)
[8] = mx.utils.ObjectProxy (@2f24b81)
[9] = mx.utils.ObjectProxy (@2f24bc9)
[10] = mx.utils.ObjectProxy (@2f24c11)
[11] = mx.utils.ObjectProxy (@2f24c59)
[12] = mx.utils.ObjectProxy (@2f24ca1)
[13] = mx.utils.ObjectProxy (@2f24ce9)
[14] = mx.utils.ObjectProxy (@2f24d31)
[15] = mx.utils.ObjectProxy (@2f24d79)
[16] = mx.utils.ObjectProxy (@2f24dc1)
[17] = mx.utils.ObjectProxy (@2f24e09)
[18] = mx.utils.ObjectProxy (@2f24e51)
[19] = mx.utils.ObjectProxy (@2f24e99)
[20] = mx.utils.ObjectProxy (@2f24ee1)
[21] = mx.utils.ObjectProxy (@2f24f29)
[22] = mx.utils.ObjectProxy (@2f24f71)
[23] = mx.utils.ObjectProxy (@2f24fb9)
[24] = mx.utils.ObjectProxy (@30b9041)
[25] = mx.utils.ObjectProxy (@30b9089)
[26] = mx.utils.ObjectProxy (@30b90d1)
[27] = mx.utils.ObjectProxy (@30b9119)
[28] = mx.utils.ObjectProxy (@30b9161)
[29] = mx.utils.ObjectProxy (@30b91a9)
length = 30 [0x1e]
Regards
Kathirvel
Edited by: Kathirvel Balakrishnan on Dec 23, 2008 10:38 AM
2008 Dec 23 11:11 AM
Dan,
Thanks a lot for your help. I made the below two changes and it is working fine.
private function onFlightWSGotResult(event:ResultEvent):void{
dbFlightData.dataProvider = event.result;
}
<mx:DataGrid x="10" y="36" width="608" height="331" id="dbFlightData">Regards
Kathirvel