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";
                }
        }
}

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to