// Set wsdl file
String wsdlFile = wsdMetaData.getWsdlFile();
serviceMetaData.setWsdlFile(wsdlFile);
// Unmarshall the WSDL
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
// Unmarshall the jaxrpc-mapping.xml
String mappingFile = wsdMetaData.getJaxrpcMappingFile();
serviceMetaData.setMappingLocation(dep.getMetaDataFileURL(mappingFile));
JavaWsdlMapping javaWsdlMapping = serviceMetaData.getJavaWsdlMapping();
if (javaWsdlMapping == null)
throw new WSException("jaxrpc-mapping-file not configured from webservices.xml");
// Build type mapping meta data
setupTypesMetaData(serviceMetaData);
// Assign the WS-Security configuration,
WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
WSSecurityConfiguration securityConfiguration = wsseConfFactory.createConfiguration(wsMetaData.getRootFile(), WSSecurityOMFactory.SERVER_RESOURCE_NAME);
serviceMetaData.setSecurityConfiguration(securityConfiguration);
// For every port-component build the EndpointMetaData
PortComponentMetaData[] pcMetaDataArr = wsdMetaData.getPortComponents();
for (PortComponentMetaData pcMetaData : pcMetaDataArr)
{
String linkName = pcMetaData.getEjbLink() != null ? pcMetaData.getEjbLink() : pcMetaData.getServletLink();
QName portName = pcMetaData.getWsdlPort();
// JBWS-722
// <wsdl-port> in webservices.xml should be qualified
if (portName.getNamespaceURI().length() == 0)
{
String nsURI = wsdlDefinitions.getTargetNamespace();
portName = new QName(nsURI, portName.getLocalPart());
log.warn("Adding wsdl targetNamespace to: " + portName);
pcMetaData.setWsdlPort(portName);
}