Google Map API Weather

2012-05-22 Thread Vrushali Patil
Hi,

I want to add weather layer to google map. I am using Eclipse n Java
programming. But the API I got from gwt-maps group does not contain
weather library. Can somebody give me the right link to download.

For using the weather layer, I need to have weather library in gwt-map
WAR, which I couldn't find in anywhere.

If anyone knows the right link or have used it, please let me know.

Thanks,
Vrushali

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



org.postgresql.util.PSQLException

2012-04-30 Thread Vrushali Patil
Hi,

I am getting error when I am trying to connect to Postgresql database
from my program. The code I have written is on server side. And I have
added postgres.sql.jar in run configurations build path. I am not able
to figure out the solution. I have tried using other java classes like
BaseDatasource, etc but getting errors there too.

Program -

public Connection makeDatabaseConn(){
try{
 
Class.forName("org.postgresql.Driver");

String url = "jdbc:postgresql://
localhost:5432/my_db";
con = DriverManager.getConnection(url,
"postgres",
"password");
con.setAutoCommit(true);

}catch( Exception e )
{
  e.printStackTrace();
}

 return con;

}

Error -

org.postgresql.util.PSQLException: Your security policy has prevented
the connection from being attempted.  You probably need to grant the
connect java.net.SocketPermission to the database server host and port
that you wish to connect to.
at org.postgresql.Driver.connect(Driver.java:282)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Postgress Connection error

2012-04-29 Thread Vrushali Patil
Hi,
I am getting error when I am trying to connect to Postgresql database
from my program. The code I have written is on server side. And I have
added postgres.sql.jar in run configurations build path. I am not able
to figure out the solution. I have tried using other java classes like
BaseDatasource, etc but getting errors there too.

Program -

public Connection makeDatabaseConn(){
try{
Class.forName("org.postgresql.Driver");

String url = 
"jdbc:postgresql://localhost:5432/my_db";
con = DriverManager.getConnection(url, 
"postgres",
"password");
con.setAutoCommit(true);

}catch( Exception e )
{
  e.printStackTrace();
}

 return con;

}


Error -

org.postgresql.util.PSQLException: Your security policy has prevented
the connection from being attempted.  You probably need to grant the
connect java.net.SocketPermission to the database server host and port
that you wish to connect to.
at org.postgresql.Driver.connect(Driver.java:282)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at
com.csre.mtp.agro.Sensorwebapp.server.PollingServiceImpl.makeDatabaseConnection(PollingServiceImpl.java:
252)
at
com.csre.mtp.agro.Sensorwebapp.server.PollingServiceImpl.populateDatabase(PollingServiceImpl.java:
204)
at
com.csre.mtp.agro.Sensorwebapp.server.PollingServiceImpl.readfsxml(PollingServiceImpl.java:
177)
at
com.csre.mtp.agro.Sensorwebapp.server.PollingServiceImpl.getdata(PollingServiceImpl.java:
86)
at
com.csre.mtp.agro.Sensorwebapp.server.PollingServiceImpl.getMeasurements(PollingServiceImpl.java:
60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
112)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
569)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
60)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
78)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:369)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
15

Re: Hosted mode issues

2011-09-10 Thread Vrushali Patil
Thanks alot. My application is running properly in apache Tomcat.

Vrushali

On Sun, Sep 11, 2011 at 2:09 AM, Thomas Broyer  wrote:

> You can then open
> http://localhost:8080/tutorialDemo1/TutorialDemo1.html?gwt.codesvr=127.0.0.1:9997in
>  your browser to start running in DevMode.
> But if you change "-startupUrl Tutorialdemo1.html" to "-startupUrl
> http://localhost:8080/tutorialDemo1/TutorialDemo1.html";, then DevMode will
> propose you the above link and you just have to double-click it to launch in
> the browser.
>
> Also, make sure you compiled your app at least once, so it has a
> *.nocache.js file.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/oA1CZOUxmagJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Hosted mode issues

2011-09-10 Thread Vrushali Patil
Hi, 

I went through the link but I am not able to resolve my issue. Can you give 
me a example. I am new with Java Programming. But following through the link 
also I am getting errors.

I copied the war folder from workspace to 
C:\apache-tomcat\webapps\tutorialDemo1

and for arguments in Run confi Eclipse
-noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl 
TutorialDemo1.html -logLevel INFO -codeServerPort 9997 -war 
C:\apache-tomcat\webapps\tutorialDemo1\TutorialDemo1 
edu.xml.gwt.ibm.tutorialDemo1.TutorialDemo1

Let me know what I am doing wrong.

Thanks,
Vrushali

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_Od0MpPPZ4AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Hosted mode issues

2011-09-09 Thread Vrushali Patil
Hi I want to use GWT hostel mode so I can access other URL's using
sendRequest() without any issues. I searched all the earlier posts and
couldn't get the right solution for how to use hosted mode or edit the
Program Arguments or VM arguments.

