Search in sources :

Example 1 with StubProperty

use of org.apache.openejb.jee.sun.StubProperty in project tomee by apache.

the class SunConversion method deploy.

public AppModule deploy(final AppModule appModule) {
    final SunApplication sunApplication = getSunApplication(appModule);
    if (sunApplication != null) {
        for (final Web web : sunApplication.getWeb()) {
            final String webUri = web.getWebUri();
            for (final WebModule webModule : appModule.getWebModules()) {
                if (webUri.equals(webModule.getModuleId())) {
                    webModule.setContextRoot(web.getContextRoot());
                    break;
                }
            }
        }
        for (final ClientModule clientModule : appModule.getClientModules()) {
            final ApplicationClient applicationClient = clientModule.getApplicationClient();
            if (applicationClient == null) {
                continue;
            }
            // map ejb-refs
            final Map<String, org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap();
            // map ejb-ref jndi name declaration to deploymentId
            for (final EjbRef ref : sunApplication.getEjbRef()) {
                if (ref.getJndiName() != null) {
                    String refName = ref.getEjbRefName();
                    refName = normalize(refName);
                    org.apache.openejb.jee.EjbRef ejbRef = refMap.get(refName);
                    // try to match from lookup name
                    for (final Map.Entry<String, org.apache.openejb.jee.EjbRef> aRef : refMap.entrySet()) {
                        if (refName.equals(aRef.getValue().getLookupName())) {
                            ejbRef = aRef.getValue();
                            break;
                        }
                    }
                    if (ejbRef == null) {
                        ejbRef = new org.apache.openejb.jee.EjbRef();
                        ejbRef.setEjbRefName(refName);
                        refMap.put(refName, ejbRef);
                        applicationClient.getEjbRef().add(ejbRef);
                    }
                    ejbRef.setMappedName(ref.getJndiName());
                }
            }
            // map resource-env-refs and message-destination-refs
            final Map<String, JndiReference> resEnvMap = new TreeMap<String, JndiReference>();
            resEnvMap.putAll(applicationClient.getResourceEnvRefMap());
            resEnvMap.putAll(applicationClient.getMessageDestinationRefMap());
            for (final ResourceRef ref : sunApplication.getResourceRef()) {
                if (ref.getJndiName() != null) {
                    String refName = ref.getResRefName();
                    refName = normalize(refName);
                    final JndiReference resEnvRef = resEnvMap.get(refName);
                    if (resEnvRef != null) {
                        resEnvRef.setMappedName(ref.getJndiName());
                    }
                }
            }
            for (final ResourceEnvRef ref : sunApplication.getResourceEnvRef()) {
                if (ref.getJndiName() != null) {
                    String refName = ref.getResourceEnvRefName();
                    refName = normalize(refName);
                    final JndiReference resEnvRef = resEnvMap.get(refName);
                    if (resEnvRef != null) {
                        resEnvRef.setMappedName(ref.getJndiName());
                    }
                }
            }
            for (final MessageDestinationRef ref : sunApplication.getMessageDestinationRef()) {
                if (ref.getJndiName() != null) {
                    String refName = ref.getMessageDestinationRefName();
                    refName = normalize(refName);
                    final JndiReference resEnvRef = resEnvMap.get(refName);
                    if (resEnvRef != null) {
                        resEnvRef.setMappedName(ref.getJndiName());
                    }
                }
            }
            for (final MessageDestination destination : sunApplication.getMessageDestination()) {
                if (destination.getJndiName() != null) {
                    String name = destination.getMessageDestinationName();
                    name = normalize(name);
                    final JndiReference ref = resEnvMap.get(name);
                    if (ref != null) {
                        ref.setMappedName(destination.getJndiName());
                    }
                }
            }
            final Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap();
            for (final org.apache.openejb.jee.sun.ServiceRef ref : sunApplication.getServiceRef()) {
                String refName = ref.getServiceRefName();
                refName = normalize(refName);
                final ServiceRef serviceRef = serviceRefMap.get(refName);
                if (serviceRef != null) {
                    final Map<String, PortComponentRef> ports = new TreeMap<String, PortComponentRef>();
                    for (final PortComponentRef portComponentRef : serviceRef.getPortComponentRef()) {
                        ports.put(portComponentRef.getServiceEndpointInterface(), portComponentRef);
                    }
                    for (final PortInfo portInfo : ref.getPortInfo()) {
                        final PortComponentRef portComponentRef = ports.get(portInfo.getServiceEndpointInterface());
                        if (portComponentRef != null) {
                            final WsdlPort wsdlPort = portInfo.getWsdlPort();
                            if (wsdlPort != null) {
                                final QName qname = new QName(wsdlPort.getNamespaceURI(), wsdlPort.getLocalpart());
                                portComponentRef.setQName(qname);
                            }
                            for (final StubProperty stubProperty : portInfo.getStubProperty()) {
                                final String name = stubProperty.getName();
                                final String value = stubProperty.getValue();
                                portComponentRef.getProperties().setProperty(name, value);
                            }
                        }
                    }
                    final String wsdlOverride = ref.getWsdlOverride();
                    if (wsdlOverride != null && wsdlOverride.length() > 0) {
                        final String serviceId = extractServiceId(wsdlOverride);
                        serviceRef.setMappedName(serviceId);
                    }
                }
            }
        }
    }
    for (final EjbModule ejbModule : appModule.getEjbModules()) {
        convertModule(ejbModule, appModule.getCmpMappings());
    }
    for (final ClientModule clientModule : appModule.getClientModules()) {
        convertModule(clientModule);
    }
    for (final WebModule webModule : appModule.getWebModules()) {
        convertModule(webModule);
    }
    return appModule;
}
Also used : WsdlPort(org.apache.openejb.jee.sun.WsdlPort) PortInfo(org.apache.openejb.jee.sun.PortInfo) MessageDestinationRef(org.apache.openejb.jee.sun.MessageDestinationRef) JndiReference(org.apache.openejb.jee.JndiReference) EjbRef(org.apache.openejb.jee.sun.EjbRef) ResourceEnvRef(org.apache.openejb.jee.sun.ResourceEnvRef) ApplicationClient(org.apache.openejb.jee.ApplicationClient) SunApplicationClient(org.apache.openejb.jee.sun.SunApplicationClient) MessageDestination(org.apache.openejb.jee.sun.MessageDestination) QName(javax.xml.namespace.QName) StubProperty(org.apache.openejb.jee.sun.StubProperty) SunApplication(org.apache.openejb.jee.sun.SunApplication) TreeMap(java.util.TreeMap) PortComponentRef(org.apache.openejb.jee.PortComponentRef) Web(org.apache.openejb.jee.sun.Web) ResourceRef(org.apache.openejb.jee.sun.ResourceRef) Map(java.util.Map) HashMap(java.util.HashMap) TreeMap(java.util.TreeMap) ServiceRef(org.apache.openejb.jee.ServiceRef)

