use of com.sun.enterprise.deployment.WebService 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.WebService in project Payara by payara.
the class WLWebServiceEndpointNode method setElementValue.
@Override
public void setElementValue(XMLElement element, String value) {
String elementName = element.getQName();
if (WebServicesTagNames.PORT_COMPONENT_NAME.equals(elementName)) {
WebService webservice = (WebService) getParentNode().getDescriptor();
descriptor = webservice.getEndpointByName(value);
} else
super.setElementValue(element, value);
}
use of com.sun.enterprise.deployment.WebService in project Payara by payara.
the class EjbBundleTracerVisitor method accept.
@Override
public void accept(BundleDescriptor descriptor) {
if (descriptor instanceof EjbBundleDescriptorImpl) {
EjbBundleDescriptorImpl ejbBundle = (EjbBundleDescriptorImpl) descriptor;
accept(ejbBundle);
for (EjbDescriptor anEjb : ejbBundle.getEjbs()) {
anEjb.visit(getSubDescriptorVisitor(anEjb));
}
if (ejbBundle.hasRelationships()) {
for (RelationshipDescriptor rd : ejbBundle.getRelationships()) {
accept(rd);
}
}
for (WebService ws : ejbBundle.getWebServices().getWebServices()) {
accept(ws);
}
}
super.accept(descriptor);
}
use of com.sun.enterprise.deployment.WebService in project Payara by payara.
the class DefaultWebServiceLoginConfigNode method endElement.
@Override
public boolean endElement(XMLElement element) {
log.log(Level.FINEST, "End Element: {0}", element.getQName());
if (authMethod != null && element.getQName().equals(RuntimeTagNames.WEBSERVICE_DEFAULT_LOGIN_CONFIG)) {
EjbBundleDescriptor descriptor = (EjbBundleDescriptor) getParentNode().getDescriptor();
for (WebService wsDesc : descriptor.getWebServices().getWebServices()) {
for (WebServiceEndpoint endpoint : wsDesc.getEndpoints()) {
if (!endpoint.hasAuthMethod()) {
log.log(Level.FINE, "Default Login for Web Service Endpoint: {0}, Method {1}, Realm {2}", new Object[] { endpoint.getName(), authMethod, realm });
endpoint.setAuthMethod(authMethod);
endpoint.setRealm(realm);
}
}
}
}
return super.endElement(element);
}
use of com.sun.enterprise.deployment.WebService in project Payara by payara.
the class EjbBundleValidator method accept.
@Override
public void accept(BundleDescriptor descriptor) {
this.bundleDescriptor = descriptor;
this.application = descriptor.getApplication();
if (descriptor instanceof EjbBundleDescriptorImpl) {
EjbBundleDescriptorImpl ejbBundle = (EjbBundleDescriptorImpl) descriptor;
accept(ejbBundle);
for (EjbDescriptor anEjb : ejbBundle.getEjbs()) {
anEjb.visit(getSubDescriptorVisitor(anEjb));
}
if (ejbBundle.hasRelationships()) {
for (Iterator itr = ejbBundle.getRelationships().iterator(); itr.hasNext(); ) {
RelationshipDescriptor rd = (RelationshipDescriptor) itr.next();
accept(rd);
}
}
for (WebService aWebService : ejbBundle.getWebServices().getWebServices()) {
accept(aWebService);
}
// inject field.
for (InjectionCapable injectable : ejbBundle.getInjectableResources(ejbBundle)) {
accept(injectable);
}
super.accept(descriptor);
} else {
super.accept(descriptor);
}
}
Aggregations