use of org.apache.cxf.endpoint.EndpointImpl in project camel by apache.
the class WSDLServiceFactoryBean method createEndpoint.
public Endpoint createEndpoint(EndpointInfo ei) throws EndpointException {
Endpoint ep = new EndpointImpl(getBus(), getService(), ei);
sendEvent(Event.ENDPOINT_CREATED, ei, ep, getServiceClass());
return ep;
}
use of org.apache.cxf.endpoint.EndpointImpl in project cxf by apache.
the class BareInInterceptorTest method setUpUsingHelloWorld.
private void setUpUsingHelloWorld() throws Exception {
String ns = "http://apache.org/hello_world_soap_http";
WSDLServiceFactory factory = new WSDLServiceFactory(bus, getClass().getResource("/wsdl/jaxb/hello_world.wsdl").toString(), new QName(ns, "SOAPService"));
service = factory.create();
endpointInfo = service.getServiceInfos().get(0).getEndpoint(new QName(ns, "SoapPort"));
endpoint = new EndpointImpl(bus, service, endpointInfo);
JAXBDataBinding db = new JAXBDataBinding();
db.setContext(JAXBContext.newInstance(new Class[] { GreetMe.class, GreetMeResponse.class }));
service.setDataBinding(db);
operation = endpointInfo.getBinding().getOperation(new QName(ns, "greetMe"));
operation.getOperationInfo().getInput().getMessagePartByIndex(0).setTypeClass(GreetMe.class);
operation.getOperationInfo().getOutput().getMessagePartByIndex(0).setTypeClass(GreetMeResponse.class);
message = new MessageImpl();
Exchange exchange = new ExchangeImpl();
message.setExchange(exchange);
exchange.put(Service.class, service);
exchange.put(Endpoint.class, endpoint);
exchange.put(Binding.class, endpoint.getBinding());
}
use of org.apache.cxf.endpoint.EndpointImpl in project cxf by apache.
the class BareInInterceptorTest method setUpUsingDocLit.
private void setUpUsingDocLit() throws Exception {
String ns = "http://apache.org/hello_world_doc_lit_bare";
WSDLServiceFactory factory = new WSDLServiceFactory(bus, getClass().getResource("/wsdl/jaxb/doc_lit_bare.wsdl").toString(), new QName(ns, "SOAPService"));
service = factory.create();
endpointInfo = service.getServiceInfos().get(0).getEndpoint(new QName(ns, "SoapPort"));
endpoint = new EndpointImpl(bus, service, endpointInfo);
JAXBDataBinding db = new JAXBDataBinding();
db.setContext(JAXBContext.newInstance(new Class[] { TradePriceData.class }));
service.setDataBinding(db);
operation = endpointInfo.getBinding().getOperation(new QName(ns, "SayHi"));
operation.getOperationInfo().getInput().getMessagePartByIndex(0).setTypeClass(TradePriceData.class);
operation.getOperationInfo().getOutput().getMessagePartByIndex(0).setTypeClass(TradePriceData.class);
message = new MessageImpl();
Exchange exchange = new ExchangeImpl();
message.setExchange(exchange);
exchange.put(Service.class, service);
exchange.put(Endpoint.class, endpoint);
exchange.put(Binding.class, endpoint.getBinding());
}
use of org.apache.cxf.endpoint.EndpointImpl in project cxf by apache.
the class DocLiteralInInterceptorTest method setUpUsingHelloWorld.
private void setUpUsingHelloWorld() throws Exception {
String ns = "http://apache.org/hello_world_soap_http";
WSDLServiceFactory factory = new WSDLServiceFactory(bus, getClass().getResource("/wsdl/jaxb/hello_world.wsdl").toString(), new QName(ns, "SOAPService"));
service = factory.create();
endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPort"));
endpoint = new EndpointImpl(bus, service, endpointInfo);
JAXBDataBinding db = new JAXBDataBinding();
db.setContext(JAXBContext.newInstance(new Class[] { GreetMe.class, GreetMeResponse.class }));
service.setDataBinding(db);
operation = endpointInfo.getBinding().getOperation(new QName(ns, "greetMe"));
operation.getOperationInfo().getInput().getMessagePartByIndex(0).setTypeClass(GreetMe.class);
operation.getOperationInfo().getOutput().getMessagePartByIndex(0).setTypeClass(GreetMeResponse.class);
message = new MessageImpl();
Exchange exchange = new ExchangeImpl();
message.setExchange(exchange);
exchange.put(Service.class, service);
exchange.put(Endpoint.class, endpoint);
exchange.put(Binding.class, endpoint.getBinding());
}
use of org.apache.cxf.endpoint.EndpointImpl in project cxf by apache.
the class DocLiteralInInterceptorTest method setUpUsingDocLit.
private void setUpUsingDocLit() throws Exception {
String ns = "http://apache.org/hello_world_doc_lit_bare";
WSDLServiceFactory factory = new WSDLServiceFactory(bus, getClass().getResource("/wsdl/jaxb/doc_lit_bare.wsdl").toString(), new QName(ns, "SOAPService"));
service = factory.create();
endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPort"));
endpoint = new EndpointImpl(bus, service, endpointInfo);
JAXBDataBinding db = new JAXBDataBinding();
db.setContext(JAXBContext.newInstance(new Class[] { TradePriceData.class }));
service.setDataBinding(db);
operation = endpointInfo.getBinding().getOperation(new QName(ns, "SayHi"));
operation.getOperationInfo().getInput().getMessagePartByIndex(0).setTypeClass(TradePriceData.class);
operation.getOperationInfo().getOutput().getMessagePartByIndex(0).setTypeClass(TradePriceData.class);
message = new MessageImpl();
Exchange exchange = new ExchangeImpl();
message.setExchange(exchange);
exchange.put(Service.class, service);
exchange.put(Endpoint.class, endpoint);
exchange.put(Binding.class, endpoint.getBinding());
}
Aggregations