Using WS Stubs in CFINVOKE Tags

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Using WS Stubs in CFINVOKE Tags

    Hi there,

    I am developing a CF family of web service components that make use of complex
    data types. I've noticed that CFMX generates stub Java classes based on the
    WSDL files that I am working with that I can access as Java objects from within
    CFMX. This is nice, because, similar to Java and .NET practices, I should be
    able to use these classes to publish and consume web services with.

    Alas, I don't seem able to do this in practice, however, because CFMX only
    seems to accept structs as arguments to the <cfinvoke /> tag or web service
    invocation method. For example, although I can do this:

    ....<cfset val = StructNew () />
    ....<cfset val.a = "a" />
    ....<cfset val.b = "b" />
    ....
    ....<cfset ws = CreateObject ("webservice",
    "http://web.service.goes.here/a?wsdl") />
    ....<cfset ws.invokedMethod (args = val) />

    I don't seem able to do this:

    ....<cfset stub = CreateObject ("java", "cfmx.autogenerated.ws.stub.Here") />
    ....<cfset stub.setA ("a") />
    ....<cfset stub.setB ("b") />
    ....
    ....<cfset ws = CreateObject ("webservice",
    "http://web.service.goes.here/a?wsdl") />
    ....<cfset ws.invokedMethod (args = stub) />

    Is there any way in CFMX that I can achieve this result without have to create
    structs all the time?

    Thanks,
    Darryl Staflund

    Darryl A. J. Staflund Guest

  2. Similar Questions and Discussions

    1. Access Stubs Library from Webservices
      Hi I am using Microsoft Webservices MapPoint like this in MX7: <CFSCRIPT> // RenderServiceSoap myRenderServiceSoap =...
    2. CFINVOKE
      Hi, I've a problem invoking 2 cfc's in one function which has same return variable. please see the below code. my question is how does it affect...
    3. Accessing complex COM objects in ColdFusion MC usingJava Stubs
      http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tf_18211 Step 3c: I am confused on this step. The server that I have ColdFusion...
    4. Stumped on Stubs
      Hi, I'm trying to create stub projectors (pc, OSX, OS9) on a mac using dmx2004, to play my main movie. I've read the technotes, forum posts ,...
    5. Director stubs
      We are having problems while copying director project from a mac to pc from an external hard drive. When it is burned onto a cd, it starts looking...
  3. #2

    Default Re: Using WS Stubs in CFINVOKE Tags

    I have the same Problem/whishes with Arrays and I would like the have a Answer to this.
    Thanks
    Bruno
    Bruno Gubler 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