本文整理汇总了Java中com.sun.xml.internal.ws.resources.AddressingMessages类的典型用法代码示例。如果您正苦于以下问题:Java AddressingMessages类的具体用法?Java AddressingMessages怎么用?Java AddressingMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AddressingMessages类属于com.sun.xml.internal.ws.resources包,在下文中一共展示了AddressingMessages类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getFaultTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的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
示例2: getReplyTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
public static WSEndpointReference getReplyTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(headers, av.replyToTag, true, sv);
WSEndpointReference replyTo;
if (h != null) {
try {
replyTo = h.readAsEPR(av);
} catch (XMLStreamException e) {
throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
}
} else {
replyTo = av.anonymousEpr;
}
return replyTo;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:AddressingUtils.java
示例3: validateAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
@Override
protected void validateAction(Packet packet) {
//There may not be a WSDL operation. There may not even be a WSDL.
//For instance this may be a RM CreateSequence message.
WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
if (wbo == null) return;
String gotA = AddressingUtils.getAction(
packet.getMessage().getHeaders(),
addressingVersion, soapVersion);
if (gotA == null)
throw new WebServiceException(AddressingMessages.VALIDATION_CLIENT_NULL_ACTION());
String expected = helper.getOutputAction(packet);
if (expected != null && !gotA.equals(expected))
throw new ActionNotSupportedException(gotA);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:WsaClientTube.java
示例4: getFirstHeader
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Gets the first {@link Header} of the specified name targeted at the
* current implicit role.
*
* @param name name of the header
* @param markUnderstood
* If this parameter is true, the returned headers will
* be marked as <a href="#MU">"understood"</a> when they are returned
* from {@link Iterator#next()}.
* @return null if header not found
*/
private Header getFirstHeader(QName name, boolean markUnderstood, SOAPVersion sv) {
if (sv == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION());
}
Iterator<Header> iter = getHeaders(name.getNamespaceURI(), name.getLocalPart(), markUnderstood);
while (iter.hasNext()) {
Header h = iter.next();
if (h.getRole(sv).equals(sv.implicitRole)) {
return h;
}
}
return null;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:27,代码来源:HeaderList.java
示例5: getTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Returns the value of WS-Addressing <code>To</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>To</code> headers are detected earlier.
*
* @param av WS-Addressing version
* @param sv SOAP version
* @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
* @return Value of WS-Addressing To header, anonymous URI if no header is present
*/
public String getTo(AddressingVersion av, SOAPVersion sv) {
if (to != null) {
return to;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(av.toTag, true, sv);
if (h != null) {
to = h.getStringContent();
} else {
to = av.anonymousUri;
}
return to;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:29,代码来源:HeaderList.java
示例6: getAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Returns the value of WS-Addressing <code>Action</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>Action</code> headers are detected earlier.
*
* @param av WS-Addressing version
* @param sv SOAP version
* @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
* @return Value of WS-Addressing Action header, null if no header is present
*/
public String getAction(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (action != null) {
return action;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(av.actionTag, true, sv);
if (h != null) {
action = h.getStringContent();
}
return action;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:27,代码来源:HeaderList.java
示例7: getReplyTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Returns the value of WS-Addressing <code>ReplyTo</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>ReplyTo</code> headers are detected earlier.
*
* @param av WS-Addressing version
* @param sv SOAP version
* @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
* @return Value of WS-Addressing ReplyTo header, null if no header is present
*/
public WSEndpointReference getReplyTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (replyTo != null) {
return replyTo;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(av.replyToTag, true, sv);
if (h != null) {
try {
replyTo = h.readAsEPR(av);
} catch (XMLStreamException e) {
throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
}
} else {
replyTo = av.anonymousEpr;
}
return replyTo;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:33,代码来源:HeaderList.java
示例8: getFaultTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Returns the value of WS-Addressing <code>FaultTo</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>FaultTo</code> headers are detected earlier.
*
* @param av WS-Addressing version
* @param sv SOAP version
* @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
* @return Value of WS-Addressing FaultTo header, null if no header is present
*/
public WSEndpointReference getFaultTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (faultTo != null) {
return faultTo;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(av.faultToTag, true, sv);
if (h != null) {
try {
faultTo = h.readAsEPR(av);
} catch (XMLStreamException e) {
throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e);
}
}
return faultTo;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:32,代码来源:HeaderList.java
示例9: getMessageID
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Returns the value of WS-Addressing <code>MessageID</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>MessageID</code> headers are detected earlier.
*
* @param av WS-Addressing version
* @param sv SOAP version
* @throws WebServiceException if either <code>av</code> or <code>sv</code> is null.
* @return Value of WS-Addressing MessageID header, null if no header is present
*/
public String getMessageID(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (messageId != null) {
return messageId;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(av.messageIDTag, true, sv);
if (h != null) {
messageId = h.getStringContent();
}
return messageId;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:28,代码来源:HeaderList.java
示例10: getRelatesTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
/**
* Returns the value of WS-Addressing <code>RelatesTo</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>RelatesTo</code> headers are detected earlier.
*
* @param av WS-Addressing version
* @param sv SOAP version
* @throws WebServiceException if either <code>av</code> or <code>sv</code> is null.
* @return Value of WS-Addressing RelatesTo header, null if no header is present
*/
public String getRelatesTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (relatesTo != null) {
return relatesTo;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = getFirstHeader(av.relatesToTag, true, sv);
if (h != null) {
relatesTo = h.getStringContent();
}
return relatesTo;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:28,代码来源:HeaderList.java
示例11: validateAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
@Override
protected void validateAction(Packet packet) {
//There may not be a WSDL operation. There may not even be a WSDL.
//For instance this may be a RM CreateSequence message.
WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);
if (wsdlBoundOperation == null)
return;
String gotA = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion);
if (gotA == null)
throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
String expected = helper.getInputAction(packet);
String soapAction = helper.getSOAPAction(packet);
if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals("")))
expected = soapAction;
if (expected != null && !gotA.equals(expected)) {
throw new ActionNotSupportedException(gotA);
}
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:24,代码来源:WsaServerTube.java
示例12: validateAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
@Override
protected void validateAction(Packet packet) {
//There may not be a WSDL operation. There may not even be a WSDL.
//For instance this may be a RM CreateSequence message.
WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
if (wbo == null) return;
String gotA = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion);
if (gotA == null)
throw new WebServiceException(AddressingMessages.VALIDATION_CLIENT_NULL_ACTION());
String expected = helper.getOutputAction(packet);
if (expected != null && !gotA.equals(expected))
throw new ActionNotSupportedException(gotA);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:18,代码来源:WsaClientTube.java
示例13: getAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的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
示例14: getMessageID
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的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
示例15: getRelatesTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的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
示例16: getTo
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的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
示例17: getFirstHeader
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
public static Header getFirstHeader(MessageHeaders headers, QName name, boolean markUnderstood, SOAPVersion sv) {
if (sv == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION());
}
Iterator<Header> iter = headers.getHeaders(name.getNamespaceURI(), name.getLocalPart(), markUnderstood);
while (iter.hasNext()) {
Header h = iter.next();
if (h.getRole(sv).equals(sv.implicitRole)) {
return h;
}
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:AddressingUtils.java
示例18: getTubeHelper
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
protected WsaTubeHelper getTubeHelper() {
if(binding.isFeatureEnabled(AddressingFeature.class)) {
return new WsaTubeHelperImpl(wsdlPort, null, binding);
} else if(binding.isFeatureEnabled(MemberSubmissionAddressingFeature.class)) {
//seiModel is null as it is not needed.
return new com.sun.xml.internal.ws.addressing.v200408.WsaTubeHelperImpl(wsdlPort, null, binding);
} else {
// Addressing is not enabled, WsaTube should not be included in the pipeline
throw new WebServiceException(AddressingMessages.ADDRESSING_NOT_ENABLED(this.getClass().getSimpleName()));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:WsaTube.java
示例19: validateSOAPAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
protected void validateSOAPAction(Packet packet) {
String gotA = AddressingUtils.getAction(
packet.getMessage().getHeaders(),
addressingVersion, soapVersion);
if (gotA == null)
throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
if(packet.soapAction != null && !packet.soapAction.equals("\"\"") && !packet.soapAction.equals("\""+gotA+"\"")) {
throw new InvalidAddressingHeaderException(addressingVersion.actionTag, addressingVersion.actionMismatchTag);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WsaTube.java
示例20: validateAction
import com.sun.xml.internal.ws.resources.AddressingMessages; //导入依赖的package包/类
@Override
protected void validateAction(Packet packet) {
//There may not be a WSDL operation. There may not even be a WSDL.
//For instance this may be a RM CreateSequence message.
WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);
if (wsdlBoundOperation == null) {
return;
}
String gotA = AddressingUtils.getAction(
packet.getMessage().getHeaders(),
addressingVersion, soapVersion);
if (gotA == null) {
throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
}
String expected = helper.getInputAction(packet);
String soapAction = helper.getSOAPAction(packet);
if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals(""))) {
expected = soapAction;
}
if (expected != null && !gotA.equals(expected)) {
throw new ActionNotSupportedException(gotA);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:WsaServerTube.java
注:本文中的com.sun.xml.internal.ws.resources.AddressingMessages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论