GWT server side access to web service from another server

134 views
Skip to first unread message

Alcor

unread,
Apr 21, 2009, 2:35:29 PM4/21/09
to Google Web Toolkit
Hi,

I'm creating a GWT (1.6) app from scratch and I have done the current
thing:


User Web Browser (1)
GWT client-side
|
(gwt rpc)
V
GWT server-side (2)
|
(JAX ws rpc)
V
another server (3)


everything's done :
- the gwt rpc between (1) and (2)
- the web service on (3) is done with JAX-WS wsgen
- the client web service on (2) is done with JAX-WS wsimport

so everything's ok BUT :
the client web service class located on (2) uses the JAX-WS annotation
@WebServiceRef to populate the 'service' static var and the value is
'null'.

The workaround : to comment @WebServiceRef and uncomment (a) - see
code below : manually instantiate the generated artifact (by
wsimport). This is OK.
but why is it not using the annotation @WebServiceRef with GWT?

here is the class :
______________________________
package fr.server.ws_client;
import javax.xml.ws.WebServiceRef;
import fr.server.ws_client.gen.Info;
import fr.server.ws_client.gen.InfoService;

public class InfoClient {
@WebServiceRef(wsdlLocation="http://localhost:9091/Info?wsdl") static
InfoService service;

public static String getServerVersion() {
String server_version;
try {
server_version = "InfoClient / getServerVersion : try";
InfoClient client = new InfoClient();
server_version = client.doGetServerVersion();
} catch (Exception e) {
server_version = "InfoClient / getServerVersion : catch";
e.printStackTrace();
}
return server_version;
}

public String doGetServerVersion() {
try {
//(a) InfoService service = new InfoService();
Info port = service.getInfoPort();
return port.getServerVersion();
} catch (Exception e) {
e.printStackTrace();
return "InfoClient / doGetServerVersion : catch";
}
}
}

shane....@gmail.com

unread,
Jun 1, 2009, 3:46:27 AM6/1/09
to Google Web Toolkit
Hi there,

Are you using the Google App Engine by any chance? The reason I ask is
that I am trying to develop a front-end UI using GWT and have been
able to developed a proxy server using GWT-RPC with intentions to
connect to an existing Web Service (very similar to your architecture
you have described). I have used 'wsimport' to can generate a jax-ws
proxy using the WSDL all fine but I am getting errors as below:

javax.jms.soap.SOAPBinding is not supported by Google App Engines JVM
environment,
javax.jms.WebParam is not supported by Google App Engines JVM
environment,
javax.jms.WebMethod is not supported by Google App Engines JVM
environment, and
javax.jms.WebResult is not supported by Google App Engines JVM
environment

Does anyone have an idea of how I could go about fixing this?

On Apr 22, 3:35 am, Alcor <alcor.wal...@gmail.com> wrote:
> Hi,
>
> I'm creating aGWT(1.6) app from scratch and I have done the current
> thing:
>
> User Web Browser (1)GWTclient-side
>           |
>      (gwtrpc)
>           VGWTserver-side (2)
>           |
>    (JAXws rpc)
>           V
> another server (3)
>
> everything's done :
> - thegwtrpc between (1) and (2)
> - the web service on (3) is done withJAX-WS wsgen
> - the client web service on (2) is done withJAX-WS wsimport
>
> so everything's ok BUT :
> the client web service class located on (2) uses theJAX-WS annotation
Reply all
Reply to author
Forward
0 new messages