Announcement

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

    #16
    I've tried switching to an RSS feed to see if I have better luck making contact, but it gets the 404 error as well. I'm stuck. Is there a way to debug HttpProxy on the server side? Here's the code from my latest test.
    Code:
        	DataSource newsFeed = new DataSource("http://rss.slashdot.org/Slashdot/slashdot");
        	newsFeed.setRecordXPath("//default:item");
        	DataSourceField name = new DataSourceField("name", FieldType.TEXT);
        	DataSourceField link = new DataSourceField("link", FieldType.LINK);
        	newsFeed.setFields(name, link);
        	ListGrid grid = new ListGrid();
        	grid.setID("newsViewer");
        	grid.setDataSource(newsFeed);
        	grid.setAutoFetchData(true);
        	grid.setWidth100();
        	grid.setHeight("100%");
        	addChild(grid);

    Comment


      #17
      I'm think its a config problem in my eclipse project that is making it not find the HttpProxy servlet rather than the servlet not finding the actual URL. I discovered this in the RPC history tab in the developer console. It looks like the 404 is happening when trying to find RequestURI=/demoapp/sc/HttpProxy. Am I missing something in my project setup?

      Request (decoded)
      Code:
      {
          actionURL:"http://localhost:8080/demoapp/sc/HttpProxy", 
          showPrompt:false, 
          transport:"xmlHttpRequest", 
          useSimpleHttp:true, 
          promptStyle:"dialog", 
          params:{
              data:"<data xmlns:xsi=\"http://www.w3.org/2000/10/XMLSchema-instance\" xsi:type=\"xsd:Object\"><url>http://www.webservicex.net/uszip.asmx?WSDL</url><httpMethod>GET</httpMethod></data>"
          }, 
          httpMethod:null, 
          contentType:null, 
          sendNoQueue:true, 
          isProxied:true, 
          callback:{
              target:null, 
              methodName:"$37c"
          }, 
          serverOutputAsString:true, 
          data:null
      }
      Response (raw)
      Code:
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
      <title>Error 404 NOT_FOUND</title>
      </head>
      <body><h2>HTTP ERROR: 404</h2><pre>NOT_FOUND</pre>
      <p>RequestURI=/demoapp/sc/HttpProxy</p><p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>                                                
      <br/>                                                
      <br/>

      Comment


        #18
        Originally posted by jay.l.fisher
        I'm think its a config problem in my eclipse project that is making it not find the HttpProxy servlet rather than the servlet not finding the actual URL.
        That makes sense. What does your servlet mapping for HttpProxy in your web.xml look like? And also post your GWT web app URL that you use in hosted & web mode.

        Sanjiv

        Comment


          #19
          From web.xml
          Code:
              <servlet>
                  <servlet-name>HttpProxy</servlet-name>
                  <servlet-class>com.isomorphic.servlet.HttpProxyServlet</servlet-class>
              </servlet>
          
          and further down in the file ...
          
              <servlet-mapping>
                  <servlet-name>HttpProxy</servlet-name>
                  <url-pattern>/sc/HttpProxy/*</url-pattern>
              </servlet-mapping>
          Not sure what you mean by my "GWT web app URL that you use in hosted & web mode." http://localhost:8080/DemoApp.html is the URL for running the app.

          I've seen two posts here describing steps to get both client and server sides working in GWT hosted mode, but they seem to be old with a comment that they are no longer needed with SmartGWT EE. Is there a current setup guide that steps you through adding SmartGWT EE to a new GWT project. Starting with one of the samples, which is what I did originally, doesn't really give you a clear idea of what is needed.

          Comment


            #20
            I've imported the ShowcaseEE sample project into Eclipse and have verified that HttpProxy works running it locally via the GWT hosted server and browser. So it is clearly something in my project config; but what?

            Comment


              #21
              Could you find what was the problem, I'm running into the same exact problem over here.

              Comment

              Working...
              X