本文整理汇总了Java中com.sun.xml.internal.ws.protocol.soap.VersionMismatchException类的典型用法代码示例。如果您正苦于以下问题:Java VersionMismatchException类的具体用法?Java VersionMismatchException怎么用?Java VersionMismatchException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VersionMismatchException类属于com.sun.xml.internal.ws.protocol.soap包,在下文中一共展示了VersionMismatchException类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decode
import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException; //导入依赖的package包/类
public static final Message decode(SOAPVersion soapVersion, XMLStreamReader reader, @NotNull AttachmentSet attachmentSet) {
// Move to soap:Envelope and verify
if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT)
XMLStreamReaderUtil.nextElementContent(reader);
XMLStreamReaderUtil.verifyReaderState(reader,XMLStreamConstants.START_ELEMENT);
if (SOAP_ENVELOPE.equals(reader.getLocalName()) && !soapVersion.nsUri.equals(reader.getNamespaceURI())) {
throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
}
XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
return new StreamMessage(soapVersion, reader, attachmentSet);
}