Adobe Dreamweaver Forums



Last 10 THreads :         drop down menu over flash (Last Post : ltartisel - Replies : 2 - Views : 3 )           »          Flash-PHP Mail Form (Last Post : kglad - Replies : 3 - Views : 4 )           »          Flash Controls Not Displaying in Embedded File (Last Post : kglad - Replies : 5 - Views : 6 )           »          DW Flash Encoder (Last Post : wycn - Replies : 2 - Views : 3 )           »          navigation bar (Last Post : G. Rex - Replies : 5 - Views : 6 )           »          Adobe Flash 10 kills Wimpy (Last Post : ClubEXL.com - Replies : 82 - Views : 955 )           »          static sound (Last Post : 21n9 - Replies : 10 - Views : 11 )           »          flash loader reappears after movie plays (Last Post : kglad - Replies : 4 - Views : 5 )           »          Flex compiler in FlexBuilder and Flex SDK (Last Post : 2009 Matt - Replies : 4 - Views : 5 )           »          Is file too large? (Last Post : kglad - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 12-03-2008, 05:02 PM
Abobo
 
Posts: n/a
Diggs:
Default WebService using a bindable hostname - doesn't work

I have the following code:

[Bindable]
private var myServerHostPort:String = "af arf";

<!--wsdl="{myServerHostPort}/channel.asmx?wsdl"-->
<!--wsdl="http://localhost/mmo/channel.asmx?wsdl"-->
<!--wsdl="@ContextRoot()/mmo/channel.asmx?wsdl"-->


<mx:WebService
id="channelList"
concurrency="single"
wsdl="{myServerHostPort}/mmo/channel.asmx?wsdl"
fault="faultHandler(event)"
makeObjectsBindable="true">
<mxperation
name="GetChannelList"
makeObjectsBindable="true"
concurrency="single"
result="resultChannelListHandler(event)">
<mx:request xmlns="">
<transmitterAddress>{wsTransmitterAddress}</transm itterAddress>
<channelFolder>{wsChannelFolder}</channelFolder>
</mx:request>
</mxperation>
</mx:WebService>

My application is defined as:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initializeApplication()"
width="1100" height="800"
>



In the debugger, I can see the initialApplication() function being called.

private function initializeApplication():void
{
trace('initializeApplication: myServerHostPort:'+myServerHostPort);
myServerHostPort = NetworkUtil.getServerURL();

trace('initializeApplication: myServerHostPort:'+myServerHostPort);


}


In the debugger, I see the myServerHostPort = 'af arf', then it is
changed to something correct: http://localhost

After I hit F8, I get this fault reported:

faultDetail="Unable to load WSDL. If currently online, please verify
the URI and/or format of the WSDL (af arf/mmo/afaria/channel.asmx?wsdl)

You see here it is still using the original value instead of the one
set in the initializeApplication() function.


So a few questions:

1. Why is it even calling this WebService automatically? I only want
to call it when "I" call it. For some reason it is being called
during the initialization process and I don't want it to.

2. Why is it using this old value? If it is a [Bindable] variable it
should be using that.

3. If someone can't offer a way to fix this, can you suggest
alternatives.

I have tried making the WebService calls via ActionScript myself to
bypass the issue, but the loadWSDL() never seems to complete and there
are no errors thrown.


public function initWebService():void
{
CursorManager.setBusyCursor();


WS = new mx.rpc.soap.WebService();


//location of the Web Service Description
WS.wsdl = myServerHostPort+"/channel.asmx?wsdl";
WS.endpointURI = myServerHostPort+"/channel.asmx";


//GetChannelList is the WebService method we want to use
//and we want the results returned in the e4x XML format


WS.useProxy=false;
WS.requestTimeout=2;


WS.destination = "GetChannelList";
//specify the function that will handle the results
//returned by the operation
WS.GetChannelList.addEventListener("result", resultChannelListHandler);


//specify the method that will handle any faults
WS.GetChannelList.addEventListener("fault", faultHandler);


//specify the method that will handle the
//the event of loading the WSDL
//once the WSDL is loaded we will call
//our method in the function loadHandler
WS.addEventListener("load", loadChannelListHandler);


//Load the WSDL for this WebService
WS.loadWSDL();


}//end function useWebService


private function loadChannelListHandler(e:LoadEvent):void
{
CursorManager.removeBusyCursor();
wsdlLoaded = true;
ta.text = "wsdl loaded" + "\n\n";
}



Thanks for any feedback.

Dave





Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-03-2008, 09:43 PM
ericbelair
 
Posts: n/a
Diggs:
Default Re: WebService using a bindable hostname - doesn't work

one problem might be the space in the string.

otherwise, try this:

<mx:WebService
....
wsdl="{myServerHostPort + '/mmo/channel.asmx?wsdl'}"
....
/>
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:31 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk