Highlighted

Web Service

Avatar

Guest

12-05-2008

I have a written a small code as follows:

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

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

<mx:WebService destination="
http://sez-ws-185/TestDate/service1.asmx"
id="service1">

<mx:operation name="sendDate">

<mx:request>

<ddate>{date1}</ddate>

</mx:request>

</mx:operation>

</mx:WebService>

<mx:Script>

<![CDATA[

var date1:Date = new Date(2008,5,11,0,0,0)

var date2:Date = new Date(2008,5,12,0,0,1)

var date3:Date = new Date(2008,5,12,11,0,0)

var date4:Date = new Date(2008,5,12,11,30,0)

var date5:Date = new Date(2008,5,12,12,0,0)

var date6:Date = new Date(2008,5,12,2,0,0)

var date7:Date = new Date(2008,5,12,2,30,0)

var date8:Date = new Date(2008,5,12,0,0,0)

var date9:Date = new Date(2008,5,12)

]]>

</mx:Script>



<!--<mx:DateValidator id="valDelDate" source="{date1}"
property="text" inputFormat="MM/DD/YYYY"
allowedFormatChars="*#~/"/>

<mx:DateFormatter id="dateFormatter"
formatString="mm/dd/yyyy"/>-->

<mx:HBox>

<mx:VBox>

<mx:Text fontSize="12" fontFamily="Verdana"
text="Input:"/>

<mx:Text x="51" y="23" id="dspdate1" text="{date1}"/>

<mx:Text x="51" y="23" id="dspdate2" text="{date2}"/>

<mx:Text x="51" y="23" id="dspdate3" text="{date3}"/>

<mx:Text x="51" y="23" id="dspdate4" text="{date4}"/>

<mx:Text x="51" y="23" id="dspdate5" text="{date5}"/>

<mx:Text x="51" y="23" id="dspdate6" text="{date6}"/>

<mx:Text x="51" y="23" id="dspdate7" text="{date7}"/>

<mx:Text x="51" y="23" id="dspdate8" text="{date8}"/>

<mx:Text x="51" y="23" id="dspdate9" text="{date9}"/>



<mx:Button label="Save"
click="service1.sendDate.send()"/>

</mx:VBox>

</mx:HBox>

</mx:Application>



But when i run this I get the following error:

[RPC Fault faultString="[MessagingError message='Destination
'
http://sez-ws-185/TestDate/service1.asmx'
either does not exist or the destination has no channels defined
(and the application does not define any default channels.)']"
faultCode="InvokeFailed" faultDetail="Unable to load WSDL. If
currently online, please verify the URI and/or format of the WSDL
(null)"]

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\...

at Function/
http://adobe.com/AS3/2006/builtin::apply()

at
mx.rpc::AsyncDispatcher/timerEventHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncDispatcher.as:50]

at flash.utils::Timer/_timerDispatch()

at flash.utils::Timer/tick()



Please help me!!!