flexcoders  

[flexcoders]

gnuwolf
Tue, 17 Jun 2008 15:07:38 -0700

Hi Guys,

 

I'm getting this error message whenever I invoke a WS operation:

 

A fault occured contacting the server. Fault message is: Invalid URL - can't
access HTTPS URLs when accessing proxy via HTTP.

 

Here's a code snippet:

 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
creationComplete="initApp()">

 

<mx:Script>

      <![CDATA[

            import com.netsuite.*;

            import mx.rpc.events.FaultEvent;

            import mx.rpc.soap.SOAPHeader;

        import mx.controls.Alert;

        

        private var header1:SOAPHeader;

            

            public var _service:NetSuiteService;

            

            public function initApp():void {

                  _service = new NetSuiteService("ws-netsuite");

                  

 
_service.addNetSuiteServiceFaultEventListener(handleFaults);

                  

                  this.setHeaders();

            }

 

Now, how can I saw this from the help guide:

 


Calling web services in ActionScript 


The following example shows a web service call in an ActionScript script
block. Calling the useWebService() method declares the service, sets the
destination, fetches the WSDL document, and calls the echoArgs() method of
the service. 

Note: When you declare a WebService component in ActionScript, you must call
the WebService.loadWSDL() method.

----------------------------------

How can I call loadWSDL() in my code?

 

Here's a code snippet from my proxy-config.xml:

 

<destination id="ws-netsuite">

        <properties>

 
<wsdl>https://webservices.netsuite.com/wsdl/v2008_1_0/netsuite.wsdl</wsdl>

            <soap>*</soap>

        </properties>

        <adapter ref="soap-proxy"/>

    </destination>

 

I already put in the destination in the service constructor but still I'm
getting a https error.

 

Badly need help.

 

TIA.

 

-- Clemen Canaria