public static BindingImpl create(@NotNull BindingID bindingId, WebServiceFeature[] features) { // Override the BindingID from the features for (WebServiceFeature feature : features) { if (feature instanceof BindingTypeFeature) { BindingTypeFeature f = (BindingTypeFeature) feature; bindingId = BindingID.parse(f.getBindingId()); } } if (bindingId.equals(BindingID.XML_HTTP)) return new HTTPBindingImpl(features); else return new SOAPBindingImpl(bindingId, features); }
@Override public Endpoint createAndPublishEndpoint(String address, Object implementor) { Endpoint endpoint = new EndpointImpl(BindingID.parse(implementor.getClass()), implementor); endpoint.publish(address); return endpoint; }
@Override public Endpoint createEndpoint(String bindingId, Object implementor) { return new EndpointImpl( (bindingId != null) ? BindingID.parse(bindingId) : BindingID.parse(implementor.getClass()), implementor); }