Link to home
Start Free TrialLog in
Avatar of SreeramojuPradeep
SreeramojuPradeepFlag for India

asked on

Calling web service

Hi All,

I am facing a peculiar problem
i.e when i call init method on application start up it works completely fine....i get result of web service when i  send a request.. on startup of application..

But when i call same init() method some where from middle of the application...the control comes in to init() but i am not able to send any requests..no request is going to back end..
Using wsdl at the back end....
I am working with request ---> response pattern..
I dont know where i go wrong ....



<fx:Declarations>
		<!--Call responder for Reference Page to get XML path-->
		<s:CallResponder id="getXmlPathLinkReferenceResult"/>
		<xmlpathcommunicationport:XmlPathCommunicationPort id="xmlPathCommunicationPort"/>
		<s:CallResponder id="getXmlPathLinkJudgementsResult"/>
		<s:CallResponder id="getXmlPathLinkAuthoritiesResult"/>
		<s:CallResponder id="getXmlPathLinkBillsResult"/>
		<s:CallResponder id="getXmlPathLinkOrdinanceResult"/>
		<s:CallResponder id="getXmlPathLinkNotificationsResult"/>
		
	</fx:Declarations>


		protected function init():void
		{
			//Reference get xmlPath for buttons
			getXmlPathLinkReferenceResult.token = xmlPathCommunicationPort.getXmlPathLink("references", "bare acts");
			getXmlPathLinkReferenceResult.addEventListener(ResultEvent.RESULT,getBareActs);
			
		}

Open in new window

Avatar of ChristoferDutz
ChristoferDutz
Flag of Germany image

What are you actually trying to do? I have never seen such a configuration in order to communicate with a remote webservice.
http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_3.html
Avatar of SreeramojuPradeep

ASKER

I am using  WSDL/SOAP
 
<fx:Declarations>
		<!--Call responder for Reference Page to get XML path-->
		<s:CallResponder id="getXmlPathLinkReferenceResult"/>
		<xmlpathcommunicationport:XmlPathCommunicationPort id="xmlPathCommunicationPort"/>
	</fx:Declarations>

          <fx:script>
		protected function init():void
		{
			//Reference get xmlPath for buttons
			getXmlPathLinkReferenceResult.token = xmlPathCommunicationPort.getXmlPathLink("references", "bare acts");
			getXmlPathLinkReferenceResult.addEventListener(ResultEvent.RESULT,getBareActs);
			
		}

</fx:script>

Open in new window


the init() method is in mainpage.mxml
i.e when i start up application i  check internet connection
if(connection available)
    call init()// that call some services...works fine if conn available initially
else
set timer to check internet connection once available i call  again init() method in that case i am facing problem to call the service no request is going

I dont know where i am wrong


ASKER CERTIFIED SOLUTION
Avatar of ChristoferDutz
ChristoferDutz
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Well, I select the service type and connect to the webservice initially and if there is a problem in the internet connectivity in the middle .... After I connected to Internet How could I refresh the WSDL so that I can access the services.
Hi ChristoferDutz,

   Thanks for your valuable inputs.