Solved

Calling web service

Posted on 2011-03-17
5
508 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 500 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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…
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now