Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo


        QName portName = null;
        if (p != null) {
            portName = p.getName();
        }
        if (portName != null) {
            ServiceRefPortInfo i = svcRef.getPortInfoByPort(portName);
            if (i != null) {
                binding = i.getMessageSecurityBinding();
            }
        }
        return binding;
    }
View Full Code Here


    public void accept(ServiceReferenceDescriptor serviceRef) {

        Set portsInfo = serviceRef.getPortsInfo();

        for(Iterator iter = portsInfo.iterator(); iter.hasNext();) {
            ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();

            if( next.hasPortComponentLinkName() &&
                !next.isLinkedToPortComponent() ) {
                WebServiceEndpoint portComponentLink = next.resolveLinkName();
                if( portComponentLink == null ) {
                    String linkName = next.getPortComponentLinkName();
                    DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
                        new Object[] {"port-component" , linkName});
                }                                                  
            }
View Full Code Here

                             descriptor.getServiceNameNamespacePrefix());
        }

        for(Iterator iter = descriptor.getPortsInfo().iterator();
            iter.hasNext();) {
            ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
            String sei = next.getServiceEndpointInterface();
            Node portComponentRefNode = appendChild(
                serviceRefNode, WebServicesTagNames.PORT_COMPONENT_REF);
            appendTextChild(portComponentRefNode,
                WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE,
                sei);
            appendTextChild(portComponentRefNode,
                WebServicesTagNames.ENABLE_MTOM,
                next.getMtomEnabled());
            if (descriptor.getAddressing() != null) {
                AddressingNode adNode = new AddressingNode();
                adNode.writeDescriptor(portComponentRefNode,
                    WebServicesTagNames.ADDRESSING,
                    descriptor.getAddressing());
            }
            appendTextChild(portComponentRefNode,
                WebServicesTagNames.PORT_COMPONENT_LINK,
                next.getPortComponentLinkName());
        }

        WebServiceHandlerNode handlerNode = new WebServiceHandlerNode();
        handlerNode.writeWebServiceHandlers(serviceRefNode,
                                            descriptor.getHandlers());
View Full Code Here

    public static boolean isServiceJBIEnabled(ServiceReferenceDescriptor desc) {
        if(isServiceEngineEnabled()) {
            java.util.Set portsInfo = desc.getPortsInfo();
            java.util.Iterator ports = portsInfo.iterator();
            while(ports.hasNext()) {
                ServiceRefPortInfo portDesc = (ServiceRefPortInfo)ports.next();
                if(isPortJbiEnabled(portDesc))
                    return true;
            }
        }
        return false;
View Full Code Here

                case GET_PORT_CONTAINER_MANAGED :
                    Class serviceEndpointInterfaceClass = (Class) args[0];
                    String serviceEndpointInterface =
                            serviceEndpointInterfaceClass.getName();
                    ServiceRefPortInfo portInfo =
                            serviceRef.getPortInfo(serviceEndpointInterface);

                    // If we have a port, use it to call getPort(QName, SEI) instead
                    if( (portInfo != null) && portInfo.hasWsdlPort() ) {
                        methodToInvoke = getClientManagedPortMethod;
                        methodTypeToInvoke = GET_PORT_CLIENT_MANAGED;
                        argsForInvoke  = new Object[] { portInfo.getWsdlPort(),
                                args[0] };
                    } else {
                        // This means the deployer did not resolve the port to
                        // which this SEI is mapped.  Just call getPort(SEI)
                        // method on delegate. This is not guaranteed to work.
View Full Code Here

    public HandlerInfo getMessageSecurityHandlerInfo(QName port) throws Exception
    {
        HandlerInfo rvalue = null;

        MessageSecurityBindingDescriptor binding = null;
        ServiceRefPortInfo portInfo = serviceRef.getPortInfoByPort(port);
        if (portInfo != null) {
            binding = portInfo.getMessageSecurityBinding();
        }
        if (secServ != null) {
           rvalue = secServ.getMessageSecurityHandler(binding, serviceRef.getServiceName());
        }
        return rvalue;
View Full Code Here

            default :
                return;
        }

        ServiceRefPortInfo portInfo = null;

        // If port is known, it takes precedence in lookup.
        if( port != null ) {
            portInfo = serviceRef.getPortInfoByPort(port);
        }
        if( portInfo == null ) {
            portInfo = serviceRef.getPortInfoBySEI(serviceEndpointInterface);
        }

        if( portInfo != null ) {
            Set properties = portInfo.getStubProperties();

            for(Iterator iter = properties.iterator(); iter.hasNext();) {
                NameValuePairDescriptor next = (NameValuePairDescriptor)
                        iter.next();
                if( next.getName().equals
                        (WsUtil.CLIENT_TRANSPORT_LOG_PROPERTY) ) {
                    // value is a URL
                    wsUtil.setClientTransportLog(serviceRef, stub,
                            next.getValue());
                } else if(next.getName().equals(ServiceEngineUtil.JBI_ENABLED)){
                    setJBIProperties(stub, portInfo);
                } else {
                    stub._setProperty(next.getName(), next.getValue());
                }
            }

            // If this port has a resolved target endpoint address due to a
            // port-component-link, set it on stub.  However, if the runtime
            // info has an entry for target endpoint address, that takes
            // precedence.
            if( portInfo.hasTargetEndpointAddress() ) {
                if(!portInfo.hasStubProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)) {
                    stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
                            portInfo.getTargetEndpointAddress());
                }
            }
        }
    }
View Full Code Here

                // Each of these methods has port as first argument.
                QName port = (QName) args[0];

                // Check if call properties are set at the port level.
                ServiceRefPortInfo portInfo =
                        serviceRef.getPortInfoByPort(port);
                if( portInfo != null ) {
                    callProperties = portInfo.getCallProperties();
                }

                break;

            case CREATE_CALL_NO_ARGS :
View Full Code Here

    }
   
    public Object getPort(Class sei) {
        checkUnsupportedMethods(GET_PORT_CONTAINER_MANAGED);
        String serviceEndpointInterface = sei.getName();
        ServiceRefPortInfo portInfo =
                serviceRef.getPortInfo(serviceEndpointInterface);
        Object retVal;
        if( (portInfo != null) && portInfo.hasWsdlPort() ) {
            retVal = getPort(portInfo.getWsdlPort(), sei);
        } else {
            retVal = serviceDelegate.getPort(sei);
        }
        return retVal;
    }
View Full Code Here

        // as endpoint in the intra-app case because of app clients.
        //
        // Also set port-qname based on linked port's qname if not
        // already set.
        for(Iterator iter = desc.getPortsInfo().iterator(); iter.hasNext();) {
            ServiceRefPortInfo portInfo = (ServiceRefPortInfo) iter.next();

            if( portInfo.isLinkedToPortComponent() ) {
                WebServiceEndpoint linkedPortComponent =
                        portInfo.getPortComponentLink();

                // XXX-JD we could at this point try to figure out the
                // endpoint-address from the ejb wsdl file but it is a
                // little complicated so I will leave it for post Beta2
                if( !(portInfo.hasWsdlPort()) ) {
                    portInfo.setWsdlPort(linkedPortComponent.getWsdlPort());
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.ServiceRefPortInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.