Java Code Examples for com.sun.xml.internal.ws.api.SOAPVersion#fromNsUri()
The following examples show how to use
com.sun.xml.internal.ws.api.SOAPVersion#fromNsUri() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SAAJMessage.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 2
Source File: SAAJMessage.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 3
Source File: SAAJMessage.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 4
Source File: SAAJMessage.java From hottub with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 5
Source File: SAAJMessage.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 6
Source File: SAAJMessage.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 7
Source File: SAAJMessage.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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); } } }
Example 8
Source File: Messages.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Message} from an {@link Element} that represents * the whole SOAP message. * * @param soapEnvelope * The SOAP envelope element. */ public static Message create(Element soapEnvelope) { SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI()); // find the headers Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header"); HeaderList headers = null; if(header!=null) { for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) { if(n.getNodeType()==Node.ELEMENT_NODE) { if(headers==null) headers = new HeaderList(ver); headers.add(Headers.create((Element)n)); } } } // find the payload Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(body==null) throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope); Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(payload==null) { return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver); } else { return new DOMMessage(ver,headers,payload); } }
Example 9
Source File: Messages.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Message} from an {@link Element} that represents * the whole SOAP message. * * @param soapEnvelope * The SOAP envelope element. */ public static Message create(Element soapEnvelope) { SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI()); // find the headers Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header"); HeaderList headers = null; if(header!=null) { for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) { if(n.getNodeType()==Node.ELEMENT_NODE) { if(headers==null) headers = new HeaderList(ver); headers.add(Headers.create((Element)n)); } } } // find the payload Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(body==null) throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope); Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(payload==null) { return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver); } else { return new DOMMessage(ver,headers,payload); } }
Example 10
Source File: Messages.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Message} from an {@link Element} that represents * the whole SOAP message. * * @param soapEnvelope * The SOAP envelope element. */ public static Message create(Element soapEnvelope) { SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI()); // find the headers Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header"); HeaderList headers = null; if(header!=null) { for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) { if(n.getNodeType()==Node.ELEMENT_NODE) { if(headers==null) headers = new HeaderList(ver); headers.add(Headers.create((Element)n)); } } } // find the payload Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(body==null) throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope); Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(payload==null) { return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver); } else { return new DOMMessage(ver,headers,payload); } }
Example 11
Source File: Messages.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Message} from an {@link Element} that represents * the whole SOAP message. * * @param soapEnvelope * The SOAP envelope element. */ public static Message create(Element soapEnvelope) { SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI()); // find the headers Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header"); HeaderList headers = null; if(header!=null) { for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) { if(n.getNodeType()==Node.ELEMENT_NODE) { if(headers==null) headers = new HeaderList(ver); headers.add(Headers.create((Element)n)); } } } // find the payload Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(body==null) throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope); Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(payload==null) { return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver); } else { return new DOMMessage(ver,headers,payload); } }
Example 12
Source File: Messages.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Message} from an {@link Element} that represents * the whole SOAP message. * * @param soapEnvelope * The SOAP envelope element. */ public static Message create(Element soapEnvelope) { SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI()); // find the headers Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header"); HeaderList headers = null; if(header!=null) { for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) { if(n.getNodeType()==Node.ELEMENT_NODE) { if(headers==null) headers = new HeaderList(ver); headers.add(Headers.create((Element)n)); } } } // find the payload Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(body==null) throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope); Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body"); if(payload==null) { return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver); } else { return new DOMMessage(ver,headers,payload); } }
Example 13
Source File: Messages.java From openjdk-8 with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 14
Source File: Messages.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 15
Source File: Messages.java From openjdk-jdk8u with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 16
Source File: Messages.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 17
Source File: Messages.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 18
Source File: Messages.java From hottub with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 19
Source File: Messages.java From TencentKona-8 with GNU General Public License v2.0 | 2 votes |
/** * 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); }
Example 20
Source File: Messages.java From openjdk-8-source with GNU General Public License v2.0 | 2 votes |
/** * 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); }