use of org.apache.openejb.server.axis.assembler.JaxRpcTypeInfo in project tomee by apache.
the class JavaServiceDescBuilder method createServiceDesc.
public JavaServiceDesc createServiceDesc() throws OpenEJBException {
Class serviceEndpointInterface;
try {
serviceEndpointInterface = classLoader.loadClass(serviceInfo.serviceEndpointInterface);
} catch (ClassNotFoundException e) {
throw new OpenEJBException("Unable to load the service endpoint interface " + serviceInfo.serviceEndpointInterface, e);
}
JavaServiceDesc serviceDesc = new JavaServiceDesc();
serviceDesc.setName(serviceInfo.name);
serviceDesc.setEndpointURL(serviceInfo.endpointURL);
serviceDesc.setWSDLFile(serviceInfo.wsdlFile);
BindingStyle bindingStyle = serviceInfo.defaultBindingStyle;
switch(bindingStyle) {
case RPC_ENCODED:
serviceDesc.setStyle(Style.RPC);
serviceDesc.setUse(Use.ENCODED);
break;
case RPC_LITERAL:
serviceDesc.setStyle(Style.RPC);
serviceDesc.setUse(Use.LITERAL);
break;
case DOCUMENT_ENCODED:
serviceDesc.setStyle(Style.DOCUMENT);
serviceDesc.setUse(Use.ENCODED);
break;
case DOCUMENT_LITERAL:
serviceDesc.setStyle(Style.DOCUMENT);
serviceDesc.setUse(Use.LITERAL);
break;
case DOCUMENT_LITERAL_WRAPPED:
serviceDesc.setStyle(Style.WRAPPED);
serviceDesc.setUse(Use.LITERAL);
break;
}
// Operations
for (JaxRpcOperationInfo operationInfo : serviceInfo.operations) {
OperationDesc operationDesc = buildOperationDesc(operationInfo, serviceEndpointInterface);
serviceDesc.addOperationDesc(operationDesc);
}
// Type mapping registry
TypeMappingRegistryImpl typeMappingRegistry = new TypeMappingRegistryImpl();
typeMappingRegistry.doRegisterFromVersion("1.3");
serviceDesc.setTypeMappingRegistry(typeMappingRegistry);
// Type mapping
TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(serviceDesc.getUse().getEncoding());
serviceDesc.setTypeMapping(typeMapping);
// Types
for (JaxRpcTypeInfo type : serviceInfo.types) {
registerType(type, typeMapping);
}
return new ReadOnlyServiceDesc(serviceDesc);
}
Aggregations