Search in sources :

Example 1 with WebService

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

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);
}
Also used : WebService(com.sun.enterprise.deployment.WebService)

Example 3 with WebService

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);
}
Also used : WebService(com.sun.enterprise.deployment.WebService) RelationshipDescriptor(org.glassfish.ejb.deployment.descriptor.RelationshipDescriptor) EjbDescriptor(org.glassfish.ejb.deployment.descriptor.EjbDescriptor) EjbBundleDescriptorImpl(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl)

Example 4 with WebService

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);
}
Also used : EjbBundleDescriptor(com.sun.enterprise.deployment.EjbBundleDescriptor) WebService(com.sun.enterprise.deployment.WebService) WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint)

Example 5 with WebService

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);
    }
}
Also used : InjectionCapable(com.sun.enterprise.deployment.InjectionCapable) WebService(com.sun.enterprise.deployment.WebService) Iterator(java.util.Iterator) RelationshipDescriptor(org.glassfish.ejb.deployment.descriptor.RelationshipDescriptor) DummyEjbDescriptor(org.glassfish.ejb.deployment.descriptor.DummyEjbDescriptor) EjbDescriptor(org.glassfish.ejb.deployment.descriptor.EjbDescriptor) EjbBundleDescriptorImpl(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl)

Aggregations

WebService (com.sun.enterprise.deployment.WebService)13 WebServiceEndpoint (com.sun.enterprise.deployment.WebServiceEndpoint)5 WebServicesDescriptor (com.sun.enterprise.deployment.WebServicesDescriptor)5 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)3 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)2 ServiceReferenceDescriptor (com.sun.enterprise.deployment.ServiceReferenceDescriptor)2 WebComponentDescriptor (com.sun.enterprise.deployment.WebComponentDescriptor)2 AbstractBundleNode (com.sun.enterprise.deployment.node.AbstractBundleNode)2 EjbBundleDescriptorImpl (org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl)2 EjbDescriptor (org.glassfish.ejb.deployment.descriptor.EjbDescriptor)2 RelationshipDescriptor (org.glassfish.ejb.deployment.descriptor.RelationshipDescriptor)2 Node (org.w3c.dom.Node)2 BundleDescriptor (com.sun.enterprise.deployment.BundleDescriptor)1 InjectionCapable (com.sun.enterprise.deployment.InjectionCapable)1 JaxrpcMappingDescriptor (com.sun.enterprise.deployment.JaxrpcMappingDescriptor)1 JndiNameEnvironment (com.sun.enterprise.deployment.JndiNameEnvironment)1 WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)1 EjbContext (com.sun.enterprise.deployment.annotation.context.EjbContext)1 EjbsContext (com.sun.enterprise.deployment.annotation.context.EjbsContext)1 WebBundleContext (com.sun.enterprise.deployment.annotation.context.WebBundleContext)1