Skip to main content
Owainnorth
Inspiring
December 31, 2009
Question

CF9 AdminAPI administrator.cfc Axis Issue

  • December 31, 2009
  • 3 replies
  • 3164 views

Not sure if anyone's come up against this one before, but searching the forums and Googling is getting me nowhere.

Trying to use the AdminAPI and all work except for the main Administrator.cfc, which annoyingly I need to login. Any of the other cfc's I can introspect, such as:

http://127.0.0.1/CFIDE/adminapi/security.cfc?WSDL - not an issue

However this one doesn't work:

http://127.0.0.1/CFIDE/adminapi/administrator.cfc?WSDL

And I get the following error:

AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - Error attempting to create Java skeleton for CFC web service.; nested exception is: 
     coldfusion.xml.rpc.CFCInvocationException: [coldfusion.xml.rpc.CFCInvocationException : returnType must be defined for remote CFC functions.]

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Error attempting to create Java skeleton for CFC web service.; nested exception is:
     coldfusion.xml.rpc.CFCInvocationException: [coldfusion.xml.rpc.CFCInvocationException : returnType must be defined for remote CFC functions.]
faultActor:
faultNode:
faultDetail:
     {http://xml.apache.org/axis/}hostname

Has anyone seen this before? Can anyone help? This is causing me real issues!

Cheers muchly
O.
    This topic has been closed for replies.

    3 replies

    BKBK
    Community Expert
    Community Expert
    January 2, 2010

    The cause of the error is clear:"returnType must be defined for remote CFC functions". There are indeed remote functions in the CFC that have no return-type.You can see that when you open

    http://127.0.0.1/CFIDE/adminapi/administrator.cfc

    A function must have a return-type if it is to be used as a web service. It's perhaps an idea to let the Adobe Coldfusion team know about this. If they expect functions in the administrator CFC to be used as web services, then what you have found is definitely a bug.

    Inspiring
    January 2, 2010

    I get this on CF9 too.

    Raise a bug - http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html - and please report the issue number back here.

    This is a good catch: I tested all of the CFAdmin API when it was in beta, and it all worked fine (-ish).  Never thought to call anything as web services though.

    As someone else suggsted: write a wrapper CFC which acts as a web service bridge between your calling code and local calls to the Admin API.  Or, given what you're saying this is for... why are you needing to call these things as web services anyhow?  The code you're running will be on the same CF service as the API, yes?  It's a CF server you're deploying your code too, innit?

    --

    Adam

    Owainnorth
    Inspiring
    January 2, 2010

    Cheers Adam.

    I've raised bug 81413 with Adobe. I'm now of the thinking that this issue came about for a very simply reason - it's because I'm cursed by the Devil himself to always stumble on seemingly minor yet showstopping bugs no matter what I do or what technology I'm using at the time.

    I'm actually writing a website creation application for the hosting company I work for - it's a VB.NET application and so far I've got it creating IIS websites, setting permissions, creating MySQL and SQLExpress databases all with no problems whatsoever. I'm trying to make the app as generic as possible so it'll also run on our CF servers and create the sandboxes and DSNs. Therefore I'm trying not to have to create anything custom within the CF install, hence not wanting to wrap the CFCs up.

    I love the pain really.

    Cheers for the help.

    O.

    Inspiring
    January 2, 2010

    What would be wrong with the VBS script deploying a CFC (or, hell, even a CFM) which you use during install and then clean up afterwards?  It's trivia compared to the rest of the stuff you're doing.  It also has the benefit that it will work, which your current approach will not ;-)  I mean... what's your other option, really?

    --

    Adam

    AdamPresley
    Participating Frequently
    December 31, 2009

    Hmmm. I can honestly say I've not tried using the AdminAPI's as a web service directly before, but instead have written wrappers around them, making the wrapper a webservice, and implementing some type of security around that. Let us know if you discover anything else.

    Participant
    January 2, 2010

    Cheers for the reply Adam.

    I'd thought of doing that but this is for a website creation script which ideally needs to be dumped onto vanilla Windows 2008 CF installs without any other configuration.

    I'll carry on bashing my face into a wall in the meantime, any other suggestions will no doubt save me pain so please let me know!

    O.

    Edit - no idea why I was logged into my boss's account when I sent this.