Following code I have put in Program Arguments:
-port 8080 -server
com.google.appengine.tools.development.gwt.AppEngineLauncher -remoteUI
"${gwt_remote_ui_server_port}:${unique_id}" -startupUrl
TutorialDemo1.html -logLevel INFO -codeServerPort 9997 -war C:\Users
\Vrushu\workspace\tutorialDemo1\war
edu.xml.gwt.ibm.tutorialDemo1.TutorialDemo1

The html pafe displayed is blank.

I want the url with localhost:8080 so I can access Jar file from
Tomcat and also interact with other servers online.

Vrushali

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Apache reverse proxy

2011-09-06 Thread Vrushali Patil
Also I have gone through earlier posts too but didn't find complete details.

On Wed, Sep 7, 2011 at 10:31 AM, Vrushali Patil wrote:

> Hi,
>
> I need to setup reverse proxy for Apache Tomcat server. I am using
> RequestBuilder and Sendrequest function to send http requests and it is
> unable to access SOS Jar data in webapp folder of tomcat.. And it needs to
> interact with Tomcat and some other servers later. Since I am new with GWT
> and Java please give some example.
>
> Thanks,
> Vrushali
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Apache reverse proxy

2011-09-06 Thread Vrushali Patil
Hi,

I need to setup reverse proxy for Apache Tomcat server. I am using
RequestBuilder and Sendrequest function to send http requests and it is
unable to access SOS Jar data in webapp folder of tomcat.. And it needs to
interact with Tomcat and some other servers later. Since I am new with GWT
and Java please give some example.

Thanks,
Vrushali

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestPermissionException: URL is invalid or violates the same-origin security restriction

2011-09-06 Thread Vrushali Patil
Thanks Jen,

Can you give me a example for the third option for proxy. I am new with Java
and GWT both. It will be very helpful if I have a example. I am using Apache
Tomcat webserver. Proxy will be more useful since I will need to interact
with few more servers in future.

Regards,
Vrushali

On Tue, Sep 6, 2011 at 9:47 PM, Jens  wrote:

> Where is your app (client side javascript) hosted?
>
> If the client code is not hosted on localhost:8080 then you have the Same
> Origin Policy problem. RequestBuilder or better JavaScript can only do
> requests to URLs that belong to the same domain and port under which the
> JavaScript/HTML Page is accessible. This is implemented in all browsers for
> security reasons.
>
> Your options are:
> - Deploy everything (including client side code) to your external server
> and start the app there. That way everything will be served from
> localhost:8080.
> - use GWT's JSONPRequestBuilder which does a nifty trick to make cross
> domain/port requests work (you also have to update the remote servlets!)
> - install a webserver that supports reverse proxy (Apache, nginx, etc.) and
> redirect/proxy the remote requests. For example if you request
> http://localhost/remote/request you can proxy the request to a different
> host like http://localhost:8080/app. Thats what I do because
> it matches my production setup.
>
> -- J.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/01YeGjAItRsJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RequestPermissionException: URL is invalid or violates the same-origin security restriction

2011-09-06 Thread Vrushali Patil
Hi,

Can anyone help I am getting this error. And I have gone through all the
older posts but not able to resolve. I am trying to send request to Tomcat
server to get "SOS" data from a WAR file "52nSOSv3_WAR"

Error:

com.google.gwt.http.client.RequestPermissionException: The URL
http://localhost:8080/52nSOSv3_WAR/sos is invalid or violates the
same-origin security restriction
at com.google.gwt.http.client.RequestBuilder.doSend(RequestBuilder.java:380)
at
com.google.gwt.http.client.RequestBuilder.sendRequest(RequestBuilder.java:256)
at
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.doPost(TutorialDemo1.java:73)
at
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.http.client.RequestException: (TypeError): Access
is denied.

-
My code is

url = "http://localhost:8080/52nSOSv3_WAR/sos";;
requestquery = "REQUEST=GetCapabilities";
StringBuffer posturl = new StringBuffer();
posturl.append(URL.encode(url));

StringBuffer postquery = new StringBuffer();
postquery.append(URL.encode(requestquery));

RequestBuilder builder = new RequestBuilder(RequestBuilder.POST,
posturl.toString());
builder.setHeader("Content-Type","text/xml");

builder.sendRequest(postquery.toString(), new RequestCallback()
{
public void onError(Request request, Throwable exception) {
  // code omitted for clarity
System.out.println(exception.getCause().toString());
}

@Override
public void onResponseReceived(Request request,Response
response) {
// TODO Auto-generated method stub
String var = "";
var = response.getText();
System.out.println("This is response");
System.out.println(var);

}
  });



}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: No source code is available for type javax.xml.parsers.DocumentBuilderFactory

