Search in sources :

Example 1 with JaxrpcMappingDescriptor

use of com.sun.enterprise.deployment.JaxrpcMappingDescriptor 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 : JaxrpcMappingDescriptor(com.sun.enterprise.deployment.JaxrpcMappingDescriptor) WebService(com.sun.enterprise.deployment.WebService) InputStream(java.io.InputStream) ServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor) JaxrpcMappingDeploymentDescriptorFile(com.sun.enterprise.deployment.io.JaxrpcMappingDeploymentDescriptorFile)

Example 2 with JaxrpcMappingDescriptor

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

the class JaxRpcRICodegen method createModelInfo.

private ModelInfo createModelInfo(ServiceReferenceDescriptor serviceRef) throws Exception {
    ModelInfo modelInfo = null;
    URL mappingFileUrl = serviceRef.getMappingFile().toURL();
    if (isJaxrpcRIModelFile(mappingFileUrl)) {
        modelInfo = createModelFileModelInfo(mappingFileUrl);
    } else {
        JaxrpcMappingDescriptor mappingDesc = getJaxrpcMappingInfo(mappingFileUrl, serviceRef);
        if (mappingDesc.isSimpleMapping() && serviceRef.hasGeneratedServiceInterface()) {
            // model info for this modeler requires generated service
            // interface name.
            modelInfo = createNoMetadataModelInfo(serviceRef, mappingDesc);
        } else {
            modelInfo = createFullMappingModelInfo(serviceRef);
        }
    }
    return modelInfo;
}
Also used : ModelFileModelInfo(com.sun.xml.rpc.spi.tools.ModelFileModelInfo) J2EEModelInfo(com.sun.xml.rpc.spi.tools.J2EEModelInfo) ModelInfo(com.sun.xml.rpc.spi.tools.ModelInfo) NoMetadataModelInfo(com.sun.xml.rpc.spi.tools.NoMetadataModelInfo) JaxrpcMappingDescriptor(com.sun.enterprise.deployment.JaxrpcMappingDescriptor) URL(java.net.URL)

Example 3 with JaxrpcMappingDescriptor

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

the class JaxRpcRICodegen method createModelInfo.

private ModelInfo createModelInfo(WebService webService) throws Exception {
    ModelInfo modelInfo = null;
    URL mappingFileUrl = webService.getMappingFile().toURL();
    modelInfo = createModelFileModelInfo(mappingFileUrl);
    if (isJaxrpcRIModelFile(mappingFileUrl)) {
        debug("000. JaxrpcRIModelFile.");
        modelInfo = createModelFileModelInfo(mappingFileUrl);
    } else {
        JaxrpcMappingDescriptor mappingDesc = getJaxrpcMappingInfo(mappingFileUrl, webService);
        if (mappingDesc.isSimpleMapping()) {
            debug("111. SimpleMapping.");
            modelInfo = createNoMetadataModelInfo(webService, mappingDesc);
        } else {
            debug("222. FullMapping .");
            modelInfo = createFullMappingModelInfo(webService);
        }
    }
    return modelInfo;
}
Also used : ModelFileModelInfo(com.sun.xml.rpc.spi.tools.ModelFileModelInfo) J2EEModelInfo(com.sun.xml.rpc.spi.tools.J2EEModelInfo) ModelInfo(com.sun.xml.rpc.spi.tools.ModelInfo) NoMetadataModelInfo(com.sun.xml.rpc.spi.tools.NoMetadataModelInfo) JaxrpcMappingDescriptor(com.sun.enterprise.deployment.JaxrpcMappingDescriptor) URL(java.net.URL)

Aggregations

JaxrpcMappingDescriptor (com.sun.enterprise.deployment.JaxrpcMappingDescriptor)3 J2EEModelInfo (com.sun.xml.rpc.spi.tools.J2EEModelInfo)2 ModelFileModelInfo (com.sun.xml.rpc.spi.tools.ModelFileModelInfo)2 ModelInfo (com.sun.xml.rpc.spi.tools.ModelInfo)2 NoMetadataModelInfo (com.sun.xml.rpc.spi.tools.NoMetadataModelInfo)2 URL (java.net.URL)2 ServiceReferenceDescriptor (com.sun.enterprise.deployment.ServiceReferenceDescriptor)1 WebService (com.sun.enterprise.deployment.WebService)1 JaxrpcMappingDeploymentDescriptorFile (com.sun.enterprise.deployment.io.JaxrpcMappingDeploymentDescriptorFile)1 InputStream (java.io.InputStream)1