cancel
Showing results for 
Search instead for 
Did you mean: 

Ampersand in Flex Builder 3

Former Member
0 Kudos

Hi,

I have huge problem calling folowing code in Flex Builder 3:


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="srv.FlightCustomerGetList();">
<mx:Script>
   <![CDATA[
   private function handleResult():void
   {  dg.dataProvider = srv.FlightCustomerGetList.lastResult;    }
   
 

	
	
	
 
   
 


]]>

It produces error:

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

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:216]

at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49]

at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]

at DirectHTTPMessageResponder/errorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:343]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/redirectEvent()

I know its because of & character. Read all posts I could find about it (tried entering & amp; &#38; %28 etc.). Still no luck. I found that it has something to do with Flex Builder 3 new features (http://bugs.adobe.com/jira/browse/SDK-14418) ... any idea how to make it work?

I need only to display customer data in simple grid.

Regs,

FS

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you should take into account that the operation that you are calling of your service needs some input parameters, so please check them and afterwards it should send you the data from the backend.

Cheers

athavanraja
Active Contributor
0 Kudos

remove &wsdl=1.1, you dont really need it

http://localhost:8000/sap/bc/srt/rfc/sap/Z_FLIGHTCUSTOMER_WS?client=000&wsdl=1.1

and instead of localhost use the fully qualified domain (FQDN) host.domain.com

Raja

Former Member
0 Kudos

Hi,

im running it on my machine (SAP) - can it be 127.0.0.1 instead of FQDN?

And removing &wsdl=1.1 changed error to

[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://127.0.0.1:8000/sap/bc/srt/rfc/sap/Z_FLIGHTCUSTOMER_WS?sap-client=000)"]

at mx.rpc.wsdl::WSDLLoader/faultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:98]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:168]

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220]

at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49]

at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]

at DirectHTTPMessageResponder/errorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:343]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/redirectEvent()

athavanraja
Active Contributor
0 Kudos

i take back removing wsdl1.1 as i cant test it right now. but instead of

& &amp; 

should work. howp you would have seen this thread https://forums.sdn.sap.com/click.jspa?searchID=11920650&messageID=3613353

you cannot use ip or just host . icm will throw cx_fqdn exception.

if you want to set up dummy domain in your local machine checkout this blog.

/people/durairaj.athavanraja/blog/2005/08/21/running-your-first-bsp-application-in-sap-netweaver-04-abap-edition--nsp

Regards

Raja

Former Member
0 Kudos

Hi,

my code looks:



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="srv.FlightCustomerGetList();">
<mx:Script>
   <![CDATA[
   [Bindable]
   private var abapWSDL:String = "http://lp60.domain.pl:8000/sap/bc/srt/rfc/sap/Z_FLIGHTCUSTOMER_WS?sap-client=000&wsdl=1.1";
   
   private function handleResult():void
   {  dg.dataProvider = srv.FlightCustomerGetList.lastResult;    }
   
 

	
	
	
 
   
 



]]>

Did the trick with domain etc. Flex prompts me for user and password (that's progress). But giving ABAP user and password (bcuser/minisap) ends up with same error message. I thing we are closer to solving problem ... but still sth is missing.

[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://lp60.domain.pl:8000/sap/bc/srt/rfc/sap/Z_FLIGHTCUSTOMER_WS?sap-client=000"]. URL: http://lp60.domain.pl:8000/sap/bc/srt/rfc/sap/Z_FLIGHTCUSTOMER_WS?sap-client=000"];

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:216]

at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49]

at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]

at DirectHTTPMessageResponder/errorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:343]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/redirectEvent()

athavanraja
Active Contributor
0 Kudos

dont use sap-client=000 use sap-client=001 and also make sure that the rfc can return that in that particular client. you dont have bcuser in client 001. use ddid/minisap