Professional Web Applications Themes

Webservice publishing problems - Coldfusion - Advanced Techniques

I created a CFC with a method named "getLinks" with access="remote" and put it in the components folder in my web server. When I try to access from another website in other server (other domain), using the webservice call, I get the following error: Web service operation "getLinks" with parameters {} could not be found. I'm attaching the codes. Someone please help me. Thanks <component> <cffunction access="remote" name="getLinks" returntype="query" output="No"> <cfquery name="get" datasource="myDataSource"> select * from myTable </cfquery> <cfreturn get> </component> Invoke from the other server: <cfinvoke webservice="http://www.mydomain.com/ws/myComponent.cfc?wsdl" method="getLinks" returnvariable="myQuery" />...

Sponsored Links
  1. #1

    Default Webservice publishing problems

    I created a CFC with a method named "getLinks" with access="remote" and put it
    in the components folder in my web server.
    When I try to access from another website in other server (other domain),
    using the webservice call, I get the following error:
    Web service operation "getLinks" with parameters {} could not be found.
    I'm attaching the codes.
    Someone please help me.
    Thanks




    <component>
    <cffunction access="remote" name="getLinks" returntype="query" output="No">
    <cfquery name="get" datasource="myDataSource">
    select * from myTable
    </cfquery>
    <cfreturn get>
    </component>


    Invoke from the other server:

    <cfinvoke
    webservice="http://www.mydomain.com/ws/myComponent.cfc?wsdl"
    method="getLinks" returnvariable="myQuery" />

    Sponsored Links
    FullSail Guest

  2. #2

    Default Re: Webservice publishing problems

    And you've checked that you can access the wsdl file from your "other server" via a web browser?
    BSterner Guest

  3. #3

    Default Re: Webservice publishing problems

    .. . .
    .. . .
    <cfreturn get>
    </cffunction>

    BKBK Guest

  4. #4

    Default Re: Webservice publishing problems

    > Invoke from the other server: 

    What do you get when you access the url
    http://www.mydomain.com/ws/myComponent.cfc?wsdl with a browser ?

    --
    <mack />


    Neculai Guest

  5. #5

    Default Re: Webservice publishing problems

    Yes, I have access from another server via web browser, and I can see the component XML
    FullSail Guest

  6. #6

    Default Re: Webservice publishing problems

    After troubleshooting with my friend Emanuel from Fort Lauderdale, we solve the
    problem.
    Accessing the component via webservices from another server, the "Return type"
    cannot be "Query".
    When we converted the resulting query to an array and returned it with the
    type "array", the other server could "see" the method and receive the data,
    although it took too long due to the convertion process.
    So, I decided to change the return type to "String" and after the query I used
    <cfwddx action="cfml2wddx"... and returned the wddx string. It was much faster
    and with no errors.

    I have been using "query" types for returning data a long time in components
    from the same server with no problems, but I never tried to make them
    webservices for external access.

    Thanks for all the help and I hope my experience will be of some interest for
    someone.

    Sincerely,
    Ricardo Parente

    FullSail Guest

Similar Threads

  1. Publishing Problems
    By Solid_snake721 webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 1
    Last Post: February 23rd, 09:31 AM
  2. connection and publishing problems
    By Dave Harper in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: November 25th, 08:40 PM
  3. Problems Publishing My Site
    By Dinger188 in forum Web Design
    Replies: 10
    Last Post: April 26th, 06:05 PM
  4. Web publishing Problems
    By ICEBreaker in forum FileMaker
    Replies: 4
    Last Post: October 12th, 10:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139