本文整理汇总了Java中com.sun.xml.internal.ws.api.addressing.AddressingVersion类的典型用法代码示例。如果您正苦于以下问题:Java AddressingVersion类的具体用法?Java AddressingVersion怎么用?Java AddressingVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AddressingVersion类属于com.sun.xml.internal.ws.api.addressing包,在下文中一共展示了AddressingVersion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isAddressingEngagedOrRequired
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
final boolean isAddressingEngagedOrRequired(Packet packet, WSBinding binding) {
if (AddressingVersion.isRequired(binding))
return true;
if (packet == null)
return false;
if (packet.getMessage() == null)
return false;
if (packet.getMessage().getHeaders() != null)
return false;
String action = AddressingUtils.getAction(
packet.getMessage().getHeaders(),
addressingVersion, soapVersion);
if (action == null)
return true;
return true;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:WsaTube.java
示例2: fillRequestAddressingHeaders
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) {
fillCommonAddressingHeaders(headers, packet, av, sv, action, mustUnderstand);
// wsa:ReplyTo
// null or "true" is equivalent to request/response MEP
if (!oneway) {
WSEndpointReference epr = av.anonymousEpr;
if (headers.get(av.replyToTag, false) == null) {
headers.add(epr.createHeader(av.replyToTag));
}
// wsa:FaultTo
if (headers.get(av.faultToTag, false) == null) {
headers.add(epr.createHeader(av.faultToTag));
}
// wsa:MessageID
if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
if (headers.get(av.messageIDTag, false) == null) {
Header h = new StringHeader(av.messageIDTag, Message.generateMessageID());
headers.add(h);
}
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:AddressingUtils.java
示例3: getFaultTo
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public static WSEndpointReference getFaultTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(headers, av.faultToTag, true, sv);
WSEndpointReference faultTo = null;
if (h != null) {
try {
faultTo = h.readAsEPR(av);
} catch (XMLStreamException e) {
throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e);
}
}
return faultTo;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:AddressingUtils.java
示例4: getAttributes
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
private static Map<QName, String> getAttributes(Node node) {
Map<QName, String> attribs = null;
NamedNodeMap nm = node.getAttributes();
for (int i = 0; i < nm.getLength(); i++) {
if (attribs == null) {
attribs = new HashMap<QName, String>();
}
Node n = nm.item(i);
String prefix = fixNull(n.getPrefix());
String ns = fixNull(n.getNamespaceURI());
String localName = n.getLocalName();
if (prefix.equals("xmlns") || prefix.length() == 0 && localName.equals("xmlns")) {
continue;
}
//exclude some attributes
if (!localName.equals(AddressingVersion.W3C.eprType.portName)) {
attribs.put(new QName(ns, localName, prefix), n.getNodeValue());
}
}
return attribs;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:EndpointReferenceUtil.java
示例5: dumpParam
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
private void dumpParam(T param, String method) {
if (param instanceof Packet) {
Packet message = (Packet)param;
String action;
String msgId;
if (LOGGER.isLoggable(Level.FINE)) {
AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
action =
av != null && message.getMessage() != null ?
AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
msgId =
av != null && message.getMessage() != null ?
AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage());
if (message.getMessage() == null) {
LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId);
}
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:DispatchImpl.java
示例6: createServerResponse
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
/**
* Creates a server-side response {@link Packet} from a request
* packet ({@code this}). If WS-Addressing is enabled, <code>action</code>
* is used as Action Message Addressing Property.
* <p><p>
* This method should be called only for creating protocol response messages
* that require a particular value of Action since they are not associated
* with a {@link WSBinding} and {@link WSDLPort} but do know the {@link AddressingVersion}
* and {@link SOAPVersion}.
*
* @param responseMessage The {@link Message} that represents a reply. Can be null.
* @param addressingVersion The WS-Addressing version of the response message.
* @param soapVersion The SOAP version of the response message.
* @param action The response Action Message Addressing Property value.
* @return response packet
*/
public Packet createServerResponse(@Nullable Message responseMessage, @NotNull AddressingVersion addressingVersion, @NotNull SOAPVersion soapVersion, @NotNull String action) {
Packet responsePacket = createClientResponse(responseMessage);
responsePacket.setState(State.ServerResponse);
// populate WS-A headers only if WS-A is enabled
if (addressingVersion == null) {
return responsePacket;
}
//populate WS-A headers only if the request has addressing headers
String inputAction = AddressingUtils.getAction(this.getMessage().getHeaders(), addressingVersion, soapVersion);
if (inputAction == null) {
return responsePacket;
}
populateAddressingHeaders(responsePacket, addressingVersion, soapVersion, action, false);
return responsePacket;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:Packet.java
示例7: populateAddressingHeaders
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的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
示例8: readAsEPR
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
/**
* Default implementation that copies the infoset. Not terribly efficient.
*/
public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException {
XMLStreamReader xsr = readHeader();
WSEndpointReference epr = new WSEndpointReference(xsr, expected);
XMLStreamReaderFactory.recycle(xsr);
return epr;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:AbstractHeaderImpl.java
示例9: ProblemActionHeader
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public ProblemActionHeader(@NotNull String action, String soapAction, @NotNull AddressingVersion av) {
assert action!=null;
assert av!=null;
this.action = action;
this.soapAction = soapAction;
this.av = av;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ProblemActionHeader.java
示例10: bindingOperationElements
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
@Override
public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
EditableWSDLBoundOperation edit = (EditableWSDLBoundOperation) operation;
QName anon = reader.getName();
if (anon.equals(AddressingVersion.W3C.wsdlAnonymousTag)) {
try {
String value = reader.getElementText();
if (value == null || value.trim().equals("")) {
throw new WebServiceException("Null values not permitted in wsaw:Anonymous.");
// TODO: throw exception only if wsdl:required=true
// TODO: is this the right exception ?
} else if (value.equals("optional")) {
edit.setAnonymous(ANONYMOUS.optional);
} else if (value.equals("required")) {
edit.setAnonymous(ANONYMOUS.required);
} else if (value.equals("prohibited")) {
edit.setAnonymous(ANONYMOUS.prohibited);
} else {
throw new WebServiceException("wsaw:Anonymous value \"" + value + "\" not understood.");
// TODO: throw exception only if wsdl:required=true
// TODO: is this the right exception ?
}
} catch (XMLStreamException e) {
throw new WebServiceException(e); // TODO: is this the correct behavior ?
}
return true; // consumed the element
}
return false;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:W3CAddressingWSDLParserExtension.java
示例11: getID
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
/**
* Retuns a unique id for the message.
* <p><p>
* @see {@link #getID(com.sun.xml.internal.ws.api.WSBinding)} for detailed description.
* @param av WS-Addressing version
* @param sv SOAP version
* @return unique id for the message
* @deprecated
*/
public @NotNull String getID(AddressingVersion av, SOAPVersion sv) {
String uuid = null;
if (av != null) {
uuid = AddressingUtils.getMessageID(getHeaders(), av, sv);
}
if (uuid == null) {
uuid = generateMessageID();
getHeaders().add(new StringHeader(av.messageIDTag, uuid));
}
return uuid;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:Message.java
示例12: getAction
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public static String getAction(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
String action = null;
Header h = getFirstHeader(headers, av.actionTag, true, sv);
if (h != null) {
action = h.getStringContent();
}
return action;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:AddressingUtils.java
示例13: getMessageID
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public static String getMessageID(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(headers, av.messageIDTag, true, sv);
String messageId = null;
if (h != null) {
messageId = h.getStringContent();
}
return messageId;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:AddressingUtils.java
示例14: getRelatesTo
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public static String getRelatesTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(headers, av.relatesToTag, true, sv);
String relatesTo = null;
if (h != null) {
relatesTo = h.getStringContent();
}
return relatesTo;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:AddressingUtils.java
示例15: getTo
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
public static String getTo(MessageHeaders headers, AddressingVersion av, SOAPVersion sv) {
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(headers, av.toTag, true, sv);
String to;
if (h != null) {
to = h.getStringContent();
} else {
to = av.anonymousUri;
}
return to;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:AddressingUtils.java
示例16: addressibleElement
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
private boolean addressibleElement(XMLStreamReader reader, WSDLFeaturedObject binding) {
QName ua = reader.getName();
if (ua.equals(AddressingVersion.MEMBER.wsdlExtensionTag)) {
String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required");
binding.addFeature(new MemberSubmissionAddressingFeature(Boolean.parseBoolean(required)));
XMLStreamReaderUtil.skipElement(reader);
return true; // UsingAddressing is consumed
}
return false;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:MemberSubmissionAddressingWSDLParserExtension.java
示例17: start
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
@Override
public void start(WSDLGenExtnContext ctxt) {
WSBinding binding = ctxt.getBinding();
TypedXmlWriter root = ctxt.getRoot();
enabled = binding.isFeatureEnabled(AddressingFeature.class);
if (!enabled)
return;
AddressingFeature ftr = binding.getFeature(AddressingFeature.class);
required = ftr.isRequired();
root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix());
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:W3CAddressingWSDLGeneratorExtension.java
示例18: dumpFiberContext
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
private void dumpFiberContext(String desc) {
if(isTraceEnabled()) {
String action = null;
String msgId = null;
if (packet != null) {
for (SOAPVersion sv: SOAPVersion.values()) {
for (AddressingVersion av: AddressingVersion.values()) {
action = packet.getMessage() != null ? AddressingUtils.getAction(packet.getMessage().getHeaders(), av, sv) : null;
msgId = packet.getMessage() != null ? AddressingUtils.getMessageID(packet.getMessage().getHeaders(), av, sv) : null;
if (action != null || msgId != null) {
break;
}
}
if (action != null || msgId != null) {
break;
}
}
}
String actionAndMsgDesc;
if (action == null && msgId == null) {
actionAndMsgDesc = "NO ACTION or MSG ID";
} else {
actionAndMsgDesc = "'" + action + "' and msgId '" + msgId + "'";
}
String tubeDesc;
if (next != null) {
tubeDesc = next.toString() + ".processRequest()";
} else {
tubeDesc = peekCont() + ".processResponse()";
}
LOGGER.log(Level.FINE, "{0} {1} with {2} and ''current'' tube {3} from thread {4} with Packet: {5}", new Object[]{getName(), desc, actionAndMsgDesc, tubeDesc, Thread.currentThread().getName(), packet != null ? packet.toShortString() : null});
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:36,代码来源:Fiber.java
示例19: addBindingExtension
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
@Override
public void addBindingExtension(TypedXmlWriter binding) {
if (!enabled)
return;
binding._element(AddressingVersion.W3C.wsdlExtensionTag, UsingAddressing.class);
/*
Do not generate wsdl:required=true
if(required) {
ua.required(true);
}
*/
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:W3CAddressingWSDLGeneratorExtension.java
示例20: addKnownHeadersToBinding
import com.sun.xml.internal.ws.api.addressing.AddressingVersion; //导入依赖的package包/类
private void addKnownHeadersToBinding(WSBinding binding) {
for (AddressingVersion addrVersion: AddressingVersion.values()) {
binding.addKnownHeader(addrVersion.actionTag);
binding.addKnownHeader(addrVersion.faultDetailTag);
binding.addKnownHeader(addrVersion.faultToTag);
binding.addKnownHeader(addrVersion.fromTag);
binding.addKnownHeader(addrVersion.messageIDTag);
binding.addKnownHeader(addrVersion.relatesToTag);
binding.addKnownHeader(addrVersion.replyToTag);
binding.addKnownHeader(addrVersion.toTag);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:WsaTube.java
注:本文中的com.sun.xml.internal.ws.api.addressing.AddressingVersion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论