Professional Web Applications Themes

Using WS Stubs in CFINVOKE Tags - Coldfusion - Advanced Techniques

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 ...

  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. #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

Similar Threads

  1. Access Stubs Library from Webservices
    By Bruno Gubler in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: July 27th, 06:06 AM
  2. Accessing complex COM objects in ColdFusion MC usingJava Stubs
    By tjforce in forum Macromedia ColdFusion
    Replies: 0
    Last Post: March 14th, 10:01 PM
  3. using cfinvoke
    By mike in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: February 24th, 04:57 AM
  4. Stumped on Stubs
    By Lutris Man in forum Macromedia Director Basics
    Replies: 4
    Last Post: April 25th, 10:40 PM
  5. Director stubs
    By gillyD2 webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 3
    Last Post: August 20th, 02:38 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