Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issues with HttpProxy

    Greetings,

    We're using version 8. I must be confused about the HttpProxy. Whenver I set a datasource url to an external datasource, just like in the RSS example, I get a transport 404 error with "(via proxy:" and the name of my server. I've looked through the docs and I don't see any special settings that I need for an outside URL to work. Why can't I use outside URLs for a data source?

    Code:
    isc.DataSource.create({
        ID: "newsFeed",
        showPrompt:false,
        dataURL: "http://www.propertycasualty360.com/?f=rss",
        recordXPath: "/channel/item",
        dataFormat:"xml",
        fields: [
            { name: "pubDate", width:150, type:"date", align:"left" },
            { name: "title", title:"Headline", type:"text", width:500, showHover:true},
            { name: "description", title:"Description", type:"text", width:500, showHover:true},
            { name: "link_content", valueXPath:"guid", type:"text", hidden:true}
        ]
    });
    
    http://vkurapati.highlinedata.com:81/iap/include/isomorphic/HttpProxy), response: {status: -90,
    data: "Transport error - HTTP code: 404 for URL..."[166],
    httpResponseCode: 404,
    transactionNum: 5,
    clientContext: Obj,
    context: Obj,
    startRow: 0,
    endRow: 0,
    totalRows: 0}

    #2
    On the server, web.xml specifies which URL is handled by the HttpProxyServlet.
    By default this is set to /isomorphic/HttpProxy/*.

    On the client side, the proxy URL is put together by isomorphicDir and appending "HttpProxy". If you've modified your isomorphicDir, you may need to update the web.xml to match - in this case it looks like /iap/include/isomorphic/HttpProxy/* should do it.

    Comment


      #3
      Yes I had checked web.xml before posting, but I double checked it again and everything seems set properly (and like the other web.xml settings). I interpreted the message as coming from the httpproxyservlet, rather than tomcat, but maybe it's tomcat. In any case, it just won't work. I've tried /iap/include/isomorphic/HttpProxy/* (although this shouldn't work because the mapping doesn't need iap)
      I've also tried
      /include/isomorphic/HttpProxy/*
      and
      /include/isomorphic/HttpProxy

      Here is the message:
      Code:
      Transport error - HTTP code: 404 for URL: http://feeds.feedburner.com/NationalUnderwriterLifeAndHealthBreakingNews (via proxy: http://vkurapati.highlinedata.com:81/iap/include/isomorphic/HttpProxy)
      And here is the web.xml (including IDACall for comparison)
      Code:
          <servlet>
              <servlet-name>IDACall</servlet-name>
              <servlet-class>com.isomorphic.servlet.IDACall</servlet-class>
          </servlet>
        <servlet>
         <servlet-name>HttpProxyServlet</servlet-name>
         <servlet-class>com.isomorphic.servlet.HttpProxyServlet</servlet-class>
        </servlet>
      Code:
          <servlet-mapping>
              <servlet-name>IDACall</servlet-name>
              <url-pattern>/include/isomorphic/IDACall</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
              <servlet-name>HttpProxyServlet</servlet-name>
              <url-pattern>/include/isomorphic/HttpProxy/*</url-pattern>
          </servlet-mapping>
      Any ideas?

      Comment


        #4
        It does indeed look like your proxy is installed correctly and is working. This means the target URL is really returning 404. If you don't get the same result with a browser, consider if this may because when going through the proxy, the HTTP request is coming *from the server* not from your browser. This means it will not contain cookies, may resolve site URLs differently, or may be subject to different security rules (eg firewalls).

        Comment


          #5
          In fact, a likely possibility is that your browser has proxy settings that allow it to bypass a firewall whereas the server does not have such settings. You can provide proxy settings to the HTTPProxy via web.xml settings - see the JavaDoc for the class for specific settings.

          Comment

          Working...
          X