2011-09-01 Thread Vrushali Patil
Hi I tried using XMLParser as u suggested. But getting this error.

The code is 
public void onModuleLoad() {
 
xmlstring = callquery.xmlget_capabilities();
System.out.println(xmlstring);
System.out.println(xmlstring.length());

 
xmldoc = XMLParser.parse(xmlstring); *\\ Error at this line*
Element root = xmldoc.getDocumentElement();
System.out.println("Element = "+ root.getNodeName());   
}
 
See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.xml.client.impl.DOMParseException: Failed to 
parse: 1.
at 
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at 
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
... 9 more
Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1, 
char 94:The character :GetCapabilities b < more 11 ... 
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:278) 
at 
com.google.gwt.xml.client.impl.XMLParserImplIE6.parseImpl(XMLParserImplIE6.java)
 
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
 
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) 
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) 
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132) 
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
 
value. attribute an in used be cannot 1.
at 
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at 
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
*


Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1, 
char 94:The character ">*
*1. at 
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280) 
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47) at 
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
 
... 9 more Caused by: com.google.gwt.core.client.JavaScriptException: 
(Error): line 1, char 94:The character :GetCapabilities>*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/zQAapXBgIbwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: No source code is available for type javax.xml.parsers.DocumentBuilderFactory

2011-09-01 Thread Vrushali Patil
Hi I tried using XMLParser as u suggested. But getting this error.

The code is
public void onModuleLoad() {

xmlstring = callquery.xmlget_capabilities();
System.out.println(xmlstring);
System.out.println(xmlstring.
length());


xmldoc = XMLParser.parse(xmlstring); *\\ Error at this line*
Element root = xmldoc.getDocumentElement();
System.out.println("Element = "+ root.getNodeName());
}

See Development Mode for details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.xml.client.impl.DOMParseException: Failed to
parse: 1.
at
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
... 9 more
Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1,
char 94:The character :GetCapabilities b < more 11 ...
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:278)
at
com.google.gwt.xml.client.impl.XMLParserImplIE6.parseImpl(XMLParserImplIE6.java)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
value. attribute an in used be cannot 1.
at
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
*


Caused by: com.google.gwt.core.client.JavaScriptException: (Error): line 1,
char 94:The character ">*
*1. at
com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47) at
edu.xml.gwt.ibm.tutorialDemo1.client.TutorialDemo1.onModuleLoad(TutorialDemo1.java:61)
... 9 more Caused by: com.google.gwt.core.client.JavaScriptException:
(Error): line 1, char 94:The character :GetCapabilities>

Vrushali
*


On Thu, Sep 1, 2011 at 10:16 PM, Jens  wrote:

> In general you can only use Java classes on the client side (everything
> that is in your client and shared package) listed in:
> http://code.google.com/intl/de-DE/webtoolkit/doc/latest/RefJreEmulation.html
>
> So you can not use most of the classes in your code on client side.
>
> You have to:
> - use XMLParser (
> http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/xml/client/XMLParser.html
> )
> - write your own client side string parser that converts the xml string to
> something you want to have
> - parse the XML on server side and ask the server for the information you
> need
>
> I haven't used XMLParser yet but it seems to me that the xml string you
> want to parse isn't that long so I think it should work.
>
> -- J.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/aegt2NbIkfMJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



No source code is available for type javax.xml.parsers.DocumentBuilderFactory

2011-09-01 Thread Vrushali Patil
Hi,

I am new to Java and GWT. I am trying to parse a xml, which I have
written as stringbuilder.

1) I tried using XMLParser.parse(xmlstring); but it gave a
DOMException tat string is crossing max length. Is there any way to
work around this.

2) I used DocumentBuilderFactory ... the code is as follows. It gives
the error as

No source code is available for type
javax.xml.parsers.DocumentBuilderFactory - It is some sort of
Inheritance issue. But I am unaware of what exactly inherit name i
should be using. Please guide.

- code
---
edu.xml.gwt.ibm.tutorialDemo1.client;

import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;


import com.google.gwt.core.client.EntryPoint;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

/**
 * Entry point classes define onModuleLoad().
 */
public class TutorialDemo1 implements EntryPoint {

xmlquery callquery = new xmlquery();
String xmlstring;
/**
 * This is the entry point method.
 */
public void onModuleLoad() {

xmlstring = callquery.xmlget_capabilities();
System.out.println(xmlstring);

DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
InputSource inStream = new InputSource();
inStream.setCharacterStream(new StringReader(xmlstring));
//doc = builder.parse(new
ByteArrayInputStream(xml.getBytes("UTF-8")));
try {
DocumentBuilder builder = factory.newDocumentBuilder();
try {
Document doc = builder.parse(inStream);

System.out.println("");
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
--- xml string return function
-

public String xmlget_capabilities(){

StringBuilder xmlquery = new StringBuilder("") ;
xmlquery.append(""
+ "