Java Code Examples for com.sun.xml.internal.ws.api.model.ParameterBinding#createAttachment()
The following examples show how to use
com.sun.xml.internal.ws.api.model.ParameterBinding#createAttachment() .
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: RuntimeWSDLParser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 2
Source File: RuntimeWSDLParser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 3
Source File: RuntimeWSDLParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 4
Source File: RuntimeWSDLParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 5
Source File: RuntimeWSDLParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 6
Source File: RuntimeWSDLParser.java From hottub with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 7
Source File: RuntimeWSDLParser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }
Example 8
Source File: RuntimeWSDLParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { boolean bodyFound = false; Map<String, ParameterBinding> parts = null; if (mode == BindingMode.INPUT) { parts = op.getInputParts(); } else if (mode == BindingMode.OUTPUT) { parts = op.getOutputParts(); } else if (mode == BindingMode.FAULT) { parts = op.getFaultParts(); } while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) { bodyFound = true; parseSOAPBodyBinding(reader, op, mode); XMLStreamReaderUtil.next(reader); } else if (SOAPConstants.QNAME_HEADER.equals(name)) { bodyFound = true; parseSOAPHeaderBinding(reader, parts); XMLStreamReaderUtil.next(reader); } else if (MIMEConstants.QNAME_CONTENT.equals(name)) { String part = reader.getAttributeValue(null, "part"); String type = reader.getAttributeValue(null, "type"); if ((part == null) || (type == null)) { XMLStreamReaderUtil.skipElement(reader); continue; } ParameterBinding sb = ParameterBinding.createAttachment(type); if (parts != null && sb != null && part != null) parts.put(part, sb); XMLStreamReaderUtil.next(reader); } else { XMLStreamReaderUtil.skipElement(reader); } } }