cURL not always working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Iain Adams

    cURL not always working

    Hey I am using cURL to connect to a web service. The web service
    returns a result. This works most the time however some times curl
    doesnt return anything, no errors and no xml (what the web service is
    supposed to return). Funnily enough this usually happens when the
    service has not been used for a little while. Once it works, it works
    every time and it usually only doesnt work once. At first I thought it
    could be the webservice but whenever I connect to it through my browser
    it works everytime. Trouble is I need t to definitely work everytime or
    return an error. Does anyone have any ideas?

  • Iain Adams

    #2
    Re: cURL not always working

    Ok it appears that the webservice does output something when it doesnt
    work, but this isnt displayed in the browser. Still doesnt return all
    the xml unless I refresh the call. So help is still needed. I have
    posted what is returned below but cant work out why the rest isnt being
    returned.

    <?xml version="1.0" encoding="utf-8"?>
    <ArrayOfAnyTy pe xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://tempuri.org/" />


    Iain Adams wrote:
    Hey I am using cURL to connect to a web service. The web service
    returns a result. This works most the time however some times curl
    doesnt return anything, no errors and no xml (what the web service is
    supposed to return). Funnily enough this usually happens when the
    service has not been used for a little while. Once it works, it works
    every time and it usually only doesnt work once. At first I thought it
    could be the webservice but whenever I connect to it through my browser
    it works everytime. Trouble is I need t to definitely work everytime or
    return an error. Does anyone have any ideas?

    Comment

    • Robert

      #3
      Re: cURL not always working

      Hey there Iain,

      If you could kindly visit pastebin.com or pastebin.ca (whichever is
      faster) and paste the part of the code that isn't properly working, I
      could help you better. Thanks -Rob
      Iain Adams wrote:
      Ok it appears that the webservice does output something when it doesnt
      work, but this isnt displayed in the browser. Still doesnt return all
      the xml unless I refresh the call. So help is still needed. I have
      posted what is returned below but cant work out why the rest isnt being
      returned.
      >
      <?xml version="1.0" encoding="utf-8"?>
      <ArrayOfAnyTy pe xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://tempuri.org/" />
      >
      >
      Iain Adams wrote:
      >
      Hey I am using cURL to connect to a web service. The web service
      returns a result. This works most the time however some times curl
      doesnt return anything, no errors and no xml (what the web service is
      supposed to return). Funnily enough this usually happens when the
      service has not been used for a little while. Once it works, it works
      every time and it usually only doesnt work once. At first I thought it
      could be the webservice but whenever I connect to it through my browser
      it works everytime. Trouble is I need t to definitely work everytime or
      return an error. Does anyone have any ideas?

      Comment

      Working...