/** * Creates a fault {@link Message}. * * <p> * This method is not designed for efficiency, and we don't expect * to be used for the performance critical codepath. * * @param fault * The populated SAAJ data structure that represents a fault * in detail. * * @return * Always non-null. A message that wraps this {@link SOAPFault}. */ public static Message create(SOAPFault fault) { SOAPVersion ver = SOAPVersion.fromNsUri(fault.getNamespaceURI()); return new DOMMessage(ver,fault); }
/** * Creates a fault {@link Message}. * * <p> * This method is not designed for efficiency, and we don't expect * to be used for the performance critical codepath. * * @param fault * The populated SAAJ data structure that represents a fault * in detail. * * @return * Always non-null. A message that wraps this {@link SOAPFault}. */ public static Message create(SOAPFault fault) { SOAPVersion ver = SOAPVersion.fromNsUri(fault.getNamespaceURI()); return new DOMMessage(ver,fault); }
/** * Creates a {@link Message} from {@link XMLStreamReader} that points to * the start of the envelope. * * @param reader * can point to the start document or the start element (of <s:Envelope>) */ public static @NotNull Message create(@NotNull XMLStreamReader reader) { // skip until the root element if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT) XMLStreamReaderUtil.nextElementContent(reader); assert reader.getEventType()== XMLStreamConstants.START_ELEMENT :reader.getEventType(); SOAPVersion ver = SOAPVersion.fromNsUri(reader.getNamespaceURI()); return Codecs.createSOAPEnvelopeXmlCodec(ver).decode(reader); }
/** * Creates a fault {@link Message}. * * <p> * This method is not designed for efficiency, and we don't expect * to be used for the performance critical codepath. * * @param fault * The populated SAAJ data structure that represents a fault * in detail. * * @return * Always non-null. A message that wraps this {@link SOAPFault}. */ public static Message create(SOAPFault fault) { SOAPVersion ver = SOAPVersion.fromNsUri(fault.getNamespaceURI()); return new DOMMessage(ver,fault); }
/** * Creates a {@link Message} from {@link XMLStreamReader} that points to * the start of the envelope. * * @param reader * can point to the start document or the start element (of <s:Envelope>) */ public static @NotNull Message create(@NotNull XMLStreamReader reader) { // skip until the root element if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT) XMLStreamReaderUtil.nextElementContent(reader); assert reader.getEventType()== XMLStreamConstants.START_ELEMENT :reader.getEventType(); SOAPVersion ver = SOAPVersion.fromNsUri(reader.getNamespaceURI()); return Codecs.createSOAPEnvelopeXmlCodec(ver).decode(reader); }
/** * Creates a {@link Message} from {@link XMLStreamReader} that points to * the start of the envelope. * * @param reader * can point to the start document or the start element (of <s:Envelope>) */ public static @NotNull Message create(@NotNull XMLStreamReader reader) { // skip until the root element if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT) XMLStreamReaderUtil.nextElementContent(reader); assert reader.getEventType()== XMLStreamConstants.START_ELEMENT :reader.getEventType(); SOAPVersion ver = SOAPVersion.fromNsUri(reader.getNamespaceURI()); return Codecs.createSOAPEnvelopeXmlCodec(ver).decode(reader); }
protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); Node body = sm.getSOAPBody(); bodyAttrs = body.getAttributes(); soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI()); //cature all the body elements bodyParts = DOMUtil.getChildElements(body); //we treat payload as the first body part payload = bodyParts.size() > 0 ? bodyParts.get(0) : null; // hope this is correct. Caching the localname and namespace of the payload should be fine // but what about if a Handler replaces the payload with something else? Weel, may be it // will be error condition anyway if (payload != null) { payloadLocalName = payload.getLocalName(); payloadNamespace = payload.getNamespaceURI(); } accessedMessage = true; } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); Node body = sm.getSOAPBody(); bodyAttrs = body.getAttributes(); soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI()); //cature all the body elements bodyParts = DOMUtil.getChildElements(body); //we treat payload as the first body part payload = bodyParts.size() > 0 ? bodyParts.get(0) : null; // hope this is correct. Caching the localname and namespace of the payload should be fine // but what about if a Handler replaces the payload with something else? Weel, may be it // will be error condition anyway if (payload != null) { payloadLocalName = payload.getLocalName(); payloadNamespace = payload.getNamespaceURI(); } accessedMessage = true; } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); Node body = sm.getSOAPBody(); bodyAttrs = body.getAttributes(); soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI()); //cature all the body elements bodyParts = DOMUtil.getChildElements(body); //we treat payload as the first body part payload = bodyParts.size() > 0 ? bodyParts.get(0) : null; // hope this is correct. Caching the localname and namespace of the payload should be fine // but what about if a Handler replaces the payload with something else? Weel, may be it // will be error condition anyway if (payload != null) { payloadLocalName = payload.getLocalName(); payloadNamespace = payload.getNamespaceURI(); } accessedMessage = true; } catch (SOAPException e) { throw new WebServiceException(e); } } }
SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI());
SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI());
SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI());