1 5 6 package javax.xml.ws; 7 8 import javax.xml.namespace.QName ; 9 import java.util.Iterator ; 10 import javax.xml.ws.handler.HandlerResolver; 11 import javax.xml.bind.JAXBContext; 12 import javax.xml.ws.spi.ServiceDelegate; 13 import javax.xml.ws.spi.Provider; 14 15 45 public class Service { 46 47 private ServiceDelegate delegate; 48 53 public enum Mode { MESSAGE, PAYLOAD }; 54 55 protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { 56 delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, 57 serviceName, 58 this.getClass()); 59 } 60 61 62 90 public <T> T getPort(QName portName, 91 Class <T> serviceEndpointInterface) { 92 return delegate.getPort(portName, serviceEndpointInterface); 93 } 94 95 131 public <T> T getPort(QName portName, 132 Class <T> serviceEndpointInterface, WebServiceFeature... features) { 133 return delegate.getPort(portName, serviceEndpointInterface, features); 134 } 135 136 137 160 public <T> T getPort(Class <T> serviceEndpointInterface) { 161 return delegate.getPort(serviceEndpointInterface); 162 } 163 164 165 197 public <T> T getPort(Class <T> serviceEndpointInterface, 198 WebServiceFeature... features) { 199 return delegate.getPort(serviceEndpointInterface, features); 200 } 201 202 203 275 public <T> T getPort(EndpointReference endpointReference, 276 Class <T> serviceEndpointInterface, WebServiceFeature... features) { 277 return delegate.getPort(endpointReference, serviceEndpointInterface, features); 278 } 279 280 295 public void addPort(QName portName, String bindingId, String endpointAddress) { 296 delegate.addPort(portName, bindingId, endpointAddress); 297 } 298 299 300 324 public <T> Dispatch<T> createDispatch(QName portName, Class <T> type, Mode mode) { 325 return delegate.createDispatch(portName, type, mode); 326 } 327 328 329 359 public <T> Dispatch<T> createDispatch(QName portName, Class <T> type, 360 Service.Mode mode, WebServiceFeature... features) { 361 return delegate.createDispatch(portName, type, mode, features); 362 } 363 364 365 434 public <T> Dispatch<T> createDispatch(EndpointReference endpointReference, 435 Class <T> type, Service.Mode mode, 436 WebServiceFeature... features) { 437 return delegate.createDispatch(endpointReference, type, mode, features); 438 } 439 440 459 public Dispatch<Object > createDispatch(QName portName, JAXBContext context, 460 Mode mode) { 461 return delegate.createDispatch(portName, context, mode); 462 } 463 464 465 492 public Dispatch<Object > createDispatch(QName portName, 493 JAXBContext context, Service.Mode mode, WebServiceFeature... features) { 494 return delegate.createDispatch(portName, context, mode, features); 495 } 496 497 498 565 public Dispatch<Object > createDispatch(EndpointReference endpointReference, 566 JAXBContext context, Service.Mode mode, 567 WebServiceFeature... features) { 568 return delegate.createDispatch(endpointReference, context, mode, features); 569 } 570 571 575 public QName getServiceName() { 576 return delegate.getServiceName(); 577 } 578 579 589 public Iterator <javax.xml.namespace.QName > getPorts() { 590 return delegate.getPorts(); 591 } 592 593 599 public java.net.URL getWSDLDocumentLocation() { 600 return delegate.getWSDLDocumentLocation(); 601 } 602 603 610 public HandlerResolver getHandlerResolver() { 611 return delegate.getHandlerResolver(); 612 } 613 614 627 public void setHandlerResolver(HandlerResolver handlerResolver) { 628 delegate.setHandlerResolver(handlerResolver); 629 } 630 631 642 public java.util.concurrent.Executor getExecutor() { 643 return delegate.getExecutor(); 644 } 645 646 661 public void setExecutor(java.util.concurrent.Executor executor) { 662 delegate.setExecutor(executor); 663 } 664 665 677 public static Service create( 678 java.net.URL wsdlDocumentLocation, 679 QName serviceName) { 680 return new Service(wsdlDocumentLocation, serviceName); 681 } 682 683 690 public static Service create(QName serviceName) { 691 return new Service(null, serviceName); 692 } 693 } 694 695 696 697 | Popular Tags |