Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo


    }
   
    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


        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 &&
                (new Boolean(portInfo.getMtomEnabled())).booleanValue()) {
                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 {
                    WsUtil.getDefaultLogger().log(Level.SEVERE,
                            WsUtil.getDefaultStringManager().getLocalString("serviceref.invalidmtom",
                            "MTOM is valid only for SOAP Bindings; Ignoring Enable-MTOM for port {0}",
                            new Object[] {serviceEndpointInterface}));
                }
            }
           
            // 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

            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();
  }

  ClientAuthConfig config = ClientAuthConfig.getConfig
      (com.sun.enterprise.security.jauth.AuthConfig.SOAP,
       binding, null);
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 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

             NameValuePairNode.class, "addCallProperty");
    }
   
    public void addDescriptor(Object desc) {
        if( desc instanceof ServiceRefPortInfo ) {
            ServiceRefPortInfo newPortInfo = (ServiceRefPortInfo) desc;
            ServiceReferenceDescriptor serviceRef =
                (ServiceReferenceDescriptor) getDescriptor();
            serviceRef.addRuntimePortInfo(newPortInfo);
        }
    }
View Full Code Here

        ServiceRefPortInfoRuntimeNode portInfoRuntimeNode =
            new ServiceRefPortInfoRuntimeNode();

        Set portsInfo = serviceRef.getPortsInfo();
        for(Iterator iter = portsInfo.iterator(); iter.hasNext();) {
            ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
            portInfoRuntimeNode.writeDescriptor
                (serviceRefNode, WebServicesTagNames.PORT_INFO, next);
        }

        NameValuePairNode nameValueNode = new NameValuePairNode();
View Full Code Here

    public void setElementValue(XMLElement element, String value) {
        String name = element.getQName();
        if (WebServicesTagNames.NAMESPACE_URI.equals(name)) {
            namespaceUri = value;
        } else if (WebServicesTagNames.LOCAL_PART.equals(name)) {
            ServiceRefPortInfo desc = (ServiceRefPortInfo)
                getDescriptor();
            QName wsdlPort = new QName(namespaceUri, value);
            desc.setWsdlPort(wsdlPort);
            namespaceUri = null;
        } else super.setElementValue(element, value);
       
    }
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.