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

Problem with WEB SERVICE on FLEX

Former Member
0 Likes
642

Hallo Guys,

I try to get result from RFC on SAP (Netweaver trial) using WEB Services and FLEX 3 .

the Flex-Application have to send import parameters to the rfc, and the response have to be internal table with structure this will be displayed on a datagrid.

My WebService-Tag looks as following:

<mx:WebService id="BerichtWS"

wsdl="{encodeURI(WSDLAdress)}"

makeObjectsBindable="true"

endpointURI="{encodeURI(wsAdress)}"

useProxy="false">

<mx:operation name="ZrfcTimecompare"

resultFormat="e4x">

.

.

.

When I click on the Button

<mx:Button label="Vergleichsdaten holen"

click="BerichtWS.ZrfcTimecompare.send()"/>

I get this Error message :

[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-Fehler. URL: http://localhost:8000/sap/bc/srt/rfc/sap/zrfc_timecompare/000/zrfc_timecompare/zrfc_timecompare"]. URL: http://localhost:8000/sap/bc/srt/rfc/sap/zrfc_timecompare/000/zrfc_timecompare/zrfc_timecompare"];

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220]

at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]

at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]

at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:362]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/redirectEvent()

SOMEONE ANY IDEA what cause this Error ?

Edited by: altayeb musa on Oct 5, 2009 4:43 PM

Hallo Guys,

I try to get result from RFC on SAP (Netweaver trial) using WEB Services and FLEX 3 .

the Flex-Application have to send import parameters to the rfc, and the response have to be internal table with structure this will be displayed on a datagrid.

My WebService-Tag looks as following:

<mx:WebService id="BerichtWS"

wsdl="{encodeURI(WSDLAdress)}"

makeObjectsBindable="true"

endpointURI="{encodeURI(wsAdress)}"

useProxy="false">

<mx:operation name="ZrfcTimecompare"

resultFormat="e4x">

.

.

.

When I click on the Button

<mx:Button label="Vergleichsdaten holen"

click="BerichtWS.ZrfcTimecompare.send()"/>

I get this Error message :

[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-Fehler. URL: http://localhost:8000/sap/bc/srt/rfc/sap/zrfc_timecompare/000/zrfc_timecompare/zrfc_timecompare"]. URL: http://localhost:8000/sap/bc/srt/rfc/sap/zrfc_timecompare/000/zrfc_timecompare/zrfc_timecompare"];

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220]

at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]

at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]

at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:362]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/redirectEvent()

SOMEONE ANY IDEA what cause this Error ?

Edited by: altayeb musa on Oct 5, 2009 4:43 PM

3 REPLIES 3
Read only

Former Member
0 Likes
572

Hi altayeb,

there are two things that you have to check, first, check the operation name of the webservice, second, you should pass all values that the service needs, even if the input values are oprional.

I hope you can go further with it.

Read only

0 Likes
572

Thanks Duhan for ur helpful answer.

Have the operation name be the same like service name ?

What I have is Web service name (RFC) with the name ZRFC_XXX , the generated WSDL has in its operation tag the name "ZRFCXXX" also without the minus charachter. Could thats make problem ?

Read only

0 Likes
572

Hi altayeb,

it is not necessary that the operation is called as the service and this is because, at the time you generate the WS, you can do it from a function group or from a function module. If you do it from a function group, the service is called as the group and every single function module is one of those operations that are in the function group. Another thing is, when you generate the WS, there is a flag in the second step from the wizard, in which you select how the operation is going to be called, if there are going to be gaps as you have seen or not.

I suggest you to use SOAPUI, a free tool to test the WS, there you can see the name of the service, the name of the operation and more thing that you may need.

Cheers.