Example 2 with StubProperty

use of org.apache.openejb.jee.sun.StubProperty in project tomee by apache.

the class SunConversion method convertModule.

public void convertModule(final WebModule webModule) {
    if (webModule == null) {
        return;
    }
    final WebApp webApp = webModule.getWebApp();
    if (webApp == null) {
        return;
    }
    final SunWebApp sunWebApp = getSunWebApp(webModule);
    if (sunWebApp == null) {
        return;
    }
    if (sunWebApp.getContextRoot() != null) {
        webModule.setContextRoot(sunWebApp.getContextRoot());
    }
    // map ejb-refs
    final Map<String, JndiReference> refMap = new TreeMap<String, JndiReference>();
    refMap.putAll(webApp.getEjbRefMap());
    refMap.putAll(webApp.getEjbLocalRefMap());
    // map ejb-ref jndi name declaration to deploymentId
    for (final EjbRef ref : sunWebApp.getEjbRef()) {
        if (ref.getJndiName() != null) {
            final String refName = ref.getEjbRefName();
            JndiReference ejbRef = refMap.get(refName);
            if (ejbRef == null) {
                ejbRef = new org.apache.openejb.jee.EjbRef();
                ejbRef.setName(refName);
                refMap.put(refName, ejbRef);
                webApp.getEjbRef().add((org.apache.openejb.jee.EjbRef) ejbRef);
            }
            ejbRef.setMappedName(ref.getJndiName());
        }
    }
    // map resource-env-refs and message-destination-refs
    final Map<String, JndiReference> resEnvMap = new TreeMap<String, JndiReference>();
    resEnvMap.putAll(webApp.getResourceRefMap());
    resEnvMap.putAll(webApp.getResourceEnvRefMap());
    resEnvMap.putAll(webApp.getMessageDestinationRefMap());
    for (final ResourceRef ref : sunWebApp.getResourceRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getResRefName();
            refName = normalize(refName);
            final JndiReference resEnvRef = resEnvMap.get(refName);
            if (resEnvRef != null) {
                resEnvRef.setMappedName(ref.getJndiName());
            }
        }
    }
    for (final ResourceEnvRef ref : sunWebApp.getResourceEnvRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getResourceEnvRefName();
            refName = normalize(refName);
            final JndiReference resEnvRef = resEnvMap.get(refName);
            if (resEnvRef != null) {
                resEnvRef.setMappedName(ref.getJndiName());
            }
        }
    }
    for (final MessageDestinationRef ref : sunWebApp.getMessageDestinationRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getMessageDestinationRefName();
            refName = normalize(refName);
            final JndiReference resEnvRef = resEnvMap.get(refName);
            if (resEnvRef != null) {
                resEnvRef.setMappedName(ref.getJndiName());
            }
        }
    }
    final Map<String, ServiceRef> serviceRefMap = webApp.getServiceRefMap();
    for (final org.apache.openejb.jee.sun.ServiceRef ref : sunWebApp.getServiceRef()) {
        String refName = ref.getServiceRefName();
        refName = normalize(refName);
        final ServiceRef serviceRef = serviceRefMap.get(refName);
        if (serviceRef != null) {
            final Map<String, PortComponentRef> ports = new TreeMap<String, PortComponentRef>();
            for (final PortComponentRef portComponentRef : serviceRef.getPortComponentRef()) {
                ports.put(portComponentRef.getServiceEndpointInterface(), portComponentRef);
            }
            for (final PortInfo portInfo : ref.getPortInfo()) {
                final PortComponentRef portComponentRef = ports.get(portInfo.getServiceEndpointInterface());
                if (portComponentRef != null) {
                    final WsdlPort wsdlPort = portInfo.getWsdlPort();
                    if (wsdlPort != null) {
                        final QName qname = new QName(wsdlPort.getNamespaceURI(), wsdlPort.getLocalpart());
                        portComponentRef.setQName(qname);
                    }
                    for (final StubProperty stubProperty : portInfo.getStubProperty()) {
                        final String name = stubProperty.getName();
                        final String value = stubProperty.getValue();
                        portComponentRef.getProperties().setProperty(name, value);
                    }
                }
            }
            final String wsdlOverride = ref.getWsdlOverride();
            if (wsdlOverride != null && wsdlOverride.length() > 0) {
                final String serviceId = extractServiceId(wsdlOverride);
                serviceRef.setMappedName(serviceId);
            }
        }
    }
    // map wsdl locations
    if (webModule.getWebservices() != null) {
        final Map<String, WebserviceDescription> descriptions = webModule.getWebservices().getWebserviceDescriptionMap();
        for (final org.apache.openejb.jee.sun.WebserviceDescription sunDescription : sunWebApp.getWebserviceDescription()) {
            final WebserviceDescription description = descriptions.get(sunDescription.getWebserviceDescriptionName());
            if (description == null) {
                continue;
            }
            final String serviceId = extractSerivceId(sunDescription.getWsdlPublishLocation(), description.getWsdlFile());
            if (serviceId != null) {
                description.setId(serviceId);
            }
        }
    }
}
Also used : SunWebApp(org.apache.openejb.jee.sun.SunWebApp) WsdlPort(org.apache.openejb.jee.sun.WsdlPort) PortInfo(org.apache.openejb.jee.sun.PortInfo) MessageDestinationRef(org.apache.openejb.jee.sun.MessageDestinationRef) JndiReference(org.apache.openejb.jee.JndiReference) EjbRef(org.apache.openejb.jee.sun.EjbRef) ResourceEnvRef(org.apache.openejb.jee.sun.ResourceEnvRef) QName(javax.xml.namespace.QName) StubProperty(org.apache.openejb.jee.sun.StubProperty) TreeMap(java.util.TreeMap) PortComponentRef(org.apache.openejb.jee.PortComponentRef) WebserviceDescription(org.apache.openejb.jee.WebserviceDescription) ResourceRef(org.apache.openejb.jee.sun.ResourceRef) ServiceRef(org.apache.openejb.jee.ServiceRef) SunWebApp(org.apache.openejb.jee.sun.SunWebApp) WebApp(org.apache.openejb.jee.WebApp)

