com.sun.xml.internal.ws.api.client.WSPortInfo Java Examples

The following examples show how to use com.sun.xml.internal.ws.api.client.WSPortInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Stubs.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a new {@link Dispatch} stub that connects to the given pipe.
 *
 * @param portInfo
 *      see <a href="#param">common parameters</a>
 * @param owner
 *      see <a href="#param">common parameters</a>
 * @param binding
 *      see <a href="#param">common parameters</a>
 * @param clazz
 *      Type of the {@link Dispatch} to be created.
 *      See {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param mode
 *      The mode of the dispatch.
 *      See {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param epr
 *      see <a href="#param">common parameters</a>
 * TODO: are these parameters making sense?
 */
public static <T> Dispatch<T> createDispatch(WSPortInfo portInfo,
                                             WSService owner,
                                             WSBinding binding,
                                             Class<T> clazz, Service.Mode mode,
                                             @Nullable WSEndpointReference epr) {
    if (clazz == SOAPMessage.class) {
        return (Dispatch<T>) createSAAJDispatch(portInfo, binding, mode, epr);
    } else if (clazz == Source.class) {
        return (Dispatch<T>) createSourceDispatch(portInfo, binding, mode, epr);
    } else if (clazz == DataSource.class) {
        return (Dispatch<T>) createDataSourceDispatch(portInfo, binding, mode, epr);
    } else if (clazz == Message.class) {
        if(mode==Mode.MESSAGE)
            return (Dispatch<T>) createMessageDispatch(portInfo, binding, epr);
        else
            throw new WebServiceException(mode+" not supported with Dispatch<Message>");
    } else if (clazz == Packet.class) {
        if(mode==Mode.MESSAGE)
            return (Dispatch<T>) createPacketDispatch(portInfo, binding, epr);
        else
            throw new WebServiceException(mode+" not supported with Dispatch<Packet>");
    } else
        throw new WebServiceException("Unknown class type " + clazz.getName());
}
 
Example #2
Source File: Stubs.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a new {@link Dispatch} stub that connects to the given pipe.
 *
 * @param portInfo
 *      see <a href="#param">common parameters</a>
 * @param owner
 *      see <a href="#param">common parameters</a>
 * @param binding
 *      see <a href="#param">common parameters</a>
 * @param clazz
 *      Type of the {@link Dispatch} to be created.
 *      See {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param mode
 *      The mode of the dispatch.
 *      See {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param epr
 *      see <a href="#param">common parameters</a>
 * TODO: are these parameters making sense?
 */
public static <T> Dispatch<T> createDispatch(WSPortInfo portInfo,
                                             WSService owner,
                                             WSBinding binding,
                                             Class<T> clazz, Service.Mode mode,
                                             @Nullable WSEndpointReference epr) {
    if (clazz == SOAPMessage.class) {
        return (Dispatch<T>) createSAAJDispatch(portInfo, binding, mode, epr);
    } else if (clazz == Source.class) {
        return (Dispatch<T>) createSourceDispatch(portInfo, binding, mode, epr);
    } else if (clazz == DataSource.class) {
        return (Dispatch<T>) createDataSourceDispatch(portInfo, binding, mode, epr);
    } else if (clazz == Message.class) {
        if(mode==Mode.MESSAGE)
            return (Dispatch<T>) createMessageDispatch(portInfo, binding, epr);
        else
            throw new WebServiceException(mode+" not supported with Dispatch<Message>");
    } else if (clazz == Packet.class) {
        if(mode==Mode.MESSAGE)
            return (Dispatch<T>) createPacketDispatch(portInfo, binding, epr);
        else
            throw new WebServiceException(mode+" not supported with Dispatch<Packet>");
    } else
        throw new WebServiceException("Unknown class type " + clazz.getName());
}
 
Example #3
Source File: HandlerConfigurator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void logGetChain(WSPortInfo info) {
    logger.fine("No handler chain found for port info:");
    logPortInfo(info, Level.FINE);
    logger.fine("Existing handler chains:");
    if (chainMap.isEmpty()) {
        logger.fine("none");
    } else {
        for (WSPortInfo key : chainMap.keySet()) {
            logger.fine(chainMap.get(key).getHandlers().size() +
                " handlers for port info ");
            logPortInfo(key, Level.FINE);
        }
    }
}
 
Example #4
Source File: SEIStub.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public SEIStub(WSPortInfo portInfo, BindingImpl binding, SOAPSEIModel seiModel, WSEndpointReference epr) {
    super(portInfo, binding, seiModel.getPort().getAddress(),epr);
    this.seiModel = seiModel;
    this.soapVersion = binding.getSOAPVersion();
    databinding = seiModel.getDatabinding();
    initMethodHandlers();
}
 
Example #5
Source File: ManagedClientAssertion.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Return ManagedClient assertion if there is one associated with the client.
 *
 * @param portInfo The client PortInfo.
 * @return The policy assertion if found. Null otherwise.
 * @throws WebServiceException If computing the effective policy of the port failed.
 */
public static ManagedClientAssertion getAssertion(WSPortInfo portInfo) throws WebServiceException {
    if (portInfo == null)
            return null;

    LOGGER.entering(portInfo);
    // getPolicyMap is deprecated because it is only supposed to be used by Metro code
    // and not by other clients.
    @SuppressWarnings("deprecation")
    final PolicyMap policyMap = portInfo.getPolicyMap();
    final ManagedClientAssertion assertion = ManagementAssertion.getAssertion(MANAGED_CLIENT_QNAME,
            policyMap, portInfo.getServiceName(), portInfo.getPortName(), ManagedClientAssertion.class);
    LOGGER.exiting(assertion);
    return assertion;
}
 
Example #6
Source File: MessageDispatch.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public MessageDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
        super(portInfo, Mode.MESSAGE, binding, epr, true);
}
 
Example #7
Source File: DispatchImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
    if (isXMLHttp(binding))
        return new RESTSourceDispatch(portInfo, mode, binding, epr);
    else
        return new SOAPSourceDispatch(portInfo, mode, binding, epr);
}
 
Example #8
Source File: PacketDispatch.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public PacketDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, Mode.MESSAGE, binding, epr, true);
    isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
}
 
Example #9
Source File: Stub.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example #10
Source File: Stub.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example #11
Source File: MessageDispatch.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public MessageDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
        super(portInfo, Mode.MESSAGE, binding, epr, true);
}
 
Example #12
Source File: DataSourceDispatch.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public DataSourceDispatch(WSPortInfo portInfo, Service.Mode mode,BindingImpl binding, WSEndpointReference epr) {
   super(portInfo, mode, binding, epr );
}
 
Example #13
Source File: SOAPMessageDispatch.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public SOAPMessageDispatch(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, mode, binding, epr);
}
 
Example #14
Source File: DataSourceDispatch.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public DataSourceDispatch(WSPortInfo portInfo, Service.Mode mode,BindingImpl binding, WSEndpointReference epr) {
   super(portInfo, mode, binding, epr );
}
 
Example #15
Source File: SOAPSourceDispatch.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public SOAPSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
        super(portInfo, mode, binding, epr);
        assert !isXMLHttp(binding);
}
 
Example #16
Source File: Stub.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public WSPortInfo getPortInfo() {
    return portInfo;
}
 
Example #17
Source File: MessageDispatch.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public MessageDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
        super(portInfo, Mode.MESSAGE, binding, epr, true);
}
 
Example #18
Source File: PacketDispatch.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public PacketDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, Mode.MESSAGE, binding, epr, true);
    isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
}
 
Example #19
Source File: HandlerConfigurator.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
void configureHandlers(@NotNull WSPortInfo port, @NotNull BindingImpl binding) {
    if (resolver!=null) {
        binding.setHandlerChain(resolver.getHandlerChain(port));
    }
}
 
Example #20
Source File: SOAPMessageDispatch.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public SOAPMessageDispatch(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, mode, binding, epr);
}
 
Example #21
Source File: PacketDispatch.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public PacketDispatch(WSPortInfo portInfo, Tube pipe, BindingImpl binding, WSEndpointReference epr, boolean allowFaultResponseMsg) {
    super(portInfo, Mode.MESSAGE, pipe, binding, epr, allowFaultResponseMsg);
    isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
}
 
Example #22
Source File: HandlerConfigurator.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void logPortInfo(WSPortInfo info, Level level) {
    logger.log(level, "binding: " + info.getBindingID() +
        "\nservice: " + info.getServiceName() +
        "\nport: " + info.getPortName());
}
 
Example #23
Source File: PacketDispatch.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public PacketDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, Mode.MESSAGE, binding, epr, true);
    isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
}
 
Example #24
Source File: SOAPMessageDispatch.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public SOAPMessageDispatch(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, mode, binding, epr);
}
 
Example #25
Source File: DataSourceDispatch.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public DataSourceDispatch(WSPortInfo portInfo, Service.Mode mode,BindingImpl binding, WSEndpointReference epr) {
   super(portInfo, mode, binding, epr );
}
 
Example #26
Source File: PacketDispatch.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public PacketDispatch(WSPortInfo portInfo, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
    this(portInfo, pipe, binding, epr, true);
}
 
Example #27
Source File: SOAPSourceDispatch.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public SOAPSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
        super(portInfo, mode, binding, epr);
        assert !isXMLHttp(binding);
}
 
Example #28
Source File: HandlerConfigurator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void logSetChain(WSPortInfo info, HandlerAnnotationInfo chain) {
    logger.finer("Setting chain of length " + chain.getHandlers().size() +
        " for port info");
    logPortInfo(info, Level.FINER);
}
 
Example #29
Source File: DefaultClientTubelineAssemblyContext.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public WSPortInfo getPortInfo() {
    return portInfo;
}
 
Example #30
Source File: HandlerConfigurator.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
void configureHandlers(@NotNull WSPortInfo port, @NotNull BindingImpl binding) {
    if (resolver!=null) {
        binding.setHandlerChain(resolver.getHandlerChain(port));
    }
}