SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Coldfusion Consuming Webservice

    I am having issues trying to consume a webservice. I am trying to consume the webservice located: http://www.bennadel.com/resources/we...s/Fun.cfc?wsdl

    I have never created a webservice and i found this while googling how to create a CF webservice.

    I am trying to use the following code to consume the webservice]

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <cfinvoke
    webservice="http://www.bennadel.com/resources/webservices/Fun.cfc?wsdl"
    method="GetCompliment"
    returnvariable="REQUEST.Compliment">
     
    
    <cfinvokeargument name="Gender" value="" omit="true" />
    </cfinvoke>
     
    
    <!--- Display compliment. --->
    #REQUEST.Compliment#
    
    </body>
    </html>
    But when i try to execute IE just seems to sit and says that it is waiting for "http://www.bennadel.com/resources/webservices/Fun.cfc?wsdl", it doesn't time out or say that it cannot connect. If anyone can help that would be appreciated Thanks.

  2. #2
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,068
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you should try to start with simple example and test for the existence which you can find in this article
    “Good artists copy, great artists steal” (Pablo Picasso - 1934)

  3. #3
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Aberdeen, Scotland
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it only IE that's gives you the problem or you seeing in the same problem in other browsers? Seems odd if it is a browser problem because the call is being done by the server.

    Are you seeing - http://www.bennadel.com/resources/we...s/Fun.cfc?wsdl ok when you go to it through IE?

    One thing to remember about WebServices is they're cached by ColdFusion. Make sure that you're clearing the cache, through the ColdFusion Administrator, as you're working on it. It's one thing that's caught me out a few times with them and I'm trying to debug

  4. #4
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Aberdeen, Scotland
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Donboe - Don't think that article gives him anything different from what he's already done :-|

  5. #5
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Clarkee21 View Post
    Is it only IE that's gives you the problem or you seeing in the same problem in other browsers? Seems odd if it is a browser problem because the call is being done by the server.

    Are you seeing - http://www.bennadel.com/resources/we...s/Fun.cfc?wsdl ok when you go to it through IE?

    One thing to remember about WebServices is they're cached by ColdFusion. Make sure that you're clearing the cache, through the ColdFusion Administrator, as you're working on it. It's one thing that's caught me out a few times with them and I'm trying to debug
    Yes if i go to http://www.bennadel.com/resources/we...s/Fun.cfc?wsdl i can view it fine and it opens quick. I will check into the caching and see if that helps. Thanks.

  6. #6
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Aberdeen, Scotland
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool.

    It's also worth having a look at things like HTTP sniffers. JRun has one built into it which you can find more info on using here -

    http://livedocs.adobe.com/jrun/4/Pro...ptimizing6.htm

    That'll log any HTTP requests going out your server so you can see that things are going out / coming in ok, and if not allow you to pinpoint where things might be going wrong.

    Cheers,
    James


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
  •