本文整理汇总了Java中com.sun.xml.internal.ws.api.BindingID类的典型用法代码示例。如果您正苦于以下问题:Java BindingID类的具体用法?Java BindingID怎么用?Java BindingID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BindingID类属于com.sun.xml.internal.ws.api包,在下文中一共展示了BindingID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
}
示例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));
}
示例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;
}
示例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);
}
}
}
示例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));
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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());
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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();
}