# Basic Web Service Connection Problem

**URL:** https://forum.kirupa.com/t/basic-web-service-connection-problem/265365
**Category:** flash
**Created:** [July 8, 2008, 3:27am UTC](https://forum.kirupa.com/t/basic-web-service-connection-problem/265365 "2008-07-08T03:27:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![billgregg](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@billgregg](https://forum.kirupa.com/u/billgregg)
#### Post date: [July 8, 2008, 3:27am UTC](https://forum.kirupa.com/t/basic-web-service-connection-problem/265365/1 "2008-07-08T03:27:01Z")

</div>

I’m trying to connect a Flash interface with a web service over the company intranet, and so far having no luck at all. While I have a pretty good Flash background, my experience with

other web technologies is pretty limited. The web service, which spits back XML, has been put together by a web developer who doesn’t have a lot of experience with Flash. I’m using a web

service object to connect, and the URL he has given me to connect to looks like this:

\*\*[COLOR=RoyalBlue][http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOfficesXML](http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOfficesXML)][http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOfficesXML](http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOfficesXML)

[/COLOR]**[COLOR=RoyalBlue][COLOR=Black]As I understand it, “[http://usdev.somedomain.com/PrintWebService/printwebservice.asmx](http://usdev.somedomain.com/PrintWebService/printwebservice.asmx)” is the web service itself and “FindAllOfficesXML” is the web service method.[/COLOR][/COLOR]**[COLOR=RoyalBlue]  
[/COLOR]**[COLOR=RoyalBlue][COLOR=Black]  
But that URL doesn’t make sense in the context of my code:[/COLOR][/COLOR]**[COLOR=RoyalBlue]

[/COLOR]\*\*\*[COLOR=Black]import mx.services.WebService;  
import mx.services.PendingCall;

connectto\_ws();

function connectto\_ws() {  
datapath = “[http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOfficesXML](http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOfficesXML)”;  
printwebservice = new WebService(datapath);  
pendingcall = printwebservice.FindAllOfficesXML();  
pendingcall.onResult = function(result) {  
\_root.resultstring.text = result;  
};  
pendingcall.onFault = function(fault) {  
\_root.resultstring.text = fault.faultstring;  
};  
}  
[/COLOR]\*

I’m setting the web service URL to the specific method, FindAllOfficesXML, of the web service, and then I’m defining pendingcall as a method of that same method!

Changing the URL to more closely resemble examples I see online doesn’t work either:

**[COLOR=RoyalBlue][http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?wsdl[/COLOR]](http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?wsdl%5B/COLOR%5D)**

I have a feeling the solution is pretty simple, but I’m not seeing it.
