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

Java BindingID类代码示例

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

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



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

示例1: parseAnnotations

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 *
 * @param endpointClass web service impl class
 */
public void parseAnnotations(Class<?> endpointClass) {
    for (Annotation a : endpointClass.getAnnotations()) {
        WebServiceFeature ftr = getFeature(a);
        if (ftr != null) {
            if (ftr instanceof MTOMFeature) {
                // check conflict with @BindingType
                BindingID bindingID = BindingID.parse(endpointClass);
                MTOMFeature bindingMtomSetting = bindingID.createBuiltinFeatureList().get(MTOMFeature.class);
                if (bindingMtomSetting != null && bindingMtomSetting.isEnabled() ^ ftr.isEnabled()) {
                    throw new RuntimeModelerException(
                        ModelerMessages.RUNTIME_MODELER_MTOM_CONFLICT(bindingID, ftr.isEnabled()));
                }
            }
            add(ftr);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:WebServiceFeatureList.java


示例2: createPipeline

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 * Creates a new pipeline for the given port name.
 */
private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
    //Check all required WSDL extensions are understood
    checkAllWSDLExtensionsUnderstood(portInfo, binding);
    SEIModel seiModel = null;
    Class sei = null;
    if (portInfo instanceof SEIPortInfo) {
            SEIPortInfo sp = (SEIPortInfo) portInfo;
        seiModel = sp.model;
        sei = sp.sei;
    }
    BindingID bindingId = portInfo.getBindingId();

    TubelineAssembler assembler = TubelineAssemblerFactory.create(
            Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer());
    if (assembler == null) {
        throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n
    }
    return assembler.createClient(
            new ClientTubeAssemblerContext(
                    portInfo.getEndpointAddress(),
                    portInfo.getPort(),
                    this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Stub.java


示例3: property

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
public Builder property(String name, Object value) {
    config.properties().put(name, value);
    if (isfor(BindingID.class, name, value)) {
        config.getMappingInfo().setBindingID((BindingID)value);
    }
    if (isfor(WSBinding.class, name, value)) {
        config.setWSBinding((WSBinding)value);
    }
    if (isfor(WSDLPort.class, name, value)) {
        config.setWsdlPort((WSDLPort)value);
    }
    if (isfor(MetadataReader.class, name, value)) {
        config.setMetadataReader((MetadataReader)value);
    }
    return this;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:DatabindingFactoryImpl.java


示例4: parseAnnotations

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 * Reads {@link WebServiceFeatureAnnotation feature annotations} on a class
 * and adds them to the list.
 *
 * @param endpointClass web service impl class
 */
public void parseAnnotations(Class<?> endpointClass) {
    for (Annotation a : endpointClass.getAnnotations()) {
        WebServiceFeature ftr = getFeature(a);
        if (ftr != null) {
            if (ftr instanceof MTOMFeature) {
                // check conflict with @BindingType
                BindingID bindingID = BindingID.parse(endpointClass);
                MTOMFeature bindingMtomSetting = bindingID.createBuiltinFeatureList().get(MTOMFeature.class);
                if (bindingMtomSetting != null && bindingMtomSetting.isEnabled() ^ ftr.isEnabled()) {
                    throw new RuntimeModelerException(
                        ModelerMessages.RUNTIME_MODELER_MTOM_CONFLICT(bindingID, ftr.isEnabled()));
                }
            }
            add(ftr);
        }
    }
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:24,代码来源:WebServiceFeatureList.java


示例5: createPipeline

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 * Creates a new pipeline for the given port name.
 */
private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
    //Check all required WSDL extensions are understood
    checkAllWSDLExtensionsUnderstood(portInfo,binding);
    SEIModel seiModel = null;
    if(portInfo instanceof SEIPortInfo) {
        seiModel = ((SEIPortInfo)portInfo).model;
    }
    BindingID bindingId = portInfo.getBindingId();

    TubelineAssembler assembler = TubelineAssemblerFactory.create(
            Thread.currentThread().getContextClassLoader(), bindingId);
    if (assembler == null)
        throw new WebServiceException("Unable to process bindingID=" + bindingId);    // TODO: i18n
    return assembler.createClient(
            new ClientTubeAssemblerContext(
                    portInfo.getEndpointAddress(),
                    portInfo.getPort(),
                    this, binding, owner.getContainer(),((BindingImpl)binding).createCodec(),seiModel));
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:23,代码来源:Stub.java


示例6: generateWSDL

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的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


示例7: create

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 * Locates {@link PipelineAssemblerFactory}s and create
 * a suitable {@link PipelineAssembler}.
 *
 * @param bindingId
 *      The binding ID string for which the new {@link PipelineAssembler}
 *      is created. Must not be null.
 * @return
 *      Always non-null, since we fall back to our default {@link PipelineAssembler}.
 */
public static PipelineAssembler create(ClassLoader classLoader, BindingID bindingId) {
    for (PipelineAssemblerFactory factory : ServiceFinder.find(PipelineAssemblerFactory.class,classLoader)) {
        PipelineAssembler assembler = factory.doCreate(bindingId);
        if(assembler!=null) {
            logger.fine(factory.getClass()+" successfully created "+assembler);
            return assembler;
        }
    }

    // default binding IDs that are known
    // TODO: replace this with proper ones
    return new com.sun.xml.internal.ws.util.pipe.StandalonePipeAssembler();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:PipelineAssemblerFactory.java


示例8: BindingImpl

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
protected BindingImpl(BindingID bindingId, WebServiceFeature ... features) {
    this.bindingId = bindingId;
    handlerConfig = new HandlerConfiguration(Collections.<String>emptySet(), Collections.<Handler>emptyList());
    if (handlerConfig.getHandlerKnownHeaders() != null)
        knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders());
    this.features = new WebServiceFeatureList(features);
    this.features.validate();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:BindingImpl.java


示例9: create

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
public static BindingImpl create(@NotNull BindingID bindingId, WebServiceFeature[] features) {
    // Override the BindingID from the features
    for(WebServiceFeature feature : features) {
        if (feature instanceof BindingTypeFeature) {
            BindingTypeFeature f = (BindingTypeFeature)feature;
            bindingId = BindingID.parse(f.getBindingId());
        }
    }
    if (bindingId.equals(BindingID.XML_HTTP))
        return new HTTPBindingImpl(features);
    else
        return new SOAPBindingImpl(bindingId, features);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:BindingImpl.java


示例10: SOAPBindingImpl

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 * Use {@link BindingImpl#create(BindingID)} to create this.
 *
 * @param bindingId binding id
 * @param features
 *      These features have a precedence over
 *      {@link BindingID#createBuiltinFeatureList() the implicit features}
 *      associated with the {@link BindingID}.
 */
SOAPBindingImpl(BindingID bindingId, WebServiceFeature... features) {
    super(bindingId, features);
    this.soapVersion = bindingId.getSOAPVersion();
    //populates with required roles and updates handlerConfig
    setRoles(new HashSet<String>());
    //Is this still required? comment out for now
    //setupSystemHandlerDelegate(serviceName);

    this.features.addAll(bindingId.createBuiltinFeatureList());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:SOAPBindingImpl.java


示例11: createAndPublishEndpoint

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
@Override
public Endpoint createAndPublishEndpoint(String address,
                                         Object implementor) {
    Endpoint endpoint = new EndpointImpl(
        BindingID.parse(implementor.getClass()),
        implementor);
    endpoint.publish(address);
    return endpoint;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ProviderImpl.java


示例12: getDefaultBindingID

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
private BindingID getDefaultBindingID() {
BindingType bt = getAnnotation(portClass, BindingType.class);
if (bt != null) return BindingID.parse(bt.value());
SOAPVersion ver = getSoapVersion(features);
boolean mtomEnabled = features.isEnabled(MTOMFeature.class);
if (SOAPVersion.SOAP_12.equals(ver)) {
    return (mtomEnabled) ? BindingID.SOAP12_HTTP_MTOM : BindingID.SOAP12_HTTP;
} else {
    return (mtomEnabled) ? BindingID.SOAP11_HTTP_MTOM : BindingID.SOAP11_HTTP;
}
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:RuntimeModeler.java


示例13: addProtocolBinding

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
public void addProtocolBinding(String tokenOrURI){
    /*
    Convert short-form tokens to API's binding ids
    Unknown token, Put it as it is
    */
    tokenOrURI = DeploymentDescriptorParser.getBindingIdForToken(tokenOrURI);
    String binding = BindingID.parse(tokenOrURI).toString();
    protocolBindings.add(binding);
    constraintSet = true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:HandlerChainsModel.java


示例14: PortInfoImpl

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
/**
 * The class is constructed with the information needed to identify
 * a port. This information cannot be changed later.
 *
 * @param bindingId The binding ID string.
 * @param portName The QName of the port.
 * @param serviceName The QName of the service.
 */
public PortInfoImpl(BindingID bindingId, QName portName, QName serviceName) {
    if (bindingId == null) {
        throw new RuntimeException("bindingId cannot be null");
    }
    if (portName == null) {
        throw new RuntimeException("portName cannot be null");
    }
    if (serviceName == null) {
        throw new RuntimeException("serviceName cannot be null");
    }
    this.bindingId = bindingId;
    this.portName = portName;
    this.serviceName = serviceName;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:PortInfoImpl.java


示例15: PortInfo

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
public PortInfo(WSServiceDelegate owner, EndpointAddress targetEndpoint, QName name, BindingID bindingId) {
    this.owner = owner;
    this.targetEndpoint = targetEndpoint;
    this.portName = name;
    this.bindingId = bindingId;
    this.portModel = getPortModel(owner, name);
    this.policyMap = createPolicyMap();

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:PortInfo.java


示例16: addPort

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
    if (!ports.containsKey(portName)) {
        BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
        ports.put(portName,
                new PortInfo(this, (endpointAddress == null) ? null :
                        EndpointAddress.create(endpointAddress), portName, bid));
    } else
        throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:WSServiceDelegate.java


示例17: EndpointImpl

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
private EndpointImpl(@NotNull BindingID bindingId, Object impl, @NotNull Class implClass,
                    Invoker invoker, WebServiceFeature ... features) {
    binding = BindingImpl.create(bindingId, features);
    this.implClass = implClass;
    this.invoker = invoker;
    this.implementor = impl;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:EndpointImpl.java


示例18: generateWSDL

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的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


示例19: createBindingId

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
private static BindingID createBindingId(String transport, SOAPVersion soapVersion) {
    if (!transport.equals(SOAPConstants.URI_SOAP_TRANSPORT_HTTP)) {
        for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) {
            BindingID bindingId = f.create(transport, soapVersion);
            if(bindingId!=null) {
                return bindingId;
            }
        }
    }
    return soapVersion.equals(SOAPVersion.SOAP_11)?BindingID.SOAP11_HTTP:BindingID.SOAP12_HTTP;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:RuntimeWSDLParser.java


示例20: validateBinding

import com.sun.xml.internal.ws.api.BindingID; //导入依赖的package包/类
private void validateBinding() throws BadCommandLineException {
    if (genWsdl) {
        BindingID binding = BindingID.parse(endpoint);
        if ((binding.equals(BindingID.SOAP12_HTTP) ||
             binding.equals(BindingID.SOAP12_HTTP_MTOM)) &&
                !(protocol.equals(X_SOAP12) && isExtensionMode())) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName()));
        }
        if (binding.equals(BindingID.XML_HTTP)) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName()));
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:WsgenOptions.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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