Example 3 with StubProperty

use of org.apache.openejb.jee.sun.StubProperty in project tomee by apache.

the class SunConversion method convertModule.

public void convertModule(final ClientModule clientModule) {
    if (clientModule == null) {
        return;
    }
    final ApplicationClient applicationClient = clientModule.getApplicationClient();
    if (applicationClient == null) {
        return;
    }
    final SunApplicationClient sunApplicationClient = getSunApplicationClient(clientModule);
    if (sunApplicationClient == null) {
        return;
    }
    // map ejb-refs
    final Map<String, org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap();
    // map ejb-ref jndi name declaration to deploymentId
    for (final EjbRef ref : sunApplicationClient.getEjbRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getEjbRefName();
            refName = normalize(refName);
            org.apache.openejb.jee.EjbRef ejbRef = refMap.get(refName);
            if (ejbRef == null) {
                ejbRef = new org.apache.openejb.jee.EjbRef();
                ejbRef.setEjbRefName(refName);
                refMap.put(refName, ejbRef);
                applicationClient.getEjbRef().add(ejbRef);
            }
            ejbRef.setMappedName(ref.getJndiName());
        }
    }
    // map resource-env-refs and message-destination-refs
    final Map<String, JndiReference> resEnvMap = new TreeMap<String, JndiReference>();
    resEnvMap.putAll(applicationClient.getResourceEnvRefMap());
    resEnvMap.putAll(applicationClient.getMessageDestinationRefMap());
    for (final ResourceRef ref : sunApplicationClient.getResourceRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getResRefName();
            refName = normalize(refName);
            final JndiReference resEnvRef = resEnvMap.get(refName);
            if (resEnvRef != null) {
                resEnvRef.setMappedName(ref.getJndiName());
            }
        }
    }
    for (final ResourceEnvRef ref : sunApplicationClient.getResourceEnvRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getResourceEnvRefName();
            refName = normalize(refName);
            final JndiReference resEnvRef = resEnvMap.get(refName);
            if (resEnvRef != null) {
                resEnvRef.setMappedName(ref.getJndiName());
            }
        }
    }
    for (final MessageDestinationRef ref : sunApplicationClient.getMessageDestinationRef()) {
        if (ref.getJndiName() != null) {
            String refName = ref.getMessageDestinationRefName();
            refName = normalize(refName);
            final JndiReference resEnvRef = resEnvMap.get(refName);
            if (resEnvRef != null) {
                resEnvRef.setMappedName(ref.getJndiName());
            }
        }
    }
    final Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap();
    for (final org.apache.openejb.jee.sun.ServiceRef ref : sunApplicationClient.getServiceRef()) {
        String refName = ref.getServiceRefName();
        refName = normalize(refName);
        final ServiceRef serviceRef = serviceRefMap.get(refName);
        if (serviceRef != null) {
            final Map<String, PortComponentRef> ports = new TreeMap<String, PortComponentRef>();
            for (final PortComponentRef portComponentRef : serviceRef.getPortComponentRef()) {
                ports.put(portComponentRef.getServiceEndpointInterface(), portComponentRef);
            }
            for (final PortInfo portInfo : ref.getPortInfo()) {
                final PortComponentRef portComponentRef = ports.get(portInfo.getServiceEndpointInterface());
                if (portComponentRef != null) {
                    final WsdlPort wsdlPort = portInfo.getWsdlPort();
                    if (wsdlPort != null) {
                        final QName qname = new QName(wsdlPort.getNamespaceURI(), wsdlPort.getLocalpart());
                        portComponentRef.setQName(qname);
                    }
                    for (final StubProperty stubProperty : portInfo.getStubProperty()) {
                        final String name = stubProperty.getName();
                        final String value = stubProperty.getValue();
                        portComponentRef.getProperties().setProperty(name, value);
                    }
                }
            }
            final String wsdlOverride = ref.getWsdlOverride();
            if (wsdlOverride != null && wsdlOverride.length() > 0) {
                final String serviceId = extractServiceId(wsdlOverride);
                serviceRef.setMappedName(serviceId);
            }
        }
    }
}
Also used : WsdlPort(org.apache.openejb.jee.sun.WsdlPort) PortInfo(org.apache.openejb.jee.sun.PortInfo) MessageDestinationRef(org.apache.openejb.jee.sun.MessageDestinationRef) JndiReference(org.apache.openejb.jee.JndiReference) EjbRef(org.apache.openejb.jee.sun.EjbRef) ResourceEnvRef(org.apache.openejb.jee.sun.ResourceEnvRef) ApplicationClient(org.apache.openejb.jee.ApplicationClient) SunApplicationClient(org.apache.openejb.jee.sun.SunApplicationClient) QName(javax.xml.namespace.QName) StubProperty(org.apache.openejb.jee.sun.StubProperty) TreeMap(java.util.TreeMap) SunApplicationClient(org.apache.openejb.jee.sun.SunApplicationClient) PortComponentRef(org.apache.openejb.jee.PortComponentRef) ResourceRef(org.apache.openejb.jee.sun.ResourceRef) ServiceRef(org.apache.openejb.jee.ServiceRef)

Example 4 with StubProperty

use of org.apache.openejb.jee.sun.StubProperty in project tomee by apache.

the class SunConversion method mergeEjbConfig.

private void mergeEjbConfig(final EjbModule ejbModule, final SunEjbJar sunEjbJar) {
    final EjbJar ejbJar = ejbModule.getEjbJar();
    final OpenejbJar openejbJar = ejbModule.getOpenejbJar();
    if (openejbJar == null) {
        return;
    }
    if (sunEjbJar == null) {
        return;
    }
    if (sunEjbJar.getEnterpriseBeans() == null) {
        return;
    }
    final Map<String, Map<String, WebserviceEndpoint>> endpointMap = new HashMap<String, Map<String, WebserviceEndpoint>>();
    for (final Ejb ejb : sunEjbJar.getEnterpriseBeans().getEjb()) {
        final EjbDeployment deployment = openejbJar.getDeploymentsByEjbName().get(ejb.getEjbName());
        if (deployment == null) {
            // warn no matching deployment
            continue;
        }
        // ejb jndi name is the deploymentId
        if (ejb.getJndiName() != null) {
            deployment.setDeploymentId(ejb.getJndiName());
        }
        // map ejb-ref jndi name declaration to deploymentId
        final Map<String, EjbLink> linksMap = deployment.getEjbLinksMap();
        for (final EjbRef ref : ejb.getEjbRef()) {
            if (ref.getJndiName() != null) {
                String refName = ref.getEjbRefName();
                refName = normalize(refName);
                EjbLink link = linksMap.get(refName);
                if (link == null) {
                    link = new EjbLink();
                    link.setEjbRefName(refName);
                    linksMap.put(refName, link);
                    deployment.getEjbLink().add(link);
                }
                link.setDeployentId(ref.getJndiName());
            }
        }
        final Map<String, ResourceLink> resourceLinksMap = deployment.getResourceLinksMap();
        for (final ResourceRef ref : ejb.getResourceRef()) {
            if (ref.getJndiName() != null) {
                String refName = ref.getResRefName();
                refName = normalize(refName);
                ResourceLink link = resourceLinksMap.get(refName);
                if (link == null) {
                    link = new ResourceLink();
                    link.setResRefName(refName);
                    resourceLinksMap.put(refName, link);
                    deployment.getResourceLink().add(link);
                }
                link.setResId(ref.getJndiName());
            }
        }
        for (final ResourceEnvRef ref : ejb.getResourceEnvRef()) {
            if (ref.getJndiName() != null) {
                String refName = ref.getResourceEnvRefName();
                refName = normalize(refName);
                ResourceLink link = resourceLinksMap.get(refName);
                if (link == null) {
                    link = new ResourceLink();
                    link.setResRefName(refName);
                    resourceLinksMap.put(refName, link);
                    deployment.getResourceLink().add(link);
                }
                link.setResId(ref.getJndiName());
            }
        }
        for (final MessageDestinationRef ref : ejb.getMessageDestinationRef()) {
            if (ref.getJndiName() != null) {
                String refName = ref.getMessageDestinationRefName();
                refName = normalize(refName);
                ResourceLink link = resourceLinksMap.get(refName);
                if (link == null) {
                    link = new ResourceLink();
                    link.setResRefName(refName);
                    resourceLinksMap.put(refName, link);
                    deployment.getResourceLink().add(link);
                }
                link.setResId(ref.getJndiName());
            }
        }
        final EnterpriseBean bean = ejbJar.getEnterpriseBeansByEjbName().get(ejb.getEjbName());
        if (bean != null) {
            final Map<String, ServiceRef> serviceRefMap = bean.getServiceRefMap();
            for (final org.apache.openejb.jee.sun.ServiceRef ref : ejb.getServiceRef()) {
                String refName = ref.getServiceRefName();
                refName = normalize(refName);
                final ServiceRef serviceRef = serviceRefMap.get(refName);
                if (serviceRef != null) {
                    final Map<String, PortComponentRef> ports = new TreeMap<String, PortComponentRef>();
                    for (final PortComponentRef portComponentRef : serviceRef.getPortComponentRef()) {
                        ports.put(portComponentRef.getServiceEndpointInterface(), portComponentRef);
                    }
                    for (final PortInfo portInfo : ref.getPortInfo()) {
                        final PortComponentRef portComponentRef = ports.get(portInfo.getServiceEndpointInterface());
                        if (portComponentRef != null) {
                            final WsdlPort wsdlPort = portInfo.getWsdlPort();
                            if (wsdlPort != null) {
                                final QName qname = new QName(wsdlPort.getNamespaceURI(), wsdlPort.getLocalpart());
                                portComponentRef.setQName(qname);
                            }
                            for (final StubProperty stubProperty : portInfo.getStubProperty()) {
                                final String name = stubProperty.getName();
                                final String value = stubProperty.getValue();
                                portComponentRef.getProperties().setProperty(name, value);
                            }
                        }
                    }
                    final String wsdlOverride = ref.getWsdlOverride();
                    if (wsdlOverride != null && wsdlOverride.length() > 0) {
                        final String serviceId = extractServiceId(wsdlOverride);
                        serviceRef.setMappedName(serviceId);
                    }
                }
            }
        }
        if (ejb.getMdbResourceAdapter() != null) {
            // resource adapter id is the MDB container ID
            final String resourceAdapterId = ejb.getMdbResourceAdapter().getResourceAdapterMid();
            deployment.setContainerId(resourceAdapterId);
        }
        endpointMap.put(ejb.getEjbName(), ejb.getWebserviceEndpointMap());
    }
    // map wsdl locations
    if (ejbModule.getWebservices() != null) {
        final Map<String, org.apache.openejb.jee.sun.WebserviceDescription> sunDescriptions = sunEjbJar.getEnterpriseBeans().getWebserviceDescriptionMap();
        for (final WebserviceDescription description : ejbModule.getWebservices().getWebserviceDescription()) {
            final org.apache.openejb.jee.sun.WebserviceDescription sunDescription = sunDescriptions.get(description.getWebserviceDescriptionName());
            // get the serviceId if specified
            String serviceId = null;
            if (sunDescription != null) {
                serviceId = extractSerivceId(sunDescription.getWsdlPublishLocation(), description.getWsdlFile());
            }
            if (serviceId != null) {
                description.setId(serviceId);
            }
            for (final PortComponent port : description.getPortComponent()) {
                // set the ejb bind location
                final ServiceImplBean bean = port.getServiceImplBean();
                if (bean != null && bean.getEjbLink() != null) {
                    final Map<String, WebserviceEndpoint> endpoints = endpointMap.get(bean.getEjbLink());
                    if (endpoints != null) {
                        final WebserviceEndpoint endpoint = endpoints.get(port.getPortComponentName());
                        if (endpoint != null && endpoint.getEndpointAddressUri() != null) {
                            port.setLocation(endpoint.getEndpointAddressUri());
                        }
                    }
                }
            }
        }
    }
}
Also used : EnterpriseBean(org.apache.openejb.jee.EnterpriseBean) PortComponent(org.apache.openejb.jee.PortComponent) HashMap(java.util.HashMap) WsdlPort(org.apache.openejb.jee.sun.WsdlPort) PortInfo(org.apache.openejb.jee.sun.PortInfo) MessageDestinationRef(org.apache.openejb.jee.sun.MessageDestinationRef) OpenejbJar(org.apache.openejb.jee.oejb3.OpenejbJar) ResourceLink(org.apache.openejb.jee.oejb3.ResourceLink) EjbRef(org.apache.openejb.jee.sun.EjbRef) ResourceEnvRef(org.apache.openejb.jee.sun.ResourceEnvRef) EjbJar(org.apache.openejb.jee.EjbJar) SunEjbJar(org.apache.openejb.jee.sun.SunEjbJar) ServiceImplBean(org.apache.openejb.jee.ServiceImplBean) QName(javax.xml.namespace.QName) StubProperty(org.apache.openejb.jee.sun.StubProperty) WebserviceEndpoint(org.apache.openejb.jee.sun.WebserviceEndpoint) TreeMap(java.util.TreeMap) EjbLink(org.apache.openejb.jee.oejb3.EjbLink) PortComponentRef(org.apache.openejb.jee.PortComponentRef) WebserviceDescription(org.apache.openejb.jee.WebserviceDescription) EjbDeployment(org.apache.openejb.jee.oejb3.EjbDeployment) ResourceRef(org.apache.openejb.jee.sun.ResourceRef) Ejb(org.apache.openejb.jee.sun.Ejb) Map(java.util.Map) HashMap(java.util.HashMap) TreeMap(java.util.TreeMap) ServiceRef(org.apache.openejb.jee.ServiceRef)

Aggregations

TreeMap (java.util.TreeMap)4 QName (javax.xml.namespace.QName)4 PortComponentRef (org.apache.openejb.jee.PortComponentRef)4 ServiceRef (org.apache.openejb.jee.ServiceRef)4 EjbRef (org.apache.openejb.jee.sun.EjbRef)4 MessageDestinationRef (org.apache.openejb.jee.sun.MessageDestinationRef)4 PortInfo (org.apache.openejb.jee.sun.PortInfo)4 ResourceEnvRef (org.apache.openejb.jee.sun.ResourceEnvRef)4 ResourceRef (org.apache.openejb.jee.sun.ResourceRef)4 StubProperty (org.apache.openejb.jee.sun.StubProperty)4 WsdlPort (org.apache.openejb.jee.sun.WsdlPort)4 JndiReference (org.apache.openejb.jee.JndiReference)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ApplicationClient (org.apache.openejb.jee.ApplicationClient)2 WebserviceDescription (org.apache.openejb.jee.WebserviceDescription)2 SunApplicationClient (org.apache.openejb.jee.sun.SunApplicationClient)2 EjbJar (org.apache.openejb.jee.EjbJar)1 EnterpriseBean (org.apache.openejb.jee.EnterpriseBean)1 PortComponent (org.apache.openejb.jee.PortComponent)1