Announcement
Collapse
No announcement yet.
X
-
Could you find what was the problem, I'm running into the same exact problem over here.
-
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?
Leave a comment:
-
From web.xml
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.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>
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.
Leave a comment:
-
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.Originally posted by jay.l.fisherI'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.
Sanjiv
Leave a comment:
-
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)
Response (raw)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 }
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/>
Leave a comment:
-
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);
Leave a comment:
-
The generic WSDL sample at http://www.smartclient.com/smartgwtee/showcase/#data_integration_server_wsdl_generic never finishes loading the WSDL. It just keeps showing the "Please try again in a moment. Still loading web services descriptor" message. I tried using http://www.webservicex.net/uszip.asmx?WSDL locally and its the same as the other sites; browser finds it, java test code finds it and HttpProxy does not.
Leave a comment:
-
Yes, Google removed the SOAP version of their search service and we have not found a good replacement demo yet. What about the other sample:
http://www.smartclient.com/smartgwtee/showcase/#data_integration_server_wsdl_generic
Leave a comment:
-
Is see now that the showcase is looking for a URL that is actually not there. http://api.google.com/GoogleSearch.wsdl doesn't exist per any browser I point at it. My URL does exist on the other hand, only the HttpProxy can't find it.
http://www.webservicex.net/usaddressverification.asmx?WSDL. It's slow, but it does respond. Is there a wait limit that could be too short?
Leave a comment:
-
I tried the showcase example at http://www.smartclient.com/smartgwtee/showcase/#data_integration_server_wsdl_fetch from a different machine using a different browser and it gets the 404 error. Not sure why a different environment would make a difference when the showcase proxy is running at www.smartclient.com.
Leave a comment:
-
As a sanity check can you try running from a different machine / environment? The Smart GWT EE webservice samples work fine and others have been using it successfully too.
Leave a comment:
-
A little test java app runs just fine and gets the WSDL back as expected. Here's the code in case it helps. I'm just running in from the same eclipse instance that I'm using for the SmartGWT development. I pass it the same URL that I'm passing to the loadWSDL function. In this case it is a free address verification service at http://www.webservicex.net/usaddressverification.asmx?WSDL
Code:import java.net.*; import java.io.*; public class SocketCat { public static void main(String[] args) { for (int i = 0; i < args.length; i++) { int port = 80; String file = "/"; try { URL u = new URL(args[i]); if (u.getPort() != -1) port = u.getPort(); if (!(u.getProtocol().equalsIgnoreCase("http"))) { System.err.println("I only understand http."); } if (!(u.getFile().equals(""))) file = u.getFile(); Socket s = new Socket(u.getHost(), port); OutputStream theOutput = s.getOutputStream(); OutputStreamWriter out = new OutputStreamWriter(theOutput); out.write("GET " + file + " HTTP/1.0\r\n"); out.write("Accept: text/plain, text/html, text/*\r\n"); out.write("\r\n"); out.flush(); theOutput.flush(); InputStream in = s.getInputStream(); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedReader(isr); int c; while ((c = br.read()) != -1) { System.out.print((char) c); } } catch (MalformedURLException ex) { System.err.println(args[i] + " is not a valid URL"); } catch (IOException ex) { System.err.println(ex); } } } }
Leave a comment:
-
Quite strange. It could be possible that the proxy is returning 404 even though the underlying error condition is something else.
Probably worth trying to write a simple Java program that connects to the URL and reads the contents. It will help narrow down the problem. You can use the sample code found here to do this.
Leave a comment:
-
The Google Search WebService example at http://www.smartclient.com/smartgwtee/showcase/#data_integration_server_wsdl_fetch has the same problem. It gets a 404 error as well.
Leave a comment:
Leave a comment: