Methods Summary |
---|
private static void | Init()Convert invocation method to a constant for easier processing.
serviceMethodTypes = new HashMap();
fullWsdlIllegalMethods = new HashSet();
noWsdlIllegalMethods = new HashSet();
try {
Class noParams[] = new Class[0];
Class serviceClass = javax.xml.ws.Service.class;
//
// Map Service method to method type.
//
Method addPort = serviceClass.getDeclaredMethod
("addPort", new Class[] {QName.class, URI.class, String.class});
serviceMethodTypes.put(addPort,
new Integer(ADD_PORT));
Method createDispatchClass = serviceClass.getDeclaredMethod
("createDispatch", new Class[] {QName.class, Class.class, Service.Mode.class});
serviceMethodTypes.put(createDispatchClass,
new Integer(CREATE_DISPATCH_CLASS));
Method createDispatchContext = serviceClass.getDeclaredMethod
("createDispatch", new Class[] {QName.class, JAXBContext.class, Service.Mode.class});
serviceMethodTypes.put(createDispatchContext,
new Integer(CREATE_DISPATCH_CONTEXT));
Method getExecutor = serviceClass.getDeclaredMethod
("getExecutor", noParams);
serviceMethodTypes.put(getExecutor,
new Integer(GET_EXECUTOR));
Method setExecutor = serviceClass.getDeclaredMethod
("setExecutor", new Class[] {Executor.class});
serviceMethodTypes.put(setExecutor,
new Integer(SET_EXECUTOR));
Method getHandlerResolver = serviceClass.getDeclaredMethod
("getHandlerResolver", noParams);
serviceMethodTypes.put(getHandlerResolver,
new Integer(GET_HANDLER_RESOLVER));
Method getPortContainerManaged = serviceClass.getDeclaredMethod
("getPort", new Class[] { Class.class });
serviceMethodTypes.put(getPortContainerManaged,
new Integer(GET_PORT_CONTAINER_MANAGED));
Method getPortClientManaged = serviceClass.getDeclaredMethod
("getPort", new Class[] { QName.class, Class.class });
serviceMethodTypes.put(getPortClientManaged,
new Integer(GET_PORT_CLIENT_MANAGED));
Method getPorts = serviceClass.getDeclaredMethod
("getPorts", noParams);
serviceMethodTypes.put(getPorts, new Integer(GET_PORTS));
Method getServiceName = serviceClass.getDeclaredMethod
("getServiceName", noParams);
serviceMethodTypes.put(getServiceName,
new Integer(GET_SERVICE_NAME));
Method setHandlerResolver = serviceClass.getDeclaredMethod
("setHandlerResolver", new Class[] {HandlerResolver.class});
serviceMethodTypes.put(setHandlerResolver,
new Integer(SET_HANDLER_RESOLVER));
Method getWsdlLocation = serviceClass.getDeclaredMethod
("getWSDLDocumentLocation", noParams);
serviceMethodTypes.put(getWsdlLocation,
new Integer(GET_WSDL_LOCATION));
} catch(NoSuchMethodException nsme) {}
noWsdlIllegalMethods.add(new Integer(GET_PORT_CONTAINER_MANAGED));
noWsdlIllegalMethods.add(new Integer(GET_PORT_CLIENT_MANAGED));
noWsdlIllegalMethods.add(new Integer(GET_PORTS));
noWsdlIllegalMethods.add(new Integer(GET_SERVICE_NAME));
noWsdlIllegalMethods.add(new Integer(GET_WSDL_LOCATION));
// This case shouldn't happen since if service-ref has generated
// service and no WSDL it won't get past deployment, but it's here
// for completeness.
noWsdlIllegalMethods.add(new Integer(GENERATED_SERVICE_METHOD));
|
public void | addPort(javax.xml.namespace.QName q, java.lang.String id, java.lang.String addr)
checkUnsupportedMethods(ADD_PORT);
serviceDelegate.addPort(q, id, addr);
return;
|
private void | checkUnsupportedMethods(int methodType)
Set illegalMethods = fullWsdl ?
fullWsdlIllegalMethods : noWsdlIllegalMethods;
if( illegalMethods.contains(new Integer(methodType)) ) {
throw new UnsupportedOperationException();
}
return;
|
public javax.xml.ws.Dispatch | createDispatch(javax.xml.namespace.QName qName, java.lang.Class aClass, javax.xml.ws.Service$Mode mode)
checkUnsupportedMethods(CREATE_DISPATCH_CLASS);
return null;
|
public javax.xml.ws.Dispatch | createDispatch(javax.xml.namespace.QName qName, javax.xml.bind.JAXBContext jaxbContext, javax.xml.ws.Service$Mode mode)
checkUnsupportedMethods(CREATE_DISPATCH_CONTEXT);
return null;
|
public java.util.concurrent.Executor | getExecutor()
checkUnsupportedMethods(GET_EXECUTOR);
return serviceDelegate.getExecutor();
|
public javax.xml.ws.handler.HandlerResolver | getHandlerResolver()
checkUnsupportedMethods(GET_HANDLER_RESOLVER);
return serviceDelegate.getHandlerResolver();
|
public java.lang.Object | getPort(javax.xml.namespace.QName q, java.lang.Class sei)
checkUnsupportedMethods(GET_PORT_CLIENT_MANAGED);
return serviceDelegate.getPort(q, sei);
|
public java.lang.Object | getPort(java.lang.Class sei)
checkUnsupportedMethods(GET_PORT_CONTAINER_MANAGED);
String serviceEndpointInterface = sei.getName();
ServiceRefPortInfo portInfo =
serviceRef.getPortInfo(serviceEndpointInterface);
Object retVal;
if( (portInfo != null) && portInfo.hasWsdlPort() ) {
retVal = getPort(portInfo.getWsdlPort(), sei);
} else {
retVal = serviceDelegate.getPort(sei);
}
return retVal;
|
public java.util.Iterator | getPorts()
checkUnsupportedMethods(GET_PORTS);
return serviceDelegate.getPorts();
|
public javax.xml.namespace.QName | getServiceName()
checkUnsupportedMethods(GET_SERVICE_NAME);
return serviceRef.getServiceName();
|
public java.net.URL | getWSDLDocumentLocation()
checkUnsupportedMethods(SET_HANDLER_RESOLVER);
return wsdlLocation;
|
public void | setExecutor(java.util.concurrent.Executor obj)
checkUnsupportedMethods(SET_EXECUTOR);
serviceDelegate.setExecutor(obj);
return;
|
public void | setHandlerResolver(javax.xml.ws.handler.HandlerResolver resolver)
checkUnsupportedMethods(SET_HANDLER_RESOLVER);
serviceDelegate.setHandlerResolver(resolver);
return;
|