本文整理汇总了Java中com.sun.xml.internal.ws.api.WSBinding类的典型用法代码示例。如果您正苦于以下问题:Java WSBinding类的具体用法?Java WSBinding怎么用?Java WSBinding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WSBinding类属于com.sun.xml.internal.ws.api包,在下文中一共展示了WSBinding类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: create
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
/**
* The same as
* {@link #create(Class, boolean, Invoker, QName, QName, Container, WSBinding, SDDocumentSource, Collection, EntityResolver)}
* except that this version takes an url of the {@code jax-ws-catalog.xml}.
*
* @param catalogUrl
* if not null, an {@link EntityResolver} is created from it and used.
* otherwise no resolution will be performed.
*/
public static <T> WSEndpoint<T> create(
@NotNull Class<T> implType,
boolean processHandlerAnnotation,
@Nullable Invoker invoker,
@Nullable QName serviceName,
@Nullable QName portName,
@Nullable Container container,
@Nullable WSBinding binding,
@Nullable SDDocumentSource primaryWsdl,
@Nullable Collection<? extends SDDocumentSource> metadata,
@Nullable URL catalogUrl) {
return create(
implType,processHandlerAnnotation,invoker,serviceName,portName,container,binding,primaryWsdl,metadata,
XmlUtil.createEntityResolver(catalogUrl),false);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:WSEndpoint.java
示例2: createPipeline
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的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: populateAddressingHeaders
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
private void populateAddressingHeaders(WSBinding binding, Packet responsePacket, WSDLPort wsdlPort, SEIModel seiModel) {
AddressingVersion addressingVersion = binding.getAddressingVersion();
if (addressingVersion == null) {
return;
}
WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, seiModel, binding);
String action = responsePacket.getMessage().isFault() ?
wsaHelper.getFaultAction(this, responsePacket) :
wsaHelper.getOutputAction(this);
if (action == null) {
LOGGER.info("WSA headers are not added as value for wsa:Action cannot be resolved for this message");
return;
}
populateAddressingHeaders(responsePacket, addressingVersion, binding.getSOAPVersion(), action, AddressingVersion.isRequired(binding));
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:Packet.java
示例4: createDispatch
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的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:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:Stubs.java
示例5: createSEIModel
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
SDDocumentSource primaryWsdl) {
DatabindingFactory fac = DatabindingFactory.newInstance();
DatabindingConfig config = new DatabindingConfig();
config.setEndpointClass(implType);
config.getMappingInfo().setServiceName(serviceName);
config.setWsdlPort(wsdlPort);
config.setWSBinding(binding);
config.setClassLoader(implType.getClassLoader());
config.getMappingInfo().setPortName(portName);
if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
config.setMetadataReader(getExternalMetadatReader(implType, binding));
com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
return (AbstractSEIModelImpl) rt.getModel();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:EndpointFactory.java
示例6: create
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
/**
* The same as
* {@link #create(Class, boolean, Invoker, QName, QName, Container, WSBinding, SDDocumentSource, Collection, EntityResolver)}
* except that this version takes an url of the <tt>jax-ws-catalog.xml</tt>.
*
* @param catalogUrl
* if not null, an {@link EntityResolver} is created from it and used.
* otherwise no resolution will be performed.
*/
public static <T> WSEndpoint<T> create(
@NotNull Class<T> implType,
boolean processHandlerAnnotation,
@Nullable Invoker invoker,
@Nullable QName serviceName,
@Nullable QName portName,
@Nullable Container container,
@Nullable WSBinding binding,
@Nullable SDDocumentSource primaryWsdl,
@Nullable Collection<? extends SDDocumentSource> metadata,
@Nullable URL catalogUrl) {
return create(
implType,processHandlerAnnotation,invoker,serviceName,portName,container,binding,primaryWsdl,metadata,
XmlUtil.createEntityResolver(catalogUrl),false);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:WSEndpoint.java
示例7: setUpProcessor
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
void setUpProcessor() {
if (handlers == null) {
// Take a snapshot, User may change chain after invocation, Same chain
// should be used for the entire MEP
handlers = new ArrayList<Handler>();
WSBinding binding = getBinding();
List<LogicalHandler> logicalSnapShot= ((BindingImpl) binding).getHandlerConfig().getLogicalHandlers();
if (!logicalSnapShot.isEmpty()) {
handlers.addAll(logicalSnapShot);
if (binding.getSOAPVersion() == null) {
processor = new XMLHandlerProcessor(this, binding,
handlers);
} else {
processor = new SOAPHandlerProcessor(true, this, binding,
handlers);
}
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:ClientLogicalHandlerTube.java
示例8: update
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
/**
* Generates an MTOM policy if MTOM is enabled.
*
* <ol>
* <li>If MTOM is enabled
* <ol>
* <li>If MTOM policy does not already exist, generate
* <li>Otherwise do nothing
* </ol>
* <li>Otherwise, do nothing (that implies that we do not remove any MTOM policies if MTOM is disabled)
* </ol>
*
*/
public Collection<PolicySubject> update(PolicyMap policyMap, SEIModel model, WSBinding wsBinding) throws PolicyException {
LOGGER.entering(policyMap, model, wsBinding);
Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
if (policyMap != null) {
final MTOMFeature mtomFeature = wsBinding.getFeature(MTOMFeature.class);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("mtomFeature = " + mtomFeature);
}
if ((mtomFeature != null) && mtomFeature.isEnabled()) {
final QName bindingName = model.getBoundPortTypeName();
final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
final Policy mtomPolicy = createMtomPolicy(bindingName);
final PolicySubject mtomPolicySubject = new PolicySubject(wsdlSubject, mtomPolicy);
subjects.add(mtomPolicySubject);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.fine("Added MTOM policy with ID \"" + mtomPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
}
}
} // endif policy map not null
LOGGER.exiting(subjects);
return subjects;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:38,代码来源:MtomPolicyMapConfigurator.java
示例9: setHandlersAndRoles
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
/**
* Parses the handler and role information and sets it
* on the {@link WSBinding}.
*
* @return true if <handler-chains> element present in DD
* false otherwise.
*/
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {
if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
!reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
return false;
}
HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
reader, classLoader, serviceName, portName, binding);
binding.setHandlerChain(handlerInfo.getHandlers());
if (binding instanceof SOAPBinding) {
((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
}
// move past </handler-chains>
XMLStreamReaderUtil.nextContent(reader);
return true;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:DeploymentDescriptorParser.java
示例10: MUTube
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的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
示例11: relateServerResponse
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
relatePackets(r, false);
r.setState(State.ServerResponse);
AddressingVersion av = binding.getAddressingVersion();
// populate WS-A headers only if WS-A is enabled
if (av == null) {
return r;
}
if (getMessage() == null) {
return r;
}
//populate WS-A headers only if the request has addressing headers
String inputAction = AddressingUtils.getAction(getMessage().getHeaders(), av, binding.getSOAPVersion());
if (inputAction == null) {
return r;
}
// if one-way, then dont populate any WS-A headers
if (r.getMessage() == null || (wsdlPort != null && getMessage().isOneWay(wsdlPort))) {
return r;
}
// otherwise populate WS-Addressing headers
populateAddressingHeaders(binding, r, wsdlPort, seiModel);
return r;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:Packet.java
示例12: getBinding
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
public WSBinding getBinding() {
if (endpoint != null) {
return endpoint.getBinding();
}
if (proxy != null) {
return (WSBinding) proxy.getBinding();
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Packet.java
示例13: getResponse
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
/**
* Creates {@link Packet} from method invocation's return value
*/
protected Packet getResponse(Packet request, @Nullable T returnValue, WSDLPort port, WSBinding binding) {
Message message = null;
if (returnValue != null) {
message = getResponseMessage(returnValue);
}
Packet response = request.createServerResponse(message,port,null,binding);
return response;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:ProviderArgumentsBuilder.java
示例14: getNotUnderstoodHeaders
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的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
示例15: getEffectiveSOAPVersion
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
private SOAPVersion getEffectiveSOAPVersion(WSBinding binding) {
SOAPVersion mySOAPVersion = (soapVersion != null) ? soapVersion : binding.getSOAPVersion();
if (mySOAPVersion == null) {
mySOAPVersion = SOAPVersion.SOAP_11;
}
return mySOAPVersion;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:HeaderList.java
示例16: createEndpoint
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
/**
* Implements {@link WSEndpoint#create}.
*
* No need to take WebServiceContext implementation. When InvokerPipe is
* instantiated, it calls InstanceResolver to set up a WebServiceContext.
* We shall only take delegate to getUserPrincipal and isUserInRole from adapter.
*
* <p>
* Nobody else should be calling this method.
*/
public static <T> WSEndpoint<T> createEndpoint(
Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker,
@Nullable QName serviceName, @Nullable QName portName,
@Nullable Container container, @Nullable WSBinding binding,
@Nullable SDDocumentSource primaryWsdl,
@Nullable Collection<? extends SDDocumentSource> metadata,
EntityResolver resolver, boolean isTransportSynchronous) {
return createEndpoint(implType, processHandlerAnnotation, invoker, serviceName,
portName, container, binding, primaryWsdl, metadata, resolver, isTransportSynchronous, true);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:EndpointFactory.java
示例17: create
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的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:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:ProviderInvokerTube.java
示例18: WSEndpointImpl
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container,
SEIModel seiModel, WSDLPort port,
Tube masterTubeline) {
this.serviceName = serviceName;
this.portName = portName;
this.binding = binding;
this.soapVersion = binding.getSOAPVersion();
this.container = container;
this.endpointPolicy = null;
this.port = port;
this.seiModel = seiModel;
this.serviceDef = null;
this.implementationClass = null;
this.masterTubeline = masterTubeline;
this.masterCodec = ((BindingImpl) this.binding).createCodec();
LazyMOMProvider.INSTANCE.registerEndpoint(this);
initManagedObjectManager();
this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel);
this.context = new ServerPipeAssemblerContext(
seiModel, port, this, null /* not known */, false);
tubePool = new TubePool(masterTubeline);
engine = new Engine(toString(), container);
wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:WSEndpointImpl.java
示例19: getMtomFeature
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
public MTOMFeature getMtomFeature() {
//If we have a binding, use that in preference to an explicitly
//set MTOMFeature
WSBinding binding = getBinding();
if (binding != null) {
return binding.getFeature(MTOMFeature.class);
}
return mtomFeature;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:Packet.java
示例20: isSticky
import com.sun.xml.internal.ws.api.WSBinding; //导入依赖的package包/类
private static boolean isSticky(WSBinding binding) {
boolean tSticky = false;
WebServiceFeature[] features = binding.getFeatures().toArray();
for(WebServiceFeature f : features) {
if (f instanceof StickyFeature) {
tSticky = true;
break;
}
}
return tSticky;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:HttpTransportPipe.java
注:本文中的com.sun.xml.internal.ws.api.WSBinding类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论