gpt4 book ai didi

com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 17:52:40 30 4
gpt4 key购买 nike

本文整理了Java中com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag()方法的一些代码示例,展示了XMLStreamReaderUtil.verifyTag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLStreamReaderUtil.verifyTag()方法的具体详情如下:
包路径:com.sun.xml.ws.streaming.XMLStreamReaderUtil
类名称:XMLStreamReaderUtil
方法名:verifyTag

XMLStreamReaderUtil.verifyTag介绍

暂无

代码示例

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public static void verifyTag(XMLStreamReader reader, QName name) {
  verifyTag(reader, name.getNamespaceURI(), name.getLocalPart());
}

代码示例来源:origin: javaee/metro-jax-ws

public static void verifyTag(XMLStreamReader reader, QName name) {
  verifyTag(reader, name.getNamespaceURI(), name.getLocalPart());
}

代码示例来源:origin: com.sun.xml.ws/rt

public static void verifyTag(XMLStreamReader reader, QName name) {
  verifyTag(reader, name.getNamespaceURI(), name.getLocalPart());
}

代码示例来源:origin: com.sun.xml.ws/rt

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);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

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);
}

代码示例来源:origin: javaee/metro-jax-ws

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);
}

代码示例来源:origin: com.sun.xml.ws/rt

protected void readWrappedRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
  if (!msg.hasPayload()) {
    throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
  }
  XMLStreamReader reader = msg.readPayload();
  XMLStreamReaderUtil.verifyTag(reader,wrapperName);
  reader.nextTag();
  while(reader.getEventType()==XMLStreamReader.START_ELEMENT) {
    // TODO: QName has a performance issue
    QName name = reader.getName();
    WrappedPartBuilder part = wrappedParts.get(name);
    if(part==null) {
      // no corresponding part found. ignore
      XMLStreamReaderUtil.skipElement(reader);
      reader.nextTag();
    } else {
      part.readRequest(args,reader, msg.getAttachments());
    }
    XMLStreamReaderUtil.toNextTag(reader, name);
  }
  // we are done with the body
  reader.close();
  XMLStreamReaderFactory.recycle(reader);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

protected void readWrappedRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
  if (!msg.hasPayload()) {
    throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
  }
  XMLStreamReader reader = msg.readPayload();
  XMLStreamReaderUtil.verifyTag(reader,wrapperName);
  reader.nextTag();
  while(reader.getEventType()==XMLStreamReader.START_ELEMENT) {
    // TODO: QName has a performance issue
    QName name = reader.getName();
    WrappedPartBuilder part = wrappedParts.get(name);
    if(part==null) {
      // no corresponding part found. ignore
      XMLStreamReaderUtil.skipElement(reader);
      reader.nextTag();
    } else {
      part.readRequest(args,reader, msg.getAttachments());
    }
    XMLStreamReaderUtil.toNextTag(reader, name);
  }
  // we are done with the body
  reader.close();
  XMLStreamReaderFactory.recycle(reader);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

XMLStreamReaderUtil.verifyTag(reader,wrapperName);
reader.nextTag();

代码示例来源:origin: com.sun.xml.ws/rt

XMLStreamReaderUtil.verifyTag(reader,wrapperName);
reader.nextTag();

代码示例来源:origin: javaee/metro-jax-ws

XMLStreamReaderUtil.verifyTag(reader,wrapperName);
reader.nextTag();

代码示例来源:origin: javaee/metro-jax-ws

protected void readWrappedRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
  if (!msg.hasPayload()) {
    throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
  }
  XMLStreamReader reader = msg.readPayload();
  XMLStreamReaderUtil.verifyTag(reader,wrapperName);
  reader.nextTag();
  while(reader.getEventType()==XMLStreamReader.START_ELEMENT) {
    // TODO: QName has a performance issue
    QName name = reader.getName();
    WrappedPartBuilder part = wrappedParts.get(name);
    if(part==null) {
      // no corresponding part found. ignore
      XMLStreamReaderUtil.skipElement(reader);
      reader.nextTag();
    } else {
      part.readRequest(args,reader, msg.getAttachments());
    }
    XMLStreamReaderUtil.toNextTag(reader, name);
  }
  // we are done with the body
  reader.close();
  XMLStreamReaderFactory.recycle(reader);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_BODY);
TagInfoset bodyTag = new TagInfoset(reader);

代码示例来源:origin: com.sun.xml.ws/rt

throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_BODY);
TagInfoset bodyTag = new TagInfoset(reader);

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
  if (dynamicWrapper) {
    readWrappedRequest(msg, args);
  } else {
    if (parts.length>0) {
      if (!msg.hasPayload()) {
        throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
      }
      XMLStreamReader reader = msg.readPayload();
      XMLStreamReaderUtil.verifyTag(reader, wrapperName);
      Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
          new AttachmentUnmarshallerImpl(msg.getAttachments()): null);
      try {
        for (PartBuilder part : parts) {
          part.readRequest(args,wrapperBean);
        }
      } catch (DatabindingException e) {
        // this can happen when the set method throw a checked exception or something like that
        throw new WebServiceException(e);    // TODO:i18n
      }
      // we are done with the body
      reader.close();
      XMLStreamReaderFactory.recycle(reader);
    } else {
      msg.consume();
    }
  }
}

代码示例来源:origin: com.sun.xml.ws/rt

public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
  if (dynamicWrapper) {
    readWrappedRequest(msg, args);
  } else {
    if (parts.length>0) {
      if (!msg.hasPayload()) {
        throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
      }
      XMLStreamReader reader = msg.readPayload();
      XMLStreamReaderUtil.verifyTag(reader, wrapperName);
      Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
          new AttachmentUnmarshallerImpl(msg.getAttachments()): null);
      try {
        for (PartBuilder part : parts) {
          part.readRequest(args,wrapperBean);
        }
      } catch (DatabindingException e) {
        // this can happen when the set method throw a checked exception or something like that
        throw new WebServiceException(e);    // TODO:i18n
      }
      // we are done with the body
      reader.close();
      XMLStreamReaderFactory.recycle(reader);
    } else {
      msg.consume();
    }
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

XMLStreamReaderUtil.verifyTag(reader,wrapperName);
Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
  new AttachmentUnmarshallerImpl(msg.getAttachments()): null);

代码示例来源:origin: javaee/metro-jax-ws

public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
  if (dynamicWrapper) {
    readWrappedRequest(msg, args);
  } else {
    if (parts.length>0) {
      if (!msg.hasPayload()) {
        throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
      }
      XMLStreamReader reader = msg.readPayload();
      XMLStreamReaderUtil.verifyTag(reader, wrapperName);
      Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
          new AttachmentUnmarshallerImpl(msg.getAttachments()): null);
      try {
        for (PartBuilder part : parts) {
          part.readRequest(args,wrapperBean);
        }
      } catch (DatabindingException e) {
        // this can happen when the set method throw a checked exception or something like that
        throw new WebServiceException(e);    // TODO:i18n
      }
      // we are done with the body
      reader.close();
      XMLStreamReaderFactory.recycle(reader);
    } else {
      msg.consume();
    }
  }
}

代码示例来源:origin: com.sun.xml.ws/rt

XMLStreamReaderUtil.verifyTag(reader,wrapperName);
Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
  new AttachmentUnmarshallerImpl(msg.getAttachments()): null);

代码示例来源:origin: javaee/metro-jax-ws

XMLStreamReaderUtil.verifyTag(reader,wrapperName);
Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
  new AttachmentUnmarshallerImpl(msg.getAttachments()): null);

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com