Solved

Calling web service

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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