com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible Java Examples
The following examples show how to use
com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible.
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: HTTPExtensionHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public boolean handleInputExtension( TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_URL_ENCODED)) { parent.addExtension(new HTTPUrlEncoded(context.getLocation(e))); return true; } else if ( XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_URL_REPLACEMENT)) { parent.addExtension(new HTTPUrlReplacement(context.getLocation(e))); return true; } else { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; } }
Example #2
Source File: HTTPExtensionHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public boolean handleBindingExtension( TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_BINDING)) { context.push(); context.registerNamespaces(e); HTTPBinding binding = new HTTPBinding(context.getLocation(e)); String verb = Util.getRequiredAttribute(e, Constants.ATTR_VERB); binding.setVerb(verb); parent.addExtension(binding); context.pop(); // context.fireDoneParsingEntity(HTTPConstants.QNAME_BINDING, binding); return true; } else { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; } }
Example #3
Source File: MIMEExtensionHandler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public boolean doHandleExtension( TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_OUTPUT)) { return handleInputOutputExtension(context, parent, e); } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_INPUT)) { return handleInputOutputExtension(context, parent, e); } else if (parent.getWSDLElementName().equals(MIMEConstants.QNAME_PART)) { return handleMIMEPartExtension(context, parent, e); } else { // context.fireIgnoringExtension( // new QName(e.getNamespaceURI(), e.getLocalName()), // parent.getWSDLElementName()); return false; } }
Example #4
Source File: WSDLModelerBase.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * @return List of SOAPHeader extensions */ protected List<SOAPHeader> getHeaderExtensions(TWSDLExtensible extensible) { List<SOAPHeader> headerList = new ArrayList<SOAPHeader>(); for (TWSDLExtension extension : extensible.extensions()) { if (extension.getClass()==MIMEMultipartRelated.class) { for( MIMEPart part : ((MIMEMultipartRelated) extension).getParts() ) { boolean isRootPart = isRootPart(part); for (TWSDLExtension obj : part.extensions()) { if (obj instanceof SOAPHeader) { //bug fix: 5024015 if (!isRootPart) { warning((Entity) obj, ModelerMessages.MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(info.bindingOperation.getName())); return new ArrayList<SOAPHeader>(); } headerList.add((SOAPHeader) obj); } } } } else if (extension instanceof SOAPHeader) { headerList.add((SOAPHeader) extension); } } return headerList; }
Example #5
Source File: W3CAddressingExtensionHandler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (XmlUtil.matchesTagNS(e, getWSDLExtensionQName())) { /* context.push(); context.registerNamespaces(e); // TODO: read UsingAddressing extensibility element and store // TODO: it as extension in "parent". It may be used to generate // TODO: @Action/@FaultAction later. context.pop(); */ return true; } return false; // keep compiler happy }
Example #6
Source File: WSDLModeler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) { Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator(); while (headers.hasNext()) { SOAPHeader header = headers.next(); if (!header.isLiteral()) { continue; } com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document); if (headerMessage == null) { continue; } MessagePart headerPart = headerMessage.getPart(header.getPart()); if (headerPart == part) { return headerMessage; } } return null; }
Example #7
Source File: W3CAddressingExtensionHandler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (XmlUtil.matchesTagNS(e, getWSDLExtensionQName())) { /* context.push(); context.registerNamespaces(e); // TODO: read UsingAddressing extensibility element and store // TODO: it as extension in "parent". It may be used to generate // TODO: @Action/@FaultAction later. context.pop(); */ return true; } return false; // keep compiler happy }
Example #8
Source File: WSDLParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private boolean handleExtension( TWSDLParserContextImpl context, TWSDLExtensible entity, Element e) { TWSDLExtensionHandler h = (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI()); if (h == null) { context.fireIgnoringExtension(e, (Entity) entity); errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI())); return false; } else { return h.doHandleExtension(context, entity, e); } }
Example #9
Source File: JAXWSBindingExtensionHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static JAXWSBinding getJAXWSExtension(TWSDLExtensible extensible) { for (TWSDLExtension extension:extensible.extensions()) { if (extension.getClass().equals(JAXWSBinding.class)) { return (JAXWSBinding)extension; } } return null; }
Example #10
Source File: MemberSubmissionAddressingExtensionHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (extensionModeOn) { warn(context.getLocation(e)); String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME); if (actionValue == null || actionValue.equals("")) { return warnEmptyAction(parent, context.getLocation(e)); } ((Output) parent).setAction(actionValue); return true; } else { return fail(context.getLocation(e)); } }
Example #11
Source File: SOAPExtensionHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override protected boolean handleMIMEPartExtension( TWSDLParserContext context, TWSDLExtensible parent, Element e) { return handleInputOutputExtension(context, parent, e); }
Example #12
Source File: SOAPExtensionHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public boolean handleDefinitionsExtension( TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; // keep compiler happy }
Example #13
Source File: JAXWSBindingExtensionHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ context.push(); context.registerNamespaces(e); JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e)); for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); if (e2 == null) { break; } if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){ parseClass(context, jaxwsBinding, e2); if((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)){ ((Fault)parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc())); } }else{ Util.fail( "parsing.invalidExtensionElement", e2.getTagName(), e2.getNamespaceURI()); return false; } } parent.addExtension(jaxwsBinding); context.pop(); // context.fireDoneParsingEntity( // JAXWSBindingsConstants.JAXWS_BINDINGS, // jaxwsBinding); return true; }else { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; } }
Example #14
Source File: WSDLModelerBase.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * @param message * @return MessageParts referenced by the mime:content */ protected List<MessagePart> getMimeContentParts(Message message, TWSDLExtensible ext) { ArrayList<MessagePart> mimeContentParts = new ArrayList<MessagePart>(); for (MIMEPart mimePart : getMimeParts(ext)) { MessagePart part = getMimeContentPart(message, mimePart); if (part != null) { mimeContentParts.add(part); } } return mimeContentParts; }
Example #15
Source File: MemberSubmissionAddressingExtensionHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (extensionModeOn) { warn(context.getLocation(e)); String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME); if (actionValue == null || actionValue.equals("")) { return warnEmptyAction(parent, context.getLocation(e)); } ((Output) parent).setAction(actionValue); return true; } else { return fail(context.getLocation(e)); } }
Example #16
Source File: MemberSubmissionAddressingExtensionHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (extensionModeOn) { warn(context.getLocation(e)); String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME); if (actionValue == null || actionValue.equals("")) { return warnEmptyAction(parent, context.getLocation(e)); } ((Input) parent).setAction(actionValue); return true; } else { return fail(context.getLocation(e)); } }
Example #17
Source File: WSDLParser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private boolean handleExtension( TWSDLParserContextImpl context, TWSDLExtensible entity, Node n, Element e) { TWSDLExtensionHandler h = (TWSDLExtensionHandler) extensionHandlers.get(n.getNamespaceURI()); if (h == null) { context.fireIgnoringExtension(e, (Entity) entity); errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(n.getLocalName(), n.getNamespaceURI())); return false; } else { return h.doHandleExtension(context, entity, e); } }
Example #18
Source File: WSDLModelerBase.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * @param ext * @param message * @param name * @return List of MimeContents from ext */ protected List<MIMEContent> getMimeContents(TWSDLExtensible ext, Message message, String name) { for (MIMEPart mimePart : getMimeParts(ext)) { List<MIMEContent> mimeContents = getMimeContents(mimePart); for (MIMEContent mimeContent : mimeContents) { if (mimeContent.getPart().equals(name)) { return mimeContents; } } } return null; }
Example #19
Source File: HTTPExtensionHandler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public boolean handleTypesExtension( com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; }
Example #20
Source File: SOAPExtensionHandler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public boolean handleTypesExtension( com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; // keep compiler happy }
Example #21
Source File: WSDLParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private boolean handleExtension( TWSDLParserContextImpl context, TWSDLExtensible entity, Element e) { TWSDLExtensionHandler h = (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI()); if (h == null) { context.fireIgnoringExtension(e, (Entity) entity); errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI())); return false; } else { return h.doHandleExtension(context, entity, e); } }
Example #22
Source File: HTTPExtensionHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; }
Example #23
Source File: HTTPExtensionHandler.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; }
Example #24
Source File: SOAPExtensionHandler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; // keep compiler happy }
Example #25
Source File: HTTPExtensionHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean handleTypesExtension( com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, TWSDLExtensible parent, Element e) { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; }
Example #26
Source File: Input.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public TWSDLExtensible getParent() { return parent; }
Example #27
Source File: SOAPExtensionHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public boolean handleFaultExtension( TWSDLParserContext context, TWSDLExtensible parent, Element e) { if (XmlUtil.matchesTagNS(e, getFaultQName())) { context.push(); context.registerNamespaces(e); SOAPFault fault = new SOAPFault(context.getLocation(e)); String name = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAME); if (name != null) { fault.setName(name); } String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE); if (use != null) { if (use.equals(Constants.ATTRVALUE_LITERAL)) { fault.setUse(SOAPUse.LITERAL); } else if (use.equals(Constants.ATTRVALUE_ENCODED)) { fault.setUse(SOAPUse.ENCODED); } else { Util.fail( "parsing.invalidAttributeValue", Constants.ATTR_USE, use); } } String namespace = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE); if (namespace != null) { fault.setNamespace(namespace); } String encodingStyle = XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE); if (encodingStyle != null) { fault.setEncodingStyle(encodingStyle); } parent.addExtension(fault); context.pop(); // context.fireDoneParsingEntity(getFaultQName(), fault); return true; } else if (XmlUtil.matchesTagNS(e, getHeaderQName())) { // although SOAP spec doesn't define meaning of this extension; it is allowed // to be here, so we have to accept it, not fail (bug 13576977) return handleHeaderElement(parent, e, (TWSDLParserContextImpl) context); } else { Util.fail( "parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; // keep compiler happy } }
Example #28
Source File: ExtensionImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public TWSDLExtensible getParent() { return _parent; }
Example #29
Source File: Policy12ExtensionHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { return handleExtension(context, parent, e); }
Example #30
Source File: Port.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void setParent(TWSDLExtensible parent) { this.parent = parent; }