[flexcoders] Web Services: Nearing Wit's End
I've followed every single tutorial on consuming Web Services in Flex and not a single one works with anything other than simple demo web services available on the net. I've followed all the different methods documented and followed each and every step in detail. Now, I'm at the point that I am appealing for someone to take a look at my WSDL file and tell me what I am doing wrong. If you're interested in helping me out please let me know. Thanks. --Shibli
RE: [flexcoders] Question about Flex WebService
You may wish to specify that this is an SAP related question in the future as it will help those familiar with this subject identify the problem and offer solutions. You don't need FDS when consuming a Web Service. The error is saying that your WSDL is malformed. So I have some questions for you: 1) What version of R/3 are you using? 2) Are you sure ZGET_ALERT_NUMBER exists by that name? 3) Are you sure 8200 is your port? I would suggest you form your WSDL like this and give it a try: http://[SERVER]:[PORT]/sap/bc/soap/wsdl11?services=ZGET_ALERT_NUMBER Thanks --Shibli From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of snowedice Sent: Tuesday, March 06, 2007 12:30 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about Flex WebService Hi, Experts, please help me to see what is wrong here, thanks a lot!! I've created a simple programe to test the flex WebService. But it always pop out [RPC Fault faultString=[MessagingError message='Unknown destination 'defaultWSDL'.'] faultCode=InvokeFailed faultDetail=Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (null)] .. I've add the Destination in the ..\fds\jrun4 \servers\default\samples\WEB-INF\flex\proxy-config.xml destination id=defaultWSDL adapter ref=soap-proxy/ properties wsdlMailScanner warning: numerical links are often malicious: http://192.168.0.200:8200/sap/bc/srt/rfc/sap/zGet_Alert_Number? http://192.168.0.200:8200/sap/bc/srt/rfc/sap/zGet_Alert_Number? sap-client=800amp;wsdl=1.1/wsdl soapMailScanner warning: numerical links are often malicious: http://192.168.0.200:8200/sap/bc/srt/rfc/sap/zGet_Alert_Number? http://192.168.0.200:8200/sap/bc/srt/rfc/sap/zGet_Alert_Number? sap-client=800/soap /properties /destination Code is: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute mx:Script ![CDATA[ import mx.rpc.soap.WebService; import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; ]] /mx:Script mx:WebService id=wsGetAlertNumber destination=defaultWSDL mx:operation name=ZGET_ALERT_NUMBER mx:request IV_CATEGORY1/IV_CATEGORY /mx:request /mx:operation /mx:WebService .. The FDS is started before running the program. Anything wrong here?
RE: [flexcoders] new to webservices in flex - need help! :)
Did you forget to post it in your email or have you completely left out the columns of your datagrid? Please make sure you are properly assigning the dataField properties for each column in your datagrid. --Shibli From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of captnjay_mobile Sent: Wednesday, March 07, 2007 10:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] new to webservices in flex - need help! :) [RPC Fault faultString=HTTP request error faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2032: Stream Error. URL: http://localhost/HelloWorld.cfc;]. URL: http://localhost/HelloWorld.cfc;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faul tHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at ::DirectHTTPMessageResponder/errorHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven tFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() Code: mx:WebService id=myService wsdl=http://localhost/HelloWorld.cfc?WSDL; useProxy=false mx:operation name=getProjects resultFormat=object /mx:operation /mx:WebService *I can hit the http://localhost/HelloWorld.cfc?WSDL URL so I know that path is correct. I'm calling it via button.. mx:Button label=get projectsx click=myService.getProjects() x=377 y=199/ Then I'm trying to populate the results to a data grid mx:DataGrid dataProvider={myService.getProjects.arrProjects} width=668 height=376 x=20 y=240 I have an array of structures coming back from the HelloWorld cfc... arrProjects Thanks in advance!
RE: [flexcoders] I want to write a tutorial
I second Arun's suggestion. There needs to be more examples of consuming Web Services in Flex. Thanks --Shibli From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Arun Sadasivan Sent: Monday, March 05, 2007 12:28 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] I want to write a tutorial try to include in the tutorial the webservice handling from all ends. using and not using proxy and methodname.function name kind of calls and all the stuf related with webservice coz i think more than direct usage with php the next generation web will be mainy based on business logic embed in webservices and presentaion on flex technologies. Try to give some examples too .. On 04 Mar 2007 21:38:51 -0800, danneri21 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hey guys, I want to write another tutorial on Flex. So far I've written on how to create a login system with flex and php, and an mp3 player in flex. Any suggestions on what I should do next? I'm fresh out of ideas :p -- Regards, ...Arun
[flexcoders] Questions Re: Web Services
Hey, guys, I don't know if any of you out there are SAP consultants, but what I'm doing isn't anything out of the ordinary conceptually. I'm just consuming a Web Service using one of SAP's standard BAPI's called BAPI_SALESORDER_GETLIST. When I debug it, I can see that everything goes fine and it returns the data requested in the debugging console. However, nothing is binding in my datagrid. I assume this is because I haven't set the properties correctly according to the XML data received. Here's the XML (I've replaced customer sensitive data with blah and removed most of the columns for brevity): ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; SOAP-ENV:Body ns0:BAPI_SALESORDER_GETLIST.Response xmlns:ns0=urn:sap-com:document:sap:rfc:functions RETURN TYPE/ CODE/ MESSAGE/ LOG_NO/ LOG_MSG_NO00/LOG_MSG_NO MESSAGE_V1/ MESSAGE_V2/ MESSAGE_V3/ MESSAGE_V4/ /RETURN SALES_ORDERS item SD_DOCblah/SD_DOC ITM_NUMBERblah/ITM_NUMBER /item /SALES_ORDERS /ns0:BAPI_SALESORDER_GETLIST.Response /SOAP-ENV:Body /SOAP-ENV:Envelope Here's my Flex code to consume that: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=wsBAPI.BAPI_SALESORDER_GETLIST.send() mx:WebService id=wsBAPI wsdl=http://ouxs06vp.fender.com:8000/sap/bc/soap/wsdl11?services=BAPI_S ALESORDER_GETLIST useProxy=false mx:operation name=BAPI_SALESORDER_GETLIST mx:request CUSTOMER_NUMBER 000150 /CUSTOMER_NUMBER SALES_ORGANIZATION 1000 /SALES_ORGANIZATION DOCUMENT_DATE 20070227 /DOCUMENT_DATE SALES_ORDER/ /mx:request /mx:operation /mx:WebService mx:Panel x=10 y=10 width=475 height=400 layout=absolute title=Sales Orders mx:DataGrid x=30 y=75 id=dgTopPosts width=400 dataProvider={wsBAPI.BAPI_SALESORDER_GETLIST.Response} mx:columns mx:DataGridColumn headerText=SD_DOC dataField=SD_DOC/ mx:DataGridColumn headerText=ITM_NUMBER dataField=ITM_NUMBER width=75/ /mx:columns /mx:DataGrid /mx:Panel /mx:Application P.S. I know that Visual Composer uses Flex, but I want to build my apps in Flex Builder instead of VC. Another weird thing that is happening is that on my laptop Adobe Flex 2 debugger console window shows me everything in progress. However, on my desktop it juts says [SWF] C:\Documents and Settings\Me\My Documents\Flex Builder 2\Lessons\bin\Services-debug.swf - 982,015 bytes after decompression Any tips would be greatly appreciated. Thanks! --SBZ