‎2008 Jun 04 3:46 PM
Hi guys,
I am following this document.
How to Develop Flex Applications that Invoke Web Services
I have installed the SAP Plugin and i have tried to generate a FLEX UI based on WS definition using the SAP plugin. The application tends to run "Stack overflow" error when i try to do this.
java.lang.StackOverflowError
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at java.lang.StringBuffer.<init>(Unknown Source)
at com.sap.flex.ws.proxygen.TidyNameGenerator.tidyFieldName(TidyNameGenerator.java:143)
at com.sap.flex.ws.proxygen.TidyNameGenerator.makeFieldName(TidyNameGenerator.java:80)
.......
Are there any settings in Flex i need to configure as well?
appreciate any help.
‎2008 Jun 04 3:50 PM
That document was written using Flex Builder 2.0 are you using Flex Builder 3? I don't have it installed so, I can't say if it works for me or not but, that might be an issue.
If you have Flex Builder 3 installed there is a tool built in now to generate code from a WSDL, although some people have had some issues with it.
-d
‎2008 Jun 04 4:59 PM
I am using Flex builder 3.
I understand Flex builder 3 has a build it WSDL generation tool. But this SAP plugin has the functionality to create the screens for the webservice input. So i am pretty much eager to use this functionality.
thanks for the response.
‎2008 Jun 10 2:27 PM
HI,
Even if you are using Flex 3, you can still you the standard approach of using the Webservice class of the flex framework. You can find the syntax is flex dev guide which is available in on adobe's website. Here is the code snippet of how to use it.
<mx:WebService
id="userRequest"
wsdl="http://yourwsdl">
<mx:operation name="returnRecords" resultFormat="object"
fault="mx.controls.Alert.show(event.fault.faultString)"
result="remotingCFCHandler(event)">
<mx:request>
-
your request parameters----
</mx:request>
</mx:operation>
</mx:WebService>
Regards,
Rahul
‎2008 Jun 12 9:23 AM
Well I kind of ran into trouble doing this approach, when I need to do a WebService call I do this:
<mx:Script>
<![CDATA[
[Bindable] private var abapWSDL:String = "http://<<WebServiceLocation>>?sap-client=<<mandt>>&wsdl=1.1";
[Bindable] private var wsEndpoint:String = "http://<<WebServiceLocation>>?sap-client=<<mandt>>";
private function execute():void {
abapWS.<<OPERATIONNAME>>.send(arg1, arg2, arg3);
}
private function parseData(event:ResultEvent):void {
var Response:Object = event.result.<<RESPONSEOBJECT>>;
}
]]>