public JaxWsClientProxy(Client c, Binding b) { super(c); this.binding = b; setupEndpointAddressContext(getClient().getEndpoint()); this.builder = new EndpointReferenceBuilder((JaxWsEndpointImpl)getClient().getEndpoint()); } public void close() throws IOException {
private boolean addressChanged(String address) { return !(address == null || getClient().getEndpoint().getEndpointInfo() == null || address.equals(getClient().getEndpoint().getEndpointInfo().getAddress())); }
@Override public void initialize(Client client, Bus bus) { if (contraints == null) { return; } initializeProvider(client, bus); CertConstraints c = CertConstraintsJaxBUtils.createCertConstraints(contraints); client.getEndpoint().put(CertConstraints.class.getName(), c); }
@Override protected ClientProxy clientClientProxy(Client c) { JaxWsClientProxy cp = new JaxWsClientProxy(c, ((JaxWsEndpointImpl)c.getEndpoint()).getJaxwsBinding()); cp.getRequestContext().putAll(this.getProperties()); buildHandlerChain(cp); return cp; }
Endpoint endpoint = getClient().getEndpoint(); String address = endpoint.getEndpointInfo().getAddress(); MethodDispatcher dispatcher = (MethodDispatcher)endpoint.getService().get( } finally { if (addressChanged(address)) { setupEndpointAddressContext(getClient().getEndpoint());
DispatchImpl(Client client, Service.Mode m, JAXBContext ctx, Class<T> clazz) { this.binding = ((JaxWsEndpointImpl)client.getEndpoint()).getJaxwsBinding(); this.builder = new EndpointReferenceBuilder((JaxWsEndpointImpl)client.getEndpoint()); context = ctx; cl = clazz; setupEndpointAddressContext(client.getEndpoint()); addInvokeOperation(false); addInvokeOperation(true); client.getOutInterceptors(). add(new MessageModeOutInterceptor(saajOut, client.getEndpoint() .getBinding().getBindingInfo().getName())); client.getInInterceptors().add(new SAAJInInterceptor()); client.getInInterceptors() .add(new MessageModeInInterceptor(clazz, client.getEndpoint() .getBinding().getBindingInfo().getName()));
= ((JaxWsClientEndpointImpl)client.getEndpoint()).getFeatures(); List<Feature> allFeatures; if (client.getBus().getFeatures() != null) { client.getEndpoint().getBinding().getBindingInfo(), hasOpName); if (findDispatchOp && !payloadOPMap.isEmpty()) { QName payloadElementName = null; client.getEndpoint().getBinding().getBindingInfo(), hasOpName); BindingOperationInfo dbop = client.getEndpoint().getBinding().getBindingInfo() .getOperation(dispatchedOpName); if (dbop != null) {
@SuppressWarnings("unchecked") private Object invokeAsync(Method method, final BindingOperationInfo oi, Object[] params) throws Exception { client.setExecutor(getClient().getEndpoint().getExecutor()); AsyncHandler<Object> handler; if (params.length > 0 && params[params.length - 1] instanceof AsyncHandler) { handler = (AsyncHandler<Object>)params[params.length - 1]; Object[] newParams = new Object[params.length - 1]; for (int i = 0; i < newParams.length; i++) { newParams[i] = params[i]; } params = newParams; } else { handler = null; } ClientCallback callback = new JaxwsClientCallback<Object>(handler, this) { @Override protected Throwable mapThrowable(Throwable t) { if (t instanceof Exception) { t = mapException(null, oi, (Exception)t); } return t; } }; Response<Object> ret = new JaxwsResponseCallback<>(callback); client.invoke(callback, oi, params); return ret; }
public ClientProxy(Client c) { endpoint = c.getEndpoint(); client = c; } public void close() throws IOException {
private void addInvokeOperation(QName operationName, boolean oneWay) { ServiceInfo info = client.getEndpoint().getEndpointInfo().getService(); OperationInfo invokeOpInfo = info.getInterface() .getOperation(oneWay ? INVOKE_ONEWAY_QNAME : INVOKE_QNAME); OperationInfo opInfo = info.getInterface().addOperation(operationName); opInfo.setInput(invokeOpInfo.getInputName(), invokeOpInfo.getInput()); if (!oneWay) { opInfo.setOutput(invokeOpInfo.getOutputName(), invokeOpInfo.getOutput()); } for (BindingInfo bind : client.getEndpoint().getEndpointInfo().getService().getBindings()) { BindingOperationInfo bo = new BindingOperationInfo(bind, opInfo); bind.addOperation(bo); } }
private void addInvokeOperation(boolean oneWay) { String name = oneWay ? INVOKE_ONEWAY_NAME : INVOKE_NAME; ServiceInfo info = client.getEndpoint().getEndpointInfo().getService(); OperationInfo opInfo = info.getInterface() .addOperation(oneWay ? INVOKE_ONEWAY_QNAME : INVOKE_QNAME); MessageInfo mInfo = opInfo.createMessage(new QName(DISPATCH_NS, name + "Request"), Type.INPUT); opInfo.setInput(name + "Request", mInfo); MessagePartInfo mpi = mInfo.addMessagePart("parameters"); if (context == null) { mpi.setTypeClass(cl); } mpi.setElement(true); if (!oneWay) { mInfo = opInfo.createMessage(new QName(DISPATCH_NS, name + "Response"), Type.OUTPUT); opInfo.setOutput(name + "Response", mInfo); mpi = mInfo.addMessagePart("parameters"); mpi.setElement(true); if (context == null) { mpi.setTypeClass(cl); } } for (BindingInfo bind : client.getEndpoint().getEndpointInfo().getService().getBindings()) { BindingOperationInfo bo = new BindingOperationInfo(bind, opInfo); bind.addOperation(bo); } }
public Future<?> invokeAsync(T obj, AsyncHandler<T> asyncHandler) { checkError(); client.setExecutor(getClient().getEndpoint().getExecutor()); } else { hasOpName = true; BindingOperationInfo bop = client.getEndpoint().getBinding() .getBindingInfo().getOperation(opName); if (bop == null) {
} else { hasOpName = true; BindingOperationInfo bop = client.getEndpoint().getBinding() .getBindingInfo().getOperation(opName); if (bop == null) {
client.getEndpoint().setExecutor(executor); client.getEndpoint().getEndpointInfo().setAddress(clientFac.getAddress()); } else { client.getEndpoint().getEndpointInfo().setAddress(portInfo.getAddress());
client.getEndpoint().setExecutor(executor); client.setExecutor(executor); JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) client.getEndpoint(); configureObject(jaxwsEndpoint); @SuppressWarnings("rawtypes")
private boolean addressChanged(String address) { return !(address == null || getClient().getEndpoint().getEndpointInfo() == null || address.equals(getClient().getEndpoint().getEndpointInfo().getAddress())); }
@Override public void initialize(Client client, Bus bus) { client.getEndpoint().getOutInterceptors().add(new JMSConduitConfigOutInterceptor()); super.initialize(client, bus); } @Override
@Override protected ClientProxy clientClientProxy(Client c) { JaxWsClientProxy cp = new JaxWsClientProxy(c, ((JaxWsEndpointImpl)c.getEndpoint()).getJaxwsBinding()); cp.getRequestContext().putAll(this.getProperties()); buildHandlerChain(cp); return cp; }
private WSS4JOutInterceptor addToClient(Object svc) { Client client = ClientProxy.getClient(svc); WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(); client.getEndpoint().getOutInterceptors().add(wssOut); client.getOutInterceptors().add(wssOut); return wssOut; }
@Override public void initialize(Client client, Bus bus) { Endpoint endpoint = client.getEndpoint(); Policy p = initializeEndpointPolicy(endpoint, bus); PolicyEngine pe = bus.getExtension(PolicyEngine.class); EndpointInfo ei = endpoint.getEndpointInfo(); EndpointPolicy ep = pe.getClientEndpointPolicy(ei, null, null); pe.setClientEndpointPolicy(ei, ep.updatePolicy(p, createMessage(endpoint, bus))); }