Solved

Calling web service

Posted on 2011-03-17
5
513 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adobe AIR in bar  launch 3 294
flash keyboard access html form 15 364
Flex dropdownlist displays [object][object] 2 1,416
Facebook Flash API - How do you edit MobileLoginWindow.as? 4 759
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…
A big percent of today’s marketing activity is performed through the online environment. The marketing strategies that have existed a decade ago no longer relate to what’s happening today. We’re currently facing a revolutionary era, called the digit…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

738 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