#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    14
    Rep Power
    0

    Retrieving array from .NET web service


    I have created a Web Service that retrieves all the depts from a specific directorate and all the divisions from the specific department. I used this Web service for my InfoPath forms. This way the user can select the Directorate from the combobox and the depts listed under the directorate will appear in another combo box. Same thing for getting the divisions under the depts.

    Now I want to access this same Web service using ColdFusion. I want to be able to loop through all the directorates from the Web service and populate a option tag with all the directorates. When the end user selects a specific directorate then only the departments under that directorate will appear in the department combo box.

    This is what I have so far. I am new to coldfusion and am not too sure of how to do this. I have searched for examples and am still confused. Do I have to create a component to invoke the Web service or do I just create an object to the Web Service?

    Code:
    <cfinvoke 
    webservice="http://remotehttpserver/dirsvcs/DirectorateSvcs.asmx?wsdl"
     method="getDirDeptDiv"
     returnvariable="wsDir">
     <cfinvokeargument name="strDir" value=""/>  <cfinvokeargument name="strDept" value=""/>
    <cfinvokeargument name="strDuv" value=""/>
    </cfinvoke>
    I get no errors when I do the above.
    Can someone give me a good example.

    TIA
    Mike V
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,286
    Rep Power
    968
    Can you actually hit the url http://remotehttpserver/dirsvcs/DirectorateSvcs.asmx?wsdl and see the WSDL? If so, take a close look at the parameters, types, and return values and make sure you're passing the right things.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    14
    Rep Power
    0

    Retrieving array from .NET web service


    Originally Posted by kiteless
    Can you actually hit the url http://remotehttpserver/dirsvcs/DirectorateSvcs.asmx?wsdl and see the WSDL? If so, take a close look at the parameters, types, and return values and make sure you're passing the right things.
    Yes, I can seen the info in the wsdl file. I do see a <wsdlart name = "parameters" element="tns:getDirDeptDiv" I am just trying to view all the directorates so I can fill in the directorate combo text box, and the same is true for the department and the division. How can I put all the directorates into an array?

    Mike
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,286
    Rep Power
    968
    You have to figure out what type the service is expecting as the parameters you pass and create corresponding objects to pass to it. It may help to go through the CF docs on this (http://help.adobe.com/en_US/ColdFusi...2c24-78b2.html).

IMN logo majestic logo threadwatch logo seochat tools logo