Package org.frankframework.soap
Class WsdlGenerator
java.lang.Object
org.frankframework.soap.WsdlGenerator
Utility class to generate the WSDL. Straight-forwardly implemented using stax only.
An object of this class represents the WSDL associated with one IBIS pipeline.
- Author:
- Michiel Meeuwissen, Jaco de Groot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.logging.log4j.Loggerprotected static final Stringprotected static final Stringstatic final Stringprotected static final Stringstatic final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionWsdlGenerator(PipeLine pipeLine) WsdlGenerator(PipeLine pipeLine, String generationInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidOutputs a 'documentation' section of the WSDLprotected QNamegetBodyElement(IXmlValidator xmlValidator, Set<IXSD> xsds, String type) protected QNamegetBodyElement(IXmlValidator xmlValidator, Set<IXSD> xsds, String type, boolean outputMode) protected QNamegetHeaderElement(IXmlValidator xmlValidator, Set<IXSD> xsds) protected StringgetLocation(String defaultLocation) getName()protected StringgetRoot(IXmlValidator xmlValidator) protected StringgetRoot(IXmlValidator xmlValidator, boolean outputMode) protected QNamegetRootElement(Set<IXSD> xsds, String root) protected QNamegetRootElement(Set<IXSD> xsds, String root, String namespace) protected StringgetSoapAction(IListener<?> listener) getXsds(IXmlValidator xmlValidator) protected voidhttpBinding(XMLStreamWriter w, String namePrefix) protected voidhttpService(XMLStreamWriter w, String defaultLocation, String namePrefix) voidinit()protected booleanisHeaderOptional(IXmlValidator xmlValidator) booleanisIndent()booleanprotected voidjmsBinding(XMLStreamWriter w, String namePrefix) protected voidjmsService(XMLStreamWriter w, IJmsListener listener, String namePrefix) protected voidmessage(XMLStreamWriter w, String root, Collection<QName> parts) protected voidOutputs the 'messages' section.protected voidprotected voidservice(XMLStreamWriter w, String defaultLocation) voidsetDocumentation(String documentation) voidsetIndent(boolean indent) voidsetTargetNamespacePrefix(String targetNamespacePrefix) voidsetUseIncludes(boolean useIncludes) protected voidOutput the 'types' section of the WSDLprotected voidprotected voidprotected voidprotected voidwriteSoapBody(XMLStreamWriter w, QName bodyElement) protected voidwriteSoapHeader(XMLStreamWriter w, String root, QName headerElement, boolean isHeaderOptional) voidwriteSoapOperation(XMLStreamWriter w, IListener<?> listener) voidwsdl(OutputStream out, String defaultLocation) Writes the WSDL to an output streamvoidzip(OutputStream stream, String defaultLocation) Generates a zip file (and writes it to the given outputstream), containing the WSDL and all referenced XSD's.
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log -
WSDL_NAMESPACE
- See Also:
-
WSDL_NAMESPACE_PREFIX
- See Also:
-
XSD_NAMESPACE
- See Also:
-
XSD_NAMESPACE_PREFIX
- See Also:
-
WSDL_SOAP_NAMESPACE
- See Also:
-
WSDL_SOAP_NAMESPACE_PREFIX
- See Also:
-
WSDL_SOAP12_NAMESPACE
- See Also:
-
WSDL_SOAP12_NAMESPACE_PREFIX
- See Also:
-
SOAP_HTTP_NAMESPACE
- See Also:
-
SOAP_JMS_NAMESPACE
- See Also:
-
SOAP_JMS_NAMESPACE_PREFIX
- See Also:
-
TARGET_NAMESPACE_PREFIX
- See Also:
-
WSDL_EXTENSION
- See Also:
-
excludeXsds
-
-
Constructor Details
-
WsdlGenerator
-
WsdlGenerator
-
-
Method Details
-
getName
-
getFilename
-
getTargetNamespace
-
getDocumentation
-
setDocumentation
-
isIndent
public boolean isIndent() -
setIndent
public void setIndent(boolean indent) -
isUseIncludes
public boolean isUseIncludes() -
setUseIncludes
public void setUseIncludes(boolean useIncludes) -
getTargetNamespacePrefix
-
setTargetNamespacePrefix
-
init
- Throws:
ConfigurationException
-
isHeaderOptional
-
getXsds
- Throws:
ConfigurationException
-
zip
public void zip(OutputStream stream, String defaultLocation) throws IOException, ConfigurationException, XMLStreamException Generates a zip file (and writes it to the given outputstream), containing the WSDL and all referenced XSD's.- Throws:
IOExceptionConfigurationExceptionXMLStreamException- See Also:
-
wsdl
public void wsdl(OutputStream out, String defaultLocation) throws XMLStreamException, IOException, ConfigurationException Writes the WSDL to an output stream -
documentation
Outputs a 'documentation' section of the WSDL- Throws:
XMLStreamException
-
types
protected void types(XMLStreamWriter w) throws XMLStreamException, IOException, ConfigurationException Output the 'types' section of the WSDL- Parameters:
w- Writer to which XML is written.- Throws:
XMLStreamException- Thrown is there is an exception writing to stream.IOException- Thrown if there's an IOException during writing.ConfigurationException- Thrown if there's an error during configuration.
-
messages
Outputs the 'messages' section.- Parameters:
w- Writer to which XML is written.- Throws:
XMLStreamException- Thrown is there is an exception writing to stream.
-
message
protected void message(XMLStreamWriter w, String root, Collection<QName> parts) throws XMLStreamException - Throws:
XMLStreamException
-
portType
- Throws:
XMLStreamException
-
getSoapAction
-
getLocation
-
binding
- Throws:
XMLStreamException
-
httpBinding
- Throws:
XMLStreamException
-
writeSoapOperation
- Throws:
XMLStreamException
-
writeSoapHeader
protected void writeSoapHeader(XMLStreamWriter w, String root, QName headerElement, boolean isHeaderOptional) throws XMLStreamException - Throws:
XMLStreamException
-
writeSoapBody
- Throws:
XMLStreamException
-
jmsBinding
- Throws:
XMLStreamException
-
service
- Throws:
XMLStreamException
-
httpService
protected void httpService(XMLStreamWriter w, String defaultLocation, String namePrefix) throws XMLStreamException - Throws:
XMLStreamException
-
jmsService
protected void jmsService(XMLStreamWriter w, IJmsListener listener, String namePrefix) throws XMLStreamException - Throws:
XMLStreamException
-
warnings
- Throws:
XMLStreamException
-
getRoot
-
getRoot
-
getRootElement
-
getRootElement
-
getHeaderElement
-
getBodyElement
-
getBodyElement
protected QName getBodyElement(IXmlValidator xmlValidator, Set<IXSD> xsds, String type, boolean outputMode) -
warn
-
warn
-