From: Chris Luksha on
I am attempting to create a webservice from one site to be consumed by
another site. I have gone through various webservices tuts in the
distant past but I am stuck on this one.

On server A I have the following CFC...

<cfcomponent hint="Returns minimal member data for consumption">

<cffunction name="getMembersbyState" access="public" returntype="query"
hint="Members by State" description="FInd and return member listing by
state">
<cfargument name="state" required="yes" default="">
<cfset var rsGetResults="">
<cfquery name="rsGetMembers" datasource="#request.dsn#"
username="#request.dsnusrnm#" password="#request.dsnpwd#" >
SELECT member_id, city as member_City, company_name as member_Name,
dba_name as member_DBA
FROM members_tbl
WHERE Active = 1
AND state = '#argument.state#'
ORDER BY company_name
</cfquery>
<cfreturn rsGetMembers>
</cffunction>
</cfcomponent>

Now simply browsing to this page on my local server results in the cfc
description details. Browsing to in on the server - results in the
following error...

Could not import the tag library specified by "../administrator/cftags/".
The following error was encountered:
D:\inetpub\wwwroot-ct\CFIDE\componentutils\..\administrator\cftags.
Please ensure that you have specified a valid tag library.

The CFML compiler was processing:

* a cfimport tag beginning on line 3, column 2.


The error occurred in
D:\inetpub\wwwroot-ct\CFIDE\componentutils\login.cfm: line 3
Called from D:\inetpub\wwwroot-ct\CFIDE\componentutils\Application.cfm:
line 55
Called from D:\inetpub\wwwroot-ct\CFIDE\componentutils\Application.cfm:
line 55

1 : <cfsilent>
2 : <!--- Import L10N Taglib (System Generated) --->
3 : <cfimport prefix="admin" taglib="../administrator/cftags/">
4 :
5 : <!--- Establish page locale, default is english (en). --->


Does anyone have any pointers? PLEASE.

I have attempted to map the custom tag path to my cfc folder in the site
- via the system control panel. ( Using Crystaltech as host)
Should I be creating a diff. mapping of some kind? I can add a mapping
instead of a custom tag path but I have never done this thing before so
I completely lost.

Thanks so much.
Chris
From: Ian Skinner on
The first thing I noticed was that your access is wrong. For a function
to be a web service it needs to be access="remote" not access="public".

Also you might try returning a simple string until you know you have the
web service running and connecting, then move up to complex variables
like a query record set.
From: Chris Luksha on
Sorry 'bout that. I have tried the remote and was testing public.
forgot to put it back. Anyway thanks for the simplicity test.

A note: if I run the file directly on the server with the ?wsdl - I do
in fact get what I expect.



Ian Skinner wrote:
> The first thing I noticed was that your access is wrong. For a function
> to be a web service it needs to be access="remote" not access="public".
>
> Also you might try returning a simple string until you know you have the
> web service running and connecting, then move up to complex variables
> like a query record set.

--
Chris Luksha
Echo Web Services
Making Your Website Resound
603-831-0099
http://www.echowebservices.com/

CAN-SPAM Compliant Email Newsletters - only $.05 per Subscriber
http://www.echowebservices.com/email
From: Chris Luksha on
I thought it might be worth someone being able to see the link and test
it themselves :)

http://www.femsa.org/cfc/getMembers.cfc?WSDL This outputs as expected.
http://www.femsa.org/cfc/getMembers.cfc Yells at me.

I have added the firstws method as shown in this article...
http://www.adobe.com/devnet/coldfusion/articles/beginner_ws.html

Accessing the wsdl link from outside the server now reports this
error... Web service operation "firstws" with parameters {} could not
be found.


Ian Skinner wrote:
> The first thing I noticed was that your access is wrong. For a function
> to be a web service it needs to be access="remote" not access="public".
>
> Also you might try returning a simple string until you know you have the
> web service running and connecting, then move up to complex variables
> like a query record set.

--
Chris Luksha
Echo Web Services
Making Your Website Resound
603-831-0099
http://www.echowebservices.com/

CAN-SPAM Compliant Email Newsletters - only $.05 per Subscriber
http://www.echowebservices.com/email
From: Ian Skinner on
http://www.femsa.org/cfc/getMembers.cfc?WSDL This outputs as expected.
http://www.femsa.org/cfc/getMembers.cfc Yells at me.


I received this error for both of these links.
5 >= 0

The error occurred in D:\inetpub\femsa\cfc\application.cfc: line 1

1 : <cfapplication name = "cfc">
2 : <cfset request.dsn="femsaDSN">
3 : <cfset request.dsnusrnm="spartacus">


Check into the documentation for using an application.cfc with web
services and the request functions. They have some very specific
interactions, and the documentation gives some warnings on what you can
and can not do if you want to publish a web service.