this.catalogName = catalogName;
}
public AxisService getServiceFromClass(Class endpointClass, PortInfo portInfo) throws Exception {
ServiceDescription serviceDescription = DescriptionFactory.createServiceDescription(endpointClass);
EndpointDescription targetEndpointDescription = null;
for (EndpointDescription endpointDescription : serviceDescription.getEndpointDescriptions()) {
DescriptionBuilderComposite dbc = endpointDescription.getDescriptionBuilderComposite();
if (endpointClass.getName().equals(dbc.getClassName())) {
targetEndpointDescription = endpointDescription;
break;
}
}
if (targetEndpointDescription == null) {
throw new RuntimeException("No endpoint found for SEI class " + endpointClass.getName());
}
configureWebServiceFeatures(targetEndpointDescription, portInfo);
AxisService service = targetEndpointDescription.getAxisService();
if (service.getNamespaceMap() == null) {
NamespaceMap map = new NamespaceMap();
map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX, Java2WSDLConstants.AXIS2_XSD);
map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX, Java2WSDLConstants.URI_2001_SCHEMA_XSD);