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;
}
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;
}
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;
}
Aggregations