当前位置: 首页>>代码示例>>Java>>正文


Java Service.Mode方法代码示例

本文整理汇总了Java中javax.xml.ws.Service.Mode方法的典型用法代码示例。如果您正苦于以下问题:Java Service.Mode方法的具体用法?Java Service.Mode怎么用?Java Service.Mode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.ws.Service的用法示例。


在下文中一共展示了Service.Mode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    WSEndpointReference wsepr = null;
    boolean isAddressingEnabled = false;
    AddressingFeature af = features.get(AddressingFeature.class);
    if (af == null) {
        af = this.features.get(AddressingFeature.class);
    }
    if (af != null && af.isEnabled())
        isAddressingEnabled = true;
    MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class);
    if (msa == null) {
        msa = this.features.get(MemberSubmissionAddressingFeature.class);
    }
    if (msa != null && msa.isEnabled())
        isAddressingEnabled = true;
    if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) {
        wsepr = wsdlService.get(portName).getEPR();
    }
    return createDispatch(portName, wsepr, aClass, mode, features);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:WSServiceDelegate.java

示例2: createDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * 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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:44,代码来源:Stubs.java

示例3: checkValidSOAPMessageDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
    if (DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:DispatchImpl.java

示例4: SOAPMessageDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
public SOAPMessageDispatch(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, mode, binding, epr);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:SOAPMessageDispatch.java

示例5: createDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
public Dispatch<Object> createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features) {
    WSEndpointReference wsepr = new WSEndpointReference(endpointReference);
    QName portName = addPortEpr(wsepr);
    return createDispatch(portName, wsepr, context, mode, features);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:WSServiceDelegate.java

示例6: DataSourceDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
public DataSourceDispatch(WSPortInfo portInfo, Service.Mode mode,BindingImpl binding, WSEndpointReference epr) {
   super(portInfo, mode, binding, epr );
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:DataSourceDispatch.java

示例7: DataSourceDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
@Deprecated
public DataSourceDispatch(QName port, Service.Mode mode, WSServiceDelegate service, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
   super(port, mode, service, pipe, binding, epr );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:DataSourceDispatch.java

示例8: createDataSourceDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Creates a new {@link Dispatch} stub for {@link DataSource}.
 *
 * This is short-cut of calling
 * <pre>
 * createDispatch(port,owner,binding,DataSource.class,mode,next);
 * </pre>
 */
@Deprecated
public static Dispatch<DataSource> createDataSourceDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr) {
    DispatchImpl.checkValidDataSourceDispatch(binding, mode);
    return new DataSourceDispatch(portName, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Stubs.java

示例9: createDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Creates a <code>Dispatch</code> instance for use with JAXB
 * generated objects.
 *
 * @param portName  Qualified name for the target service endpoint
 * @param context The JAXB context used to marshall and unmarshall
 * messages or message payloads.
 * @param mode Controls whether the created dispatch instance is message
 * or payload oriented, i.e. whether the user will work with complete
 * protocol messages or message payloads. E.g. when using the SOAP
 * protocol, this parameter controls whether the user will work with
 * SOAP messages or the contents of a SOAP body.
 * @param features  A list of <code>WebServiceFeatures</code> to configure on the
 *                proxy.  Supported features not in the <code>features
 *                </code> parameter will have their default values.
 *
 * @return Dispatch instance
 * @throws WebServiceException If any error in the creation of
 *                  the <code>Dispatch</code> object or if a
 *                  feature is enabled that is not compatible with
 *                  this port or is unsupported.
 *
 * @see javax.xml.bind.JAXBContext
 * @see WebServiceFeature
 *
 * @since JAX-WS 2.1
 **/
public abstract Dispatch<Object> createDispatch(QName portName,
        JAXBContext context, Service.Mode mode, WebServiceFeature... features);
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:ServiceDelegate.java

示例10: createSAAJDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Creates a new {@link Dispatch} stub for {@link SOAPMessage}.
 *
 * This is short-cut of calling
 * <pre>
 * createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
 * </pre>
 */
public static Dispatch<SOAPMessage> createSAAJDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr) {
    DispatchImpl.checkValidSOAPMessageDispatch(binding, mode);
    return new com.sun.xml.internal.ws.client.dispatch.SOAPMessageDispatch(portInfo, mode, (BindingImpl)binding, epr);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:Stubs.java

示例11: DispatchImpl

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * @param portInfo dispatch instance is associated with this portInfo
 * @param mode     Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
 * @param binding  Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
 */
protected DispatchImpl(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, @Nullable WSEndpointReference epr) {
    this(portInfo, mode, binding, epr, false);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:DispatchImpl.java

示例12: createSourceDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Creates a new {@link Dispatch} stub for {@link Source}.
 *
 * This is short-cut of calling
 * <pre>
 * createDispatch(port,owner,binding,Source.class,mode,next);
 * </pre>
 */
public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr) {
    return DispatchImpl.createSourceDispatch(portInfo, mode, (BindingImpl)binding, epr);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:Stubs.java

示例13: getServiceMode

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Is it PAYLOAD or MESSAGE ??
 *
 * @param c endpoint class
 * @return Service.Mode.PAYLOAD or Service.Mode.MESSAGE
 */
private static Service.Mode getServiceMode(Class<?> c) {
    ServiceMode mode = c.getAnnotation(ServiceMode.class);
    return (mode == null) ? Service.Mode.PAYLOAD : mode.value();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:ProviderEndpointModel.java

示例14: createDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Works like {@link #createDispatch(javax.xml.ws.EndpointReference, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature[])}
 * but it takes the port name separately, so that EPR without embedded metadata can be used.
 */
public abstract Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeature... features);
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:WSService.java

示例15: createDispatch

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Creates a {@code Dispatch} instance for use with objects of
 * the user's choosing.
 *
 * @param <T> type used for messages or message payloads. Implementations are required to
 * support {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 * @param portName  Qualified name for the target service endpoint
 * @param type The class of object used for messages or message
 * payloads. Implementations are required to support
 * {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 * @param mode Controls whether the created dispatch instance is message
 * or payload oriented, i.e. whether the user will work with complete
 * protocol messages or message payloads. E.g. when using the SOAP
 * protocol, this parameter controls whether the user will work with
 * SOAP messages or the contents of a SOAP body. Mode MUST be {@code MESSAGE}
 * when type is {@code SOAPMessage}.
 *
 * @return Dispatch instance
 * @throws WebServiceException If any error in the creation of
 *                  the {@code Dispatch} object
 * @see javax.xml.transform.Source
 * @see javax.xml.soap.SOAPMessage
 **/
public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
        Service.Mode mode);
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:ServiceDelegate.java


注:本文中的javax.xml.ws.Service.Mode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。