/** * Stops all published endpoints, taking the web services offline. */ @Override public void destroy() { for (Endpoint endpoint : this.publishedEndpoints) { endpoint.stop(); } }
/** * Create the actual Endpoint instance. * @param bean the service object to wrap * @return the Endpoint instance * @see Endpoint#create(Object) * @see Endpoint#create(String, Object) */ protected Endpoint createEndpoint(Object bean) { return (this.endpointFeatures != null ? Endpoint.create(this.bindingType, bean, this.endpointFeatures) : Endpoint.create(this.bindingType, bean)); }
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }
/** * * @return * returns HandlingReportService */ @WebEndpoint(name = "HandlingReportServicePort") public HandlingReportService getHandlingReportServicePort() { return (HandlingReportService)super.getPort(new QName("http://ws.handling.interfaces.dddsample.citerus.se/", "HandlingReportServicePort"), HandlingReportService.class); }
/** * Obtain the port stub from the given JAX-WS Service. * @param service the Service object to obtain the port from * @param portQName the name of the desired port, if specified * @return the corresponding port object as returned from * {@code Service.getPort(...)} */ protected Object getPortStub(Service service, @Nullable QName portQName) { if (this.portFeatures != null) { return (portQName != null ? service.getPort(portQName, getServiceInterface(), this.portFeatures) : service.getPort(getServiceInterface(), this.portFeatures)); } else { return (portQName != null ? service.getPort(portQName, getServiceInterface()) : service.getPort(getServiceInterface())); } }
@WebServiceClient(targetNamespace = "http://jaxws.remoting.springframework.org/", name="OrderService") public static class OrderServiceService extends Service { public OrderServiceService() throws MalformedURLException { super(new URL("http://localhost:9999/OrderService?wsdl"), new QName("http://jaxws.remoting.springframework.org/", "OrderService")); } public OrderServiceService(URL wsdlDocumentLocation, QName serviceName) { super(wsdlDocumentLocation, serviceName); } }
service = getWebServicePort(getWSDLLocation()); BindingProvider bindingProvider = (BindingProvider) service; bindingProvider.getRequestContext().put("com.sun.xml.internal.ws.transport.https.client.SSLSocketFactory", getCustomSocketFactory());
/** * @author Juergen Hoeller */ @WebFault @SuppressWarnings("serial") public class OrderNotFoundException extends Exception { private String faultInfo; public OrderNotFoundException(String message) { super(message); } public OrderNotFoundException(String message, String faultInfo) { super(message); this.faultInfo = faultInfo; } public String getFaultInfo() { return this.faultInfo; } }
@Override protected void publishEndpoint(Endpoint endpoint, WebService annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }
@WebServiceRef(value = OrderServiceService.class, wsdlLocation = "http://localhost:9999/OrderService?wsdl") public void setMyService(OrderService myService) { this.myService = myService; } }
/** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns HandlingReportService */ @WebEndpoint(name = "HandlingReportServicePort") public HandlingReportService getHandlingReportServicePort(WebServiceFeature... features) { return (HandlingReportService)super.getPort(new QName("http://ws.handling.interfaces.dddsample.citerus.se/", "HandlingReportServicePort"), HandlingReportService.class, features); }
MyWebServicesSoap port = service.getMyWebServicesSoap12(); BindingProvider provider = (BindingProvider) port; provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint);
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebService annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
/** * Stops all published endpoints, taking the web services offline. */ @Override public void destroy() { for (Endpoint endpoint : this.publishedEndpoints) { endpoint.stop(); } }
/** * Create the actual Endpoint instance. * @param bean the service object to wrap * @return the Endpoint instance * @see Endpoint#create(Object) * @see Endpoint#create(String, Object) */ protected Endpoint createEndpoint(Object bean) { return (this.endpointFeatures != null ? Endpoint.create(this.bindingType, bean, this.endpointFeatures) : Endpoint.create(this.bindingType, bean)); }
public static class ServiceAccessor { @WebServiceRef public OrderService orderService; public OrderService myService; @WebServiceRef(value = OrderServiceService.class, wsdlLocation = "http://localhost:9999/OrderService?wsdl") public void setMyService(OrderService myService) { this.myService = myService; } }
HelloService service = new HelloService(); Hello port = service.getHelloPort(); BindingProvider bindingProvider = (BindingProvider) port; bindingProvider.getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://foo:8086/HelloWhatever"); String response = port.sayHello(name);
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName())); }
@Override protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) { endpoint.publish(buildHttpContext(endpoint, annotation.serviceName())); }