Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Developing Flex Applications that Invoke SAP Services

Former Member
0 Likes
621

Hi guys,

I am following this document.

How to Develop Flex Applications that Invoke Web Services

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20536f87-b5a1-2a10-06ad-c1536946...

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.

4 REPLIES 4
Read only

former_member10945
Contributor
0 Likes
595

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

Read only

0 Likes
595

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.

Read only

0 Likes
595

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

Read only

0 Likes
595

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>>;
	}
		



	


]]>