public Future<?> invokeAsync(T obj, AsyncHandler<T> asyncHandler) { checkError(); client.setExecutor(getClient().getEndpoint().getExecutor()); boolean hasOpName; QName opName = (QName)getRequestContext().get(MessageContext.WSDL_OPERATION); if (opName == null) { hasOpName = false; .getBindingInfo().getOperation(opName); if (bop == null) { addInvokeOperation(opName, false); opName = calculateOpName(holder, opName, hasOpName); throw mapException(ex);
Dispatch<T> disp = new DispatchImpl<>(client, mode, context, type); configureObject(disp); return disp;
@SuppressWarnings("unchecked") public T invoke(T obj, boolean isOneWay) { checkError(); try { if (obj instanceof SOAPMessage) { getRequestContext().put("unwrap.jaxb.element", unwrapProperty); QName opName = (QName)getRequestContext().get(MessageContext.WSDL_OPERATION); .getBindingInfo().getOperation(opName); if (bop == null) { addInvokeOperation(opName, isOneWay); opName = calculateOpName(holder, opName, hasOpName); return null; } catch (Exception ex) { throw mapException(ex);
context = ctx; cl = clazz; setupEndpointAddressContext(client.getEndpoint()); addInvokeOperation(false); addInvokeOperation(true); if (m == Service.Mode.MESSAGE && binding instanceof SOAPBinding) { if (DataSource.class.isAssignableFrom(clazz)) {
public void addVersionTransformer(Dispatch<Object> dispatch) { Map<String, String> nsMap = new HashMap<>(); nsMap.put("tns", NS_1_1); nsMap.put("wsa", getAddressingNamespace()); ((DispatchImpl)dispatch).getClient().getEndpoint().getEndpointInfo() .setProperty("soap.env.ns.map", nsMap); } public QName getServiceName() {
public void addVersionTransformer(Dispatch<Object> dispatch) { Map<String, String> nsMap = new HashMap<>(); nsMap.put("tns", NS_1_1); nsMap.put("wsa", getAddressingNamespace()); ((DispatchImpl)dispatch).getClient().getEndpoint().getEndpointInfo() .setProperty("soap.env.ns.map", nsMap); } public QName getServiceName() {
context = ctx; cl = clazz; setupEndpointAddressContext(client.getEndpoint()); addInvokeOperation(false); addInvokeOperation(true); if (m == Service.Mode.MESSAGE && binding instanceof SOAPBinding) { if (DataSource.class.isAssignableFrom(clazz)) {
public void addVersionTransformer(Dispatch<Object> dispatch) { StaxTransformFeature feature = new StaxTransformFeature(); Map<String, String> outElements = new HashMap<>(); outElements.put("{" + NS_1_1 + "}*", "{" + NS_1_0 + "}*"); outElements.put("{" + INSTANCE_1_1.getAddressingNamespace() + "}*", "{" + getAddressingNamespace() + "}*"); feature.setOutTransformElements(outElements); Map<String, String> inElements = new HashMap<>(); inElements.put("{" + NS_1_0 + "}*", "{" + NS_1_1 + "}*"); inElements.put("{" + getAddressingNamespace() + "}*", "{" + INSTANCE_1_1.getAddressingNamespace() + "}*"); feature.setInTransformElements(inElements); feature.initialize(((DispatchImpl)dispatch).getClient(), ((DispatchImpl)dispatch).getClient().getBus()); Map<String, String> nsMap = new HashMap<>(); nsMap.put("tns", NS_1_0); nsMap.put("wsa", getAddressingNamespace()); ((DispatchImpl)dispatch).getClient().getEndpoint().getEndpointInfo() .setProperty("soap.env.ns.map", nsMap); } public QName getServiceName() {
Dispatch<T> disp = new DispatchImpl<>(client, mode, context, type); configureObject(disp); return disp;
public void addVersionTransformer(Dispatch<Object> dispatch) { StaxTransformFeature feature = new StaxTransformFeature(); Map<String, String> outElements = new HashMap<>(); outElements.put("{" + NS_1_1 + "}*", "{" + NS_1_0 + "}*"); outElements.put("{" + INSTANCE_1_1.getAddressingNamespace() + "}*", "{" + getAddressingNamespace() + "}*"); feature.setOutTransformElements(outElements); Map<String, String> inElements = new HashMap<>(); inElements.put("{" + NS_1_0 + "}*", "{" + NS_1_1 + "}*"); inElements.put("{" + getAddressingNamespace() + "}*", "{" + INSTANCE_1_1.getAddressingNamespace() + "}*"); feature.setInTransformElements(inElements); feature.initialize(((DispatchImpl)dispatch).getClient(), ((DispatchImpl)dispatch).getClient().getBus()); Map<String, String> nsMap = new HashMap<>(); nsMap.put("tns", NS_1_0); nsMap.put("wsa", getAddressingNamespace()); ((DispatchImpl)dispatch).getClient().getEndpoint().getEndpointInfo() .setProperty("soap.env.ns.map", nsMap); } public QName getServiceName() {
@SuppressWarnings("unchecked") public T invoke(T obj, boolean isOneWay) { checkError(); try { if (obj instanceof SOAPMessage) { getRequestContext().put("unwrap.jaxb.element", unwrapProperty); QName opName = (QName)getRequestContext().get(MessageContext.WSDL_OPERATION); .getBindingInfo().getOperation(opName); if (bop == null) { addInvokeOperation(opName, isOneWay); opName = calculateOpName(holder, opName, hasOpName); return null; } catch (Exception ex) { throw mapException(ex);
public <T> Dispatch<T> configureDispatch(Dispatch<T> dispatch) { if (!(dispatch instanceof DispatchImpl<?>) || (serviceName == null && configuration == null)) { return null; } final DispatchImpl<?> di = (DispatchImpl<?>) dispatch; final Client cl = di.getClient(); try { String jmsAddr = getJmsAddress(); cl.getRequestContext().put(Message.ENDPOINT_ADDRESS, jmsAddr); cl.getEndpoint().getEndpointInfo().setAddress(jmsAddr); } catch (Exception e) { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.log(Level.FINER, "Exception caught: ", e); } return null; } return dispatch; }
public Future<?> invokeAsync(T obj, AsyncHandler<T> asyncHandler) { checkError(); client.setExecutor(getClient().getEndpoint().getExecutor()); boolean hasOpName; QName opName = (QName)getRequestContext().get(MessageContext.WSDL_OPERATION); if (opName == null) { hasOpName = false; .getBindingInfo().getOperation(opName); if (bop == null) { addInvokeOperation(opName, false); opName = calculateOpName(holder, opName, hasOpName); throw mapException(ex);
public <T> Dispatch<T> configureDispatch(Dispatch<T> dispatch) { if (jmsConfiguration == null || !(dispatch instanceof DispatchImpl<?>) || (serviceName == null && configuration == null)) { return null; } if (!jmsConfigured) { setupJmsConfiguration(); } final DispatchImpl<?> di = (DispatchImpl<?>) dispatch; final Client cl = di.getClient(); final JMSConfigFeature feature = new JMSConfigFeature(); feature.setJmsConfig(jmsConfiguration); feature.initialize(cl, cl.getBus()); return dispatch; }
public static void setupDispatch(final Dispatch<?> dispatch) { if (!(dispatch instanceof DispatchImpl)) { throw new IllegalArgumentException("Only CXF JAX-WS Dispatch supported. "); } final DispatchImpl<?> dsp = (DispatchImpl<?>) dispatch; final Client dispatchClient = dsp.getClient(); final Bus bus = dispatchClient.getBus(); (new RequestCallbackFeature()).initialize(dispatchClient, bus); if (logging) { (new LoggingFeature()).initialize(dispatchClient, bus); } if (serviceActivityMonitoring) { getEventFeature().initialize(dispatchClient, bus); } }
Client cl = dsp.getClient(); final QName serviceName; try {
public <T> Dispatch<T> configureDispatch(Dispatch<T> dispatch, String addressing) { if (configuration == null) { if (serviceName == null) { return null; } configuration = CallContext.resolveConfiguration(serviceName); } String overrideAddress = getProperty("requestURI2010"); if (overrideAddress != null && (overrideAddress.equals(addressing) || OVERRIDE_BY_URI_CONFIG.equals(addressing))) { return dispatch; } if (jmsConfiguration == null || !(dispatch instanceof DispatchImpl<?>) || (serviceName == null && configuration == null)) { return null; } if (!jmsConfigured) { setupJmsConfiguration(); } final DispatchImpl<?> di = (DispatchImpl<?>) dispatch; final Client cl = di.getClient(); final JMSConfigFeature feature = new JMSConfigFeature(); feature.setJmsConfig(jmsConfiguration); feature.initialize(cl, cl.getBus()); return dispatch; }
Client cl = dsp.getClient(); final QName serviceName; try {
protected void setConfigProperties(Object client, ClientConfig config) { Client cxfClient; if (client instanceof DispatchImpl<?>) { cxfClient = ((DispatchImpl<?>)client).getClient(); } else { cxfClient = ClientProxy.getClient(client); } cleanupPreviousProps(cxfClient); Map<String, String> props = config.getProperties(); if (props != null && !props.isEmpty()) { savePropList(cxfClient, props); } setConfigProperties(cxfClient, props); //config jaspi JASPIAuthenticationProvider japsiProvider = (JASPIAuthenticationProvider) ServiceLoader.loadService( JASPIAuthenticationProvider.class.getName(), null, ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader()); if (japsiProvider != null) { japsiProvider.enableClientAuthentication(cxfClient, props); } else { Loggers.SECURITY_LOGGER.cannotFindJaspiClasses(); } }