Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Problem with the flex and the webservice

Boubaker_Moussa
Level 1
Level 1
Hey everyone,

I have a problem with flex; I declared a web service ( that I
test it and it works ) inside flex and declared also the operation.


But it seems that flex doesn't recognize the web method so
when i use something like

ws.Getheader.send()

it pop up an error : Property Send not found on ....

and in the intellisens menu after I write ws. I don't find my
method



here is a fragment of the code :



<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"


layout="absolute"

xmlns:local="*"

creationPolicy="all"

backgroundColor="white"

backgroundGradientColors="white"

themeColor="#8190b7"

width="970"

creationComplete="initVars()">

<mx:WebService id="ws" wsdl="
http://localhost/csp/SearchWS.asmx?WSDL"
useProxy="false">

<mx:operation name="SearchHeaderText" />

</mx:WebService>





<mx:Script>

<![CDATA[

import mx.events.ListEvent;

import flash.net.*;

import mx.rpc.soap.*;

import mx.controls.Alert;

import mx.rpc.events.ResultEvent;

import mx.rpc.events.FaultEvent;

import mx.utils.ObjectUtil;

import mx.rpc.http.HTTPService;







private function initVars():void

{



ws.SearchHeaderText.Send()



}



]]>

</mx:Script>
1 Reply
Karl_Sigiscar_1
Level 2
Level 2


Have you tried the data wizard in Flex Builder 3 ?

Data > Import Web Service (WSDL).



It will create all the classes automatically for you from the
WSDL. More about this here:


http://www.adobe.com/devnet/flex/articles/flex_ws.html?devcon=f4