Examples of ServiceRefPortInfo


Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

                             descriptor.getServiceNameNamespacePrefix());
        }

        for(Iterator iter = descriptor.getPortsInfo().iterator();
            iter.hasNext();) {
            ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
            if( next.isContainerManaged() ) {
                String serviceEndpointInterface =
                    next.getServiceEndpointInterface();
                Node portComponentRefNode = appendChild
                    (serviceRefNode, WebServicesTagNames.PORT_COMPONENT_REF);
                appendTextChild(portComponentRefNode,
                                WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE,
                                serviceEndpointInterface);
                appendTextChild(portComponentRefNode,
                                WebServicesTagNames.ENABLE_MTOM,
                                next.getMtomEnabled());
                appendTextChild(portComponentRefNode,
                                WebServicesTagNames.PORT_COMPONENT_LINK,
                                next.getPortComponentLinkName());
            }
        }

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

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

                if (aRef.getServiceInterface()==null) {
                    aRef.setServiceInterface(annotation.value().getName());
                }
               
                if (aRef.getPortInfoBySEI(annotatedType.getName())==null) {
                    ServiceRefPortInfo portInfo = new ServiceRefPortInfo();
                    portInfo.setServiceEndpointInterface(annotatedType.getName());
                    aRef.addPortInfo(portInfo);
                }
                // set the port type requested for injection
                if (aRef.getInjectionTargetType()==null) {
                    aRef.setInjectionTargetType(annotatedType.getName());
View Full Code Here

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

    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

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

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

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

        // ServiceEngineUtil is used here because a package level variable of
        // WSClientContainer is used to get the portInfo
        //For all jsr109 invocations container will be WSClientContainer. The
        //normal invocations need to check if there is a composite application.
        ServiceRefPortInfo portInfo =
                (context.getContainer() instanceof WSClientContainer)?
                        ServiceEngineUtil.getPortInfo((WSClientContainer)context.getContainer(),
                                                    context.getWsdlModel().getName()):
                        null;

        if(portInfo == null) {
            if(hasRegisteredEndpointInJBI(facade, context))
                return createJBITransportPipe(facade, context);
            return null;
        }

        NameValuePairDescriptor stubProp =
                                portInfo.getStubPropertyByName("jbi-enabled");
        // In a composite application jbi-enabled flag can be used to override
        // the client routing logic
        if(stubProp == null) {
            if(hasRegisteredEndpointInJBI(facade, context))
                return createJBITransportPipe(facade, context);
View Full Code Here

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

            // 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 ports = serviceRef.getPortsInfo().iterator(); ports.hasNext();) {
                ServiceRefPortInfo portInfo = (ServiceRefPortInfo) ports.next();
               
                if( portInfo.isLinkedToPortComponent() ) {
                    WebServiceEndpoint linkedPortComponent = portInfo.getPortComponentLink();
                   
                    if (linkedPortComponent==null) {
                        throw new GeneratorException(localStrings.getLocalString(
             "enterprise.webservice.componentlinkunresolved",
                           "The port-component-link {0} cannot be resolved",
                           new Object[] {portInfo.getPortComponentLinkName()}));
                    }
                    WsUtil wsUtil = new WsUtil();
                    WebServerInfo wsi = wsUtil.getWebServerInfo(context.getDeploymentRequest());
                    URL rootURL = wsi.getWebServerRootURL(linkedPortComponent.isSecure());
                    URL actualAddress = linkedPortComponent.composeEndpointAddress(rootURL);
                    if(jaxwsClient) {
                        portInfo.addStubProperty(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                actualAddress.toExternalForm());
                    } else {
                        portInfo.addStubProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, actualAddress.toExternalForm());
                    }
                    if (serviceRef.getBundleDescriptor().getModuleType().equals(ModuleType.CAR)) {
                        wsdlOverride = serviceRef.getWsdlOverride();
      if (wsdlOverride!=null) {
                            wsdlOverriden = true;
View Full Code Here

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

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

                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

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

    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

Examples of com.sun.enterprise.deployment.ServiceRefPortInfo

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

                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
TOP
Copyright © 2018 www.massapi.com. 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.