• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SOAPBindingImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.xml.internal.ws.binding.SOAPBindingImpl的典型用法代码示例。如果您正苦于以下问题:Java SOAPBindingImpl类的具体用法?Java SOAPBindingImpl怎么用?Java SOAPBindingImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SOAPBindingImpl类属于com.sun.xml.internal.ws.binding包,在下文中一共展示了SOAPBindingImpl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: parse

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
/**
 * Parses a binding ID string into a {@link BindingID} object.
 *
 * <p>
 * This method first checks for a few known values and then delegate
 * the parsing to {@link BindingIDFactory}.
 *
 * <p>
 * If parsing succeeds this method returns a value. Otherwise
 * throws {@link WebServiceException}.
 *
 * @throws WebServiceException
 *      If the binding ID is not understood.
 */
public static @NotNull BindingID parse(String lexical) {
    if(lexical.equals(XML_HTTP.toString()))
        return XML_HTTP;
    if(lexical.equals(REST_HTTP.toString()))
        return REST_HTTP;
    if(belongsTo(lexical,SOAP11_HTTP.toString()))
        return customize(lexical,SOAP11_HTTP);
    if(belongsTo(lexical,SOAP12_HTTP.toString()))
        return customize(lexical,SOAP12_HTTP);
    if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING))
        return customize(lexical,X_SOAP12_HTTP);

    // OK, it's none of the values JAX-WS understands.
    for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) {
        BindingID r = f.parse(lexical);
        if(r!=null)
            return r;
    }

    // nobody understood this value
    throw new WebServiceException("Wrong binding ID: "+lexical);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:BindingID.java


示例2: generateWSDL

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
/**
 * Generates the WSDL and XML Schema for the endpoint if necessary
 * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings
 */
private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs,
                                           Container container, Class implType) {
    BindingID bindingId = binding.getBindingId();
    if (!bindingId.canGenerateWSDL()) {
        throw new ServerRtException("can.not.generate.wsdl", bindingId);
    }

    if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) {
        String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL();
        logger.warning(msg);
    }

    // Generate WSDL and schema documents using runtime model
    WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName());
    WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false,
            ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
    wsdlGen.doGeneration();
    return wsdlResolver.updateDocs();
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:24,代码来源:EndpointFactory.java


示例3: MUTube

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
protected MUTube(WSBinding binding, Tube next) {
    super(next);
    // MUPipe should n't be used for bindings other than SOAP.
    if (!(binding instanceof SOAPBinding)) {
        throw new WebServiceException(
                "MUPipe should n't be used for bindings other than SOAP.");
    }
    this.binding = (SOAPBindingImpl) binding;
    this.soapVersion = binding.getSOAPVersion();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:MUTube.java


示例4: getNotUnderstoodHeaders

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
@Override
public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding) {
    Set<QName> notUnderstoodHeaders = null;
    if (roles == null) {
        roles = new HashSet<String>();
    }
    SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding);
    roles.add(effectiveSoapVersion.implicitRole);
    for (int i = 0; i < size(); i++) {
        if (!isUnderstood(i)) {
            Header header = get(i);
            if (!header.isIgnorable(effectiveSoapVersion, roles)) {
                QName qName = new QName(header.getNamespaceURI(), header.getLocalPart());
                if (binding == null) {
                    //if binding is null, no further checks needed...we already
                    //know this header is not understood from the isUnderstood
                    //check above
                    if (notUnderstoodHeaders == null) {
                        notUnderstoodHeaders = new HashSet<QName>();
                    }
                    notUnderstoodHeaders.add(qName);
                } else {
                    // if the binding is not null, see if the binding can understand it
                    if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) {
                        if (!knownHeaders.contains(qName)) {
                            //logger.info("Element not understood=" + qName);
                            if (notUnderstoodHeaders == null) {
                                notUnderstoodHeaders = new HashSet<QName>();
                            }
                            notUnderstoodHeaders.add(qName);
                        }
                    }
                }
            }
        }
    }
    return notUnderstoodHeaders;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:HeaderList.java


示例5: generateWSDL

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
/**
     * Generates the WSDL and XML Schema for the endpoint if necessary
     * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings
     */
    private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs,
                                               Container container, Class implType) {
        BindingID bindingId = binding.getBindingId();
        if (!bindingId.canGenerateWSDL()) {
            throw new ServerRtException("can.not.generate.wsdl", bindingId);
        }

        if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) {
            String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL();
            logger.warning(msg);
        }

        // Generate WSDL and schema documents using runtime model
        WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName());
        WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
        wsdlGenInfo.setWsdlResolver(wsdlResolver);
        wsdlGenInfo.setContainer(container);
        wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
        wsdlGenInfo.setInlineSchemas(false);
        wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures()));
        seiModel.getDatabinding().generateWSDL(wsdlGenInfo);
//        WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false,
//                ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
//        wsdlGen.doGeneration();
        return wsdlResolver.updateDocs();
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:EndpointFactory.java


示例6: create

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
public static <T> ProviderInvokerTube<T>
create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) {

    final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding);
    final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding);
    if (binding instanceof SOAPBindingImpl) {
        //set portKnownHeaders on Binding, so that they can be used for MU processing
        ((SOAPBindingImpl) binding).setMode(model.mode);
    }

    return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ProviderInvokerTube.java


示例7: WsgenOptions

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
public WsgenOptions() {
    protocols.add(SOAP11);
    protocols.add(X_SOAP12);
    nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING);
    ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class);
    for(WsgenExtension ext : extn) {
        Class clazz = ext.getClass();
        WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class);
        protocols.add(pro.token());
        nonstdProtocols.put(pro.token(), pro.lexical());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:WsgenOptions.java


示例8: generateWSDL

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
/**
     * Generates the WSDL and XML Schema for the endpoint if necessary
     * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings
     */
    private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, Collection<SDDocumentImpl> docs,
                                               Container container, Class implType) {
        BindingID bindingId = binding.getBindingId();
        if (!bindingId.canGenerateWSDL()) {
            throw new ServerRtException("can.not.generate.wsdl", bindingId);
        }

        if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) {
            String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL();
            logger.warning(msg);
        }

        // Generate WSDL and schema documents using runtime model
        WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName());
        WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
        wsdlGenInfo.setWsdlResolver(wsdlResolver);
        wsdlGenInfo.setContainer(container);
        wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
        wsdlGenInfo.setInlineSchemas(false);
        wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures()));
        seiModel.getDatabinding().generateWSDL(wsdlGenInfo);
//        WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false,
//                ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
//        wsdlGen.doGeneration();
        return wsdlResolver.updateDocs();
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:EndpointFactory.java


示例9: createBinding

import com.sun.xml.internal.ws.binding.SOAPBindingImpl; //导入依赖的package包/类
public BindingImpl createBinding(WebServiceFeature[] webServiceFeatures, Class<?> portInterface) {
     BindingImpl bindingImpl = super.createBinding(webServiceFeatures,portInterface);
     if(bindingImpl instanceof SOAPBindingImpl) {
        ((SOAPBindingImpl)bindingImpl).setPortKnownHeaders(model.getKnownHeaders());
     }
     //Not needed as set above in super.createBinding() call
     //bindingImpl.setFeatures(webServiceFeatures);
     return bindingImpl;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:10,代码来源:SEIPortInfo.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OFFeaturesRequest类代码示例发布时间:2022-05-23
下一篇:
Java ComponentDefinition类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap