Hi All,

I am getting an exception while calling the weblogic web service from
flex swf file. 

How Ever i am able to call the methods on Java class through RPC.

Here what i am doing:

Create a simple web-application or portal-application in weblogic 8.1.

- create a swf file from the FlexBuilder, My FlexBuilder is using the
tomcat server.

Here is the code of my web-service client which is a mxml file:

/*------------------ Start of code ------------------*/
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">

<mx:WebService  id="WLWS"
wsdl="http://localhost:7001/WebProject/WS.jws?WSDL"/>

<mx:Button id="b1" click="WLWS.callService()"/>

</mx:Application>
/*------------------ Code Ends ------------------*/

-I just build the application in flexbuilder and swf file is
automatically generated in output folder.

Now integrating the SWF with the weblogic application:
 
-Just paste the swf file in the weblogic web-application folder.

-create a HTML file that points to swf file. like this

/*------------------ Start of code ------------------*/

<object id='mySwf' classid=''
codebase='http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab'
height='200' width='400'>
<param name='src' value='flexbea.swf'/>
<param name='flashVars' value=''/>
<EMBED  id='mySwf' src='flexbea.swf'
pluginspage='http://www.adobe.com/go/getflashplayer' height='100%'
width='100%'> </EMBED> </object>
]
/*------------------ Code Ends ------------------*/

-Where flexbea.swf is the file name that is generated from the
flexbuilder.

-I have a web-service which is present in a same web-application and
its name is "WS" and it has one method [method signature] -> "public
void callService()". 

-When I run the weblogic App it loads the wsdl as far as i understand
because on load it shows no exception but when i call the method by
click on this button "<mx:Button id="b1" click="WLWS.callService()"/>" 

It throws an exception.

[RPC Fault faultString="Security error accessing url"
faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
        at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
        at mx.rpc::Responder/fault()
        at mx.rpc::AsyncRequest/fault()
        at DirectHTTPMessageResponder/securityErrorHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/redirectEvent()

Can any one help me out, I am using the weblogic 8.1[SP4] and Flex 2.0. 

Thanks in advance.
M.A.Basit

Reply via email to