use of org.apache.openejb.server.axis.assembler.JaxRpcServiceInfo in project tomee by apache.
the class AxisService method createEjbWsContainer.
@Override
protected HttpListener createEjbWsContainer(URL url, PortData port, BeanContext beanContext, ServiceConfiguration serviceInfos) throws Exception {
ClassLoader classLoader = beanContext.getClassLoader();
// todo build JaxRpcServiceInfo in assembler
JaxRpcServiceInfo serviceInfo = getJaxRpcServiceInfo(classLoader);
// Build java service descriptor
JavaServiceDescBuilder javaServiceDescBuilder = new JavaServiceDescBuilder(serviceInfo, classLoader);
JavaServiceDesc serviceDesc = javaServiceDescBuilder.createServiceDesc();
// Create service
RPCProvider provider = new EjbRpcProvider(beanContext, createHandlerInfos(port.getHandlerChains()));
SOAPService service = new SOAPService(null, provider, null);
service.setServiceDescription(serviceDesc);
// Set class name
service.setOption("className", beanContext.getServiceEndpointInterface().getName());
serviceDesc.setImplClass(beanContext.getServiceEndpointInterface());
// Create container
AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, classLoader);
wsContainers.put(beanContext.getDeploymentID().toString(), container);
return container;
}
use of org.apache.openejb.server.axis.assembler.JaxRpcServiceInfo in project tomee by apache.
the class AxisService method getJaxRpcServiceInfo.
private JaxRpcServiceInfo getJaxRpcServiceInfo(ClassLoader classLoader) throws OpenEJBException {
// the java to wsdl mapping file
JavaWsdlMapping mapping = null;
// the schema data from the wsdl file
CommonsSchemaInfoBuilder xmlBeansSchemaInfoBuilder = new CommonsSchemaInfoBuilder(null, null);
// webservice.xml declaration of this service
PortComponent portComponent = null;
// wsdl.xml declaration of this service
Port port = null;
String wsdlFile = null;
XmlSchemaInfo schemaInfo = xmlBeansSchemaInfoBuilder.createSchemaInfo();
JaxRpcServiceInfoBuilder serviceInfoBuilder = new JaxRpcServiceInfoBuilder(mapping, schemaInfo, portComponent, port, wsdlFile, classLoader);
JaxRpcServiceInfo serviceInfo = serviceInfoBuilder.createServiceInfo();
return serviceInfo;
}
use of org.apache.openejb.server.axis.assembler.JaxRpcServiceInfo in project tomee by apache.
the class AxisService method createPojoWsContainer.
protected HttpListener createPojoWsContainer(ClassLoader loader, URL moduleBaseUrl, PortData port, String serviceId, Class target, Context context, String contextRoot, Map<String, Object> bdgs, ServiceConfiguration serviceInfos) throws Exception {
ClassLoader classLoader = target.getClassLoader();
// todo build JaxRpcServiceInfo in assembler
JaxRpcServiceInfo serviceInfo = getJaxRpcServiceInfo(classLoader);
// Build java service descriptor
JavaServiceDescBuilder javaServiceDescBuilder = new JavaServiceDescBuilder(serviceInfo, classLoader);
JavaServiceDesc serviceDesc = javaServiceDescBuilder.createServiceDesc();
// Create service
RPCProvider provider = new PojoProvider();
SOAPService service = new SOAPService(null, provider, null);
service.setServiceDescription(serviceDesc);
// Set class name
service.setOption("className", target.getName());
// Add Handler Chain
List<HandlerInfo> handlerInfos = createHandlerInfos(port.getHandlerChains());
HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(handlerInfos);
service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);
// Create container
AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, classLoader);
wsContainers.put(serviceId, container);
return container;
}
Aggregations