Using Web Services for Stored Procedures?

Ask a Question related to Coldfusion Component Development, Design and Development.

  1. #1

    Default Re: Using Web Services for Stored Procedures?

    Doug,

    Try creating a cfcomponent that has multiple cfproperty tags in it with the
    data you want to return. Then defined that CFC component as the return type
    of the cffunction.

    I think that will get you what you want:

    <!--- Data type CFC --->
    <cfcomponent name="myinfo">
    <cfproperty name="retval" type="numeric">
    <cfproperty name="mseq" type="string">
    ...

    </cfcomponent>

    <!--- Web Service CFC --->
    <cfcomponent>
    <cffunction name="fcnWS_Login_SP" access="remote" returntype="myinfo"
    output="false">
    ....


    Hope that gets you on the right track.

    --
    Tom Jordahl
    Macromedia.


    Tom Jordahl Guest

  2. Similar Questions and Discussions

    1. Stored Procedures
      Hi all, I'm a little confused about how to obtain a result set from a stored procedure (stored in a Visual FoxPro 8.0 database) from an ASP.NET...
    2. cf and foxpro stored procedures
      I have successfully connected to my colleagues foxpro database via odbc and can query, add and update info. I was hoping he could write into his...
    3. dt_ Stored Procedures
      Please could you tell me if it is safe to remove the dt_ stored procedures from my database? I have spent some time searching the web/groups for...
    4. New to ASP and Stored Procedures
      Hi I have some experince with ASP and databases in General, however Stored Procedures are new. I need to call a stored procedure and have bene...
    5. Stored Procedures and 4GL
      Hello, I am using Informix 7 se database. Is it possible to call a 4GL program from a stored procedure? Thanks Ahmer
  3. #2

    Default Re: Using Web Services for Stored Procedures?

    Tom,

    Thanks for the advice. I eventually discovered the problem - and it had been
    staring me right in the face. I read many times about refreshing CFC's in CF
    Administrator, but what I failed to realize (or read, despite reading many,
    many threads covering this issue) is that once you invoke the CFC the first
    time, the Administrator automatically logs it under webservices, thereby
    caching it. Even if you delete it from the log, it gets re-created again the
    very next time it's invoked. I hope this clarification helps other people if
    they experience this same snafu.

    I may try your suggestion anyway...but I have a question about it - If I
    return a cfcomponent that contains multiple cfproperties that are structs or
    arrays, can the cfreturn handle this (i.e. multiple arrays/structs)?

    Thanks again,

    Doug E.

    Doug_iCohere Guest

  4. #3

    Default Re: Using Web Services for Stored Procedures?

    Doug,

    Glad you found the solution to your previous problem. Yes all web services
    are "registered" in the admin. What this means is that the Java code
    generated from the WSDL has been created and compiled. This is expensive,
    so we only want to do this once.
    > I may try your suggestion anyway...but I have a question about it - If I
    > return a cfcomponent that contains multiple cfproperties that are structs
    or
    > arrays, can the cfreturn handle this (i.e. multiple arrays/structs)?

    It can., but remember the structs map *anything* to *anything* and in the
    web service world it is much better to be explicit about things and thus use
    another cfcomponent instead of a struct.

    --
    Tom Jordahl


    Tom Jordahl Guest

Posting Permissions

  • You may not post new threads
  • You may 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