Skip to main content
December 13, 2010
Answered

Webservices - Need help getting started..

  • December 13, 2010
  • 1 reply
  • 1203 views

Hello all,

I am fairly new to webservices and Coldfusion so I could use some help getting started. The creation of the webservice has already been done, so I don't need to create a new one, so that part is already done.  The existing webservice is written in .NET and I need to consume it using Coldfusion. I believe I have all of the information that I need from the creator(s) in various XML files. There are a few examples of requests in .xml file format within the information that was given, along with a wsdl.xml file. From my reading on Coldfusion and webservices is they are consumed using the...

<cfinvoke webservice="yada.wsdl" method="yoddle" returnvariable="returnedVal">

and send arguments via

<cfinvokeargument

to the webservice which returns the data.

But this is where I am struggling..it looks like I should use the wsdl.xml file to connect to the webservice..is this correct? Do I need to place the wsdl.xml outside of the webroot within IIS?

All suggestions are appreciated.

    This topic has been closed for replies.
    Correct answer ilssac

    If you are trying to refer to this wsdl file:

    Directory containing wsdl.xml

    .../wwwroot/mydir/wsdl.xml

    Then you would use a parameter like this:

    <cfinvoke webservice="http://localhost/mydir/wsdl.xml" method="mywsdlmethod" returnvar="data">

    "?wsdl" is a ColdFusion feature that utilizes ColdFusion's ability to generate a wsdl file dynamically on the fly from a CFC file that is configured to be a web service.

    1 reply

    ilssac
    Inspiring
    December 13, 2010

    BigFeetBigShoes wrote:

    But this is where I am struggling..it looks like I should use the wsdl.xml file to connect to the webservice..is this correct? Do I need to place the wsdl.xml on within IIS?

    Not normally, if it can be helped.  What ideally you would do is point to the URL of the wsdl file on the sever hosting the web service.

    You can host the wsdl locally, IIRC, but then you will have to be sure to be updated when ever the web service is changed so that you can included an updated wsdl file locally.

    Not really an ideal, long term solution.

    December 13, 2010

    Thank you for your quick response! Im still working on reading through their documentation on the webservice, but unfortunately it does appear that we will be hosting the webservice locally since it looks to be versioned. So just to gather a few more specifics with that being the case, how do I refer to the wsdl.xml file in my cfinvoke? Is below the proper arrangement?

    Directory containing wsdl.xml

    .../wwwroot/mydir/wsdl.xml

    CFINVOKE

    <cfinvoke webservice="http://localhost/mydir/?wsdl" method="mywsdlmethod" returnvar="data">

    <cfinvokearguments...

    ilssac
    ilssacCorrect answer
    Inspiring
    December 13, 2010

    If you are trying to refer to this wsdl file:

    Directory containing wsdl.xml

    .../wwwroot/mydir/wsdl.xml

    Then you would use a parameter like this:

    <cfinvoke webservice="http://localhost/mydir/wsdl.xml" method="mywsdlmethod" returnvar="data">

    "?wsdl" is a ColdFusion feature that utilizes ColdFusion's ability to generate a wsdl file dynamically on the fly from a CFC file that is configured to be a web service.