Skip to main content
July 11, 2007
Question

CFC Pathing Issue, Please Help

  • July 11, 2007
  • 3 replies
  • 454 views
All,

I have created a webservice on my local box which is made up of two directories which have several CFC's in them. I am able to unit test and generate the WSDL on my local box.

My local box is CF7 installed in the default directory c:\cfusionmx7
My web services directory is a child of the root at c:\cfusionmx7\webservices. This contains the two corresponding directories for the services. E.G c:\cfusionmx7\webservices\service1\ and service2.

I have a test.cfm within c:\cfusionmx7\webservices which references "service1.servicename" when creating the object. This works.

Enter the nightmare.

I moved all this code to a new development environment which is CF6.1 (shouldn't matter as far as I can tell)

I'm now getting an error that the component "service1.servicename" could not be found.

This server is windows 2000 using IIS. It does NOT have a default website but instead 2 seperate websites using the same IP with host headers defined. Thus being staging and development living in different directories.

The physical directory that the http://development/ points to is e:\inetpub\development\intranet. coldfusion 6.1 is located within e:\inetpub\wwwroot. The application I moved from my local box I moved into e:\inetpub\development\intranet\webservices\

CF doesn't seem to have a problem parsing things within the development\intranet directory but for some reason the CFC's are not cooperating. No matter how I try and map them, I am getting component not found. I have tried "development.intranet.webservices.service1.servicename" and everything in between.

I'm at a loss as to what to do here. I want to think that the configuration of the server (no default website and host headers) might have some influence on this. Either that or I am missing something very simple.

I appreciate any help!




    This topic has been closed for replies.

    3 replies

    Inspiring
    July 12, 2007
    I might be missing something here but try setting up a mapping in CF Admin that goes directly to your web services folder:
    For example:
    Mapping Name: webservices
    Path: E:\INETPUB\DEVELOPMENT\INTRANETAPPS\WEBSERVICES

    Then, when you call/instantiate the object you would use the following:
    createObject("component","webservices.service1.servicename");
    createObject("component","webservices.service2.servicename");

    If you set this mapping up in both the development environment and the production environment, it should alleviate the problem.

    Again, apologies if I misread the post...

    Best,
    Craig
    July 12, 2007
    Craig,

    Thanks that worked to fix the first problem which was locating the CFC's. My unit testing went off without a hitch. However, I am getting a strange AXIS error when trying to generate the WSDL. I'm following the same practice as I did on my local box which again is CF7.

    Here's the Error in the EXCEPTION.LOG

    1. "","","07/12/07","09:46:58",,""
    2. AxisFault
    3. faultCode: { http://xml.apache.org/axis/}Server.generalException
    4. faultString: [coldfusion.xml.rpc.CFCInvocationException : Avoid using "_" (underscores) in variable names.]
    5 .faultActor: null
    6. faultDetail:
    7. [coldfusion.xml.rpc.CFCInvocationException : Avoid using "_" (underscores) in variable names.]

    July 11, 2007
    Ian,

    I do have a mapping in CF which is identical to a mapping inside of IIS.

    I'll write out the directory structure and hope it makes sense to you :-)

    E:\INETPUB\WWWROOT\CFIDE\ <-- this is where CF Lives
    E:\INETPUB\DEVELOPMENT <-- this is where the development environment is
    E:\INETPUB\DEVELOPMENT\INTRANETAPPS\ <-- this is where the development apps are located
    E:\INETPUB\DEVELOPMENT\INTRANETAPPS\WEBSERVICES <-- this is where my new web services directory I spoke about above is.

    There is a virtual directory in IIS called APPS which points to E:\INETPUB\DEVELOPMENT\INTRANETAPPS\

    There is also a mapping in CF Admin which is identical, APPS pointing to E:\INETPUB\DEVELOPMENT\INTRANETAPPS\

    Hope this helps clarrify.
    Inspiring
    July 11, 2007
    Do you have a ColdFusion Mapping set in your development box that is not
    set in the other box?

    These mappings are one of the possible places coldfusion looks for
    component files.