Class DefaultMessagesProvider

java.lang.Object
org.springframework.ws.wsdl.wsdl11.provider.DefaultMessagesProvider
All Implemented Interfaces:
MessagesProvider
Direct Known Subclasses:
SuffixBasedMessagesProvider

public class DefaultMessagesProvider extends Object implements MessagesProvider
Default implementation of the MessagesProvider.

Simply adds all elements contained in the schema(s) as messages.

Since:
1.5.0
Author:
Arjen Poutsma
  • Constructor Details

    • DefaultMessagesProvider

      public DefaultMessagesProvider()
  • Method Details

    • addMessages

      public void addMessages(javax.wsdl.Definition definition) throws javax.wsdl.WSDLException
      Specified by:
      addMessages in interface MessagesProvider
      Throws:
      javax.wsdl.WSDLException
    • getElementName

      protected String getElementName(Element element)
      Returns the name attribute of the given element.
      Parameters:
      element - the element whose name to return
      Returns:
      the name of the element
    • isMessageElement

      protected boolean isMessageElement(Element element)
      Indicates whether the given element should be includes as Message in the definition.

      Default implementation checks whether the element has the XML Schema namespace, and if it has the local name "element".

      Parameters:
      element - the element elligable for being a message
      Returns:
      true if to be included as message; false otherwise
    • populateMessage

      protected void populateMessage(javax.wsdl.Definition definition, javax.wsdl.Message message, QName elementName) throws javax.wsdl.WSDLException
      Called after the Message has been created.

      Default implementation sets the name of the message to the element name.

      Parameters:
      definition - the WSDL4J Definition
      message - the WSDL4J Message
      elementName - the element name
      Throws:
      javax.wsdl.WSDLException - in case of errors
    • populatePart

      protected void populatePart(javax.wsdl.Definition definition, javax.wsdl.Part part, QName elementName) throws javax.wsdl.WSDLException
      Called after the Part has been created.

      Default implementation sets the element name of the part.

      Parameters:
      definition - the WSDL4J Definition
      part - the WSDL4J Part
      elementName - the elementName @throws WSDLException in case of errors
      Throws:
      javax.wsdl.WSDLException
      See Also:
      • Part.setElementName(javax.xml.namespace.QName)