}
public static String getPackageFromNamespace(String namespace, JavaWsdlMappingType mapping) throws DeploymentException {
PackageMappingType[] packageMappings = mapping.getPackageMappingArray();
for (int i = 0; i < packageMappings.length; i++) {
PackageMappingType packageMapping = packageMappings[i];
if (namespace.equals(packageMapping.getNamespaceURI().getStringValue().trim())) {
return packageMapping.getPackageType().getStringValue().trim();
}
}
throw new DeploymentException("Namespace " + namespace + " was not mapped in jaxrpc mapping file");
}