private void configureService(ServerFactoryBean svrFactory, Object service) { svrFactory.setServiceClass(wsTransactionConfiguration.getSei()); svrFactory.setServiceName(wsTransactionConfiguration.getServiceName()); svrFactory.setWsdlLocation(wsTransactionConfiguration.getWsdlLocation()); svrFactory.setAddress(serviceAddress); svrFactory.setServiceBean(service); svrFactory.getFeatures().add(new WSAddressingFeature()); if (wsTransactionConfiguration.isMtom()) { svrFactory.setProperties(Collections.singletonMap("mtom-enabled", "true")); } }
@Override public AuditStrategy<AuditDatasetType> getClientAuditStrategy() { return getWsTransactionConfiguration().getClientAuditStrategy(); }
@Override public AuditStrategy<AuditDatasetType> getServerAuditStrategy() { return getWsTransactionConfiguration().getServerAuditStrategy(); }
public void testEndpointAttributes() throws Exception { MBeanServer mbeanServer = getMBeanServer(); Set<ObjectName> s = CastUtils.cast(mbeanServer.queryNames(new ObjectName( "org.apache.camel:*,type=endpoints,name=\"some-ws-iti://data*\""), null)); ObjectName on = (ObjectName) s.toArray()[0]; assertEquals(SomeItiComponent.WS_CONFIG.isAddressing(), ((Boolean) mbeanServer.getAttribute(on, "Addressing")).booleanValue()); assertEquals(SomeItiComponent.WS_CONFIG.isMtom(), ((Boolean) mbeanServer.getAttribute(on, "Mtom")).booleanValue()); assertEquals(SomeItiComponent.WS_CONFIG.isSwaOutSupport(), ((Boolean) mbeanServer.getAttribute(on, "SwaOutSupport")).booleanValue()); }
if (wsTransactionConfiguration.isAddressing()) { MustUnderstandDecoratorInterceptor interceptor = new MustUnderstandDecoratorInterceptor(); for (String nsUri : SoapUtils.WS_ADDRESSING_NS_URIS) { if (wsTransactionConfiguration.isSwaOutSupport()) { client.getOutInterceptors().add(new ProvidedAttachmentOutInterceptor()); client.getOutInterceptors().add(new FixContentTypeOutInterceptor());
/** * Configures SOAP binding of the given SOAP port. */ private void configureBinding(Object port) { BindingProvider bindingProvider = (BindingProvider) port; Map<String, Object> reqContext = bindingProvider.getRequestContext(); reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceUrl); Binding binding = bindingProvider.getBinding(); SOAPBinding soapBinding = (SOAPBinding) binding; soapBinding.setMTOMEnabled(wsTransactionConfiguration.isMtom()); }
/** * @return <code>true</code> if SOAP With Attachments Output enabled. */ @ManagedAttribute(description = "SOAP With Attachments Output Enabled") public boolean isSwaOutSupport() { return getComponent().getWsTransactionConfiguration().isSwaOutSupport(); }
/** * @return <code>true</code> if WS-Addressing enabled. */ @ManagedAttribute(description = "Addressing Enabled") public boolean isAddressing() { return getComponent().getWsTransactionConfiguration().isAddressing(); }
/** * Constructor. * @param endpoint * Camel endpoint instance. * @param clientFactory * JAX-WS client object factory. * @param requestClass * type of request messages. * @param responseClass * type of response messages. */ public SimpleWsProducer( AbstractWsEndpoint<AuditDatasetType, ConfigType> endpoint, JaxWsClientFactory<AuditDatasetType> clientFactory, Class<InType> requestClass, Class<OutType> responseClass) { super(endpoint, clientFactory, requestClass, responseClass); for (Method method : endpoint.getComponent().getWsTransactionConfiguration().getSei().getDeclaredMethods()) { WebMethod annotation = method.getAnnotation(WebMethod.class); if (annotation != null) { this.operationName = annotation.operationName(); return; } } throw new IllegalStateException("the SEI does not contain any methods annotated with @WebMethod"); }
private void configureBinding(ServerFactoryBean svrFactory) { SoapBindingConfiguration bindingConfig = new SoapBindingConfiguration(); bindingConfig.setBindingName(wsTransactionConfiguration.getBindingName()); svrFactory.setBindingConfig(bindingConfig); }
/** * @return <code>true</code> if MTOM enabled. */ @ManagedAttribute(description = "Mtom Enabled") public boolean isMtom() { return getComponent().getWsTransactionConfiguration().isMtom(); }