use of org.talend.esb.servicelocator.cxf.LocatorFeature in project tesb-rt-se by Talend.
the class Client method prepareFactoryBean.
private JAXRSClientFactoryBean prepareFactoryBean() throws Exception {
JAXRSClientFactoryBean factoryBean = new JAXRSClientFactoryBean();
factoryBean.setAddress("locator://some_usefull_information");
factoryBean.setServiceName(new QName("http://common.demo/", "OrderService"));
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "META-INF/tesb/locator/beans.xml" });
LocatorFeature feature = (LocatorFeature) context.getBean("locatorFeature");
factoryBean.setFeatures(Collections.singletonList(feature));
return factoryBean;
}
use of org.talend.esb.servicelocator.cxf.LocatorFeature in project tesb-rt-se by Talend.
the class RuntimeESBConsumerTest method noPropertiesSetProvidesEmptyArgumentList.
@Test
public void noPropertiesSetProvidesEmptyArgumentList() throws Exception {
QName serviceName = new QName("http://services.talend.org/test/Library/1.0", "LibraryProvider");
QName portName = new QName("http://services.talend.org/test/Library/1.0", "LibraryHttpPort");
QName operationName = new QName("http://services.talend.org/test/Library/1.0", "seekBook");
String publishedEndpointUrl = "local://LibraryHttpPort";
String wsdlURL = "classpath:/conf/libraryService/Library.wsdl";
boolean useServiceLocator = false;
LocatorFeature locatorFeature = null;
Map<String, String> locatorProps = new HashMap<String, String>();
EventFeature samFeature = null;
Map<String, String> samProps = new HashMap<String, String>();
boolean useServiceRegistry = false;
EsbSecurity esbSecurity = null;
Policy policy = null;
String username = "";
String password = "";
String alias = "";
Map<String, String> clientProperties = new HashMap<String, String>();
String roleName = "";
Object securityToken = null;
Crypto cryptoProvider = null;
SecurityArguments securityArguments = new SecurityArguments(esbSecurity, policy, username, password, alias, clientProperties, roleName, securityToken, cryptoProvider);
Bus bus = null;
boolean logging = false;
List<Header> soapHeaders = new ArrayList<Header>();
Feature httpHeadersFeature = null;
boolean enhancedResponse = false;
Object correlationIDCallbackHandler = null;
final boolean useGZipCompression = false;
RuntimeESBConsumer consumer = new RuntimeESBConsumer(serviceName, portName, operationName, publishedEndpointUrl, wsdlURL, useServiceLocator, locatorFeature, locatorProps, samFeature, samProps, useServiceRegistry, securityArguments, bus, logging, soapHeaders, httpHeadersFeature, enhancedResponse, correlationIDCallbackHandler, useGZipCompression);
String requestString = "<ns2:SearchFor xmlns:ns2=\"http://types.talend.org/test/Library/Common/1.0\" " + "xmlns:ns3=\"http://types.talend.org/test/GeneralObjects/ErrorHandling/1.0\">" + "<AuthorLastName>Icebear</AuthorLastName><ISBNNumber>123</ISBNNumber></ns2:SearchFor>";
consumer.invoke(getDocumentFromString(requestString));
}
Aggregations