S
ses
OK so I'm trying to write a client for a SOAP web service using the
dynamic proxy method.
My code is pretty much the standard:
String wsdlURL = SERVICE_WSDL;
String namespace = SERVICE_NAMESPACE;
String serviceName = SERVICE_NAME;
QName serviceQN = new QName(namespace, serviceName);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service requestedService =
(Service) serviceFactory.createService(new URL(wsdlURL), serviceQN);
However I get from glassfish:
ClassCastException com.sun.xml.rpc.client.dii.ConfiguredService cannot
be cast to javax.xml.ws.Service
I really don't get it as the import is javax.xml.ws.Service and I'm
not trying to use DII, everything else seems fine so I can only
conclude glassfish is interpreting ServiceFactory.newInstance()
wrongly, please can anyone help?
dynamic proxy method.
My code is pretty much the standard:
String wsdlURL = SERVICE_WSDL;
String namespace = SERVICE_NAMESPACE;
String serviceName = SERVICE_NAME;
QName serviceQN = new QName(namespace, serviceName);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service requestedService =
(Service) serviceFactory.createService(new URL(wsdlURL), serviceQN);
However I get from glassfish:
ClassCastException com.sun.xml.rpc.client.dii.ConfiguredService cannot
be cast to javax.xml.ws.Service
I really don't get it as the import is javax.xml.ws.Service and I'm
not trying to use DII, everything else seems fine so I can only
conclude glassfish is interpreting ServiceFactory.newInstance()
wrongly, please can anyone help?