Search in sources :

Example 1 with JaxrpcMappingDeploymentDescriptorFile

use of com.sun.enterprise.deployment.io.JaxrpcMappingDeploymentDescriptorFile in project Payara by payara.

the class JaxRpcRICodegen method getJaxrpcMappingInfo.

private JaxrpcMappingDescriptor getJaxrpcMappingInfo(URL mappingFileUrl, Descriptor desc) throws Exception {
    JaxrpcMappingDescriptor mappingDesc = null;
    InputStream is = null;
    try {
        is = mappingFileUrl.openStream();
        JaxrpcMappingDeploymentDescriptorFile jaxrpcDD = new JaxrpcMappingDeploymentDescriptorFile();
        // useful for validation errors...
        if (desc instanceof ServiceReferenceDescriptor) {
            ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) desc;
            jaxrpcDD.setDeploymentDescriptorPath(srd.getMappingFileUri());
            jaxrpcDD.setErrorReportingString(srd.getBundleDescriptor().getModuleDescriptor().getArchiveUri());
        }
        if (desc instanceof WebService) {
            WebService ws = (WebService) desc;
            jaxrpcDD.setDeploymentDescriptorPath(ws.getMappingFileUri());
            jaxrpcDD.setErrorReportingString(ws.getBundleDescriptor().getModuleDescriptor().getArchiveUri());
        }
        // jaxrpcDD.setXMLValidationLevel(Deployer.getValidationLevel());
        jaxrpcDD.setXMLValidationLevel("none");
        mappingDesc = JaxrpcMappingDescriptor.class.cast(jaxrpcDD.read(is));
    } finally {
        if (is != null) {
            is.close();
        }
    }
    return mappingDesc;
}
Also used : InputStream(java.io.InputStream) JaxrpcMappingDeploymentDescriptorFile(com.sun.enterprise.deployment.io.JaxrpcMappingDeploymentDescriptorFile)

Aggregations

JaxrpcMappingDeploymentDescriptorFile (com.sun.enterprise.deployment.io.JaxrpcMappingDeploymentDescriptorFile)1 InputStream (java.io.InputStream)1