Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo


                // 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


        ref = svcRef;
    }
   
    public void postCreateProxy(WSBindingProvider bp, Class<?> serviceEndpointInterface) {
       
        ServiceRefPortInfo portInfo = ref.getPortInfoBySEI(serviceEndpointInterface.getName());
        if (portInfo!=null) {         
            // Set MTOM for this port
            boolean mtomEnabled = false;
            if(portInfo.getMtomEnabled() != null &&
                Boolean.valueOf( portInfo.getMtomEnabled())) {
                mtomEnabled = true;
            }
            if (mtomEnabled) {
                Binding bType = bp.getBinding();
                // enable mtom valid only for SOAPBindings
                if(SOAPBinding.class.isAssignableFrom(bType.getClass())) {
                    ((SOAPBinding)bType).setMTOMEnabled(true);
                } else {
                    logger.log(Level.SEVERE,
                            "serviceref.invalidmtom");
                }
            }
           
            // Set stub properties
            Set properties = portInfo.getStubProperties();           
            for(Iterator iter = properties.iterator(); iter.hasNext();) {
                NameValuePairDescriptor next = (NameValuePairDescriptor)
                    iter.next();
                bp.getRequestContext().put(next.getName(), next.getValue());
               
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

        ref = svcRef;
    }
   
    public void postCreateProxy(WSBindingProvider bp, Class<?> serviceEndpointInterface) {
       
        ServiceRefPortInfo portInfo = ref.getPortInfoBySEI(serviceEndpointInterface.getName());
        if (portInfo!=null) {         
            // Set MTOM for this port
            boolean mtomEnabled = false;
            if(portInfo.getMtomEnabled() != null &&
                Boolean.valueOf( portInfo.getMtomEnabled())) {
                mtomEnabled = true;
            }
            if (mtomEnabled) {
                Binding bType = bp.getBinding();
                // enable mtom valid only for SOAPBindings
                if(SOAPBinding.class.isAssignableFrom(bType.getClass())) {
                    ((SOAPBinding)bType).setMTOMEnabled(true);
                } else {
                    logger.log(Level.SEVERE, LogUtils.INVALID_MTOM, portInfo.getName());
                }
            }
           
            // Set stub properties
            Set properties = portInfo.getStubProperties();           
            for(Iterator iter = properties.iterator(); iter.hasNext();) {
                NameValuePairDescriptor next = (NameValuePairDescriptor)
                    iter.next();
                bp.getRequestContext().put(next.getName(), next.getValue());
               
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

        }


        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

        }


        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

        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

    protected 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, DOLUtils.INVALID_DESC_MAPPING,
                        new Object[] {"port-component" , linkName});
                }                                                  
            }
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.