?
Solved

Calling web service

Posted on 2011-03-17
5
Medium Priority
?
527 Views
Last Modified: 2012-05-11
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

0
Comment
Question by:SreeramojuPradeep
  • 3
  • 2
5 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35155313
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
0
 

Author Comment

by:SreeramojuPradeep
ID: 35155606
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


0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 2000 total points
ID: 35155620
Well you are calling a function of a class XmlPathCommunicationPort which is unknown to me/us so I think you should post that code here too.
0
 

Author Comment

by:SreeramojuPradeep
ID: 35291997

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

Author Closing Comment

by:SreeramojuPradeep
ID: 35459185
Hi ChristoferDutz,

   Thanks for your valuable inputs.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Tech giants such as Amazon and Google have sold Alexa and Echo to such an extent that they have become household names. And soon they are expected to be used by commoners in their homes, ordering takeout, picking out a song, answering trivia questio…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question