Spring Web Services Framework

org.springframework.ws.wsdl.wsdl11.provider
Class DefaultMessagesProvider

java.lang.Object
  extended by 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 Summary
DefaultMessagesProvider()
           
 
Method Summary
 void addMessages(Definition definition)
           
protected  String getElementName(Element element)
          Returns the name attribute of the given element.
protected  boolean isMessageElement(Element element)
          Indicates whether the given element should be includes as Message in the definition.
protected  void populateMessage(Definition definition, Message message, QName elementName)
          Called after the Message has been created.
protected  void populatePart(Definition definition, Part part, QName elementName)
          Called after the Part has been created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessagesProvider

public DefaultMessagesProvider()
Method Detail

addMessages

public void addMessages(Definition definition)
                 throws WSDLException
Specified by:
addMessages in interface MessagesProvider
Throws:
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(Definition definition,
                               Message message,
                               QName elementName)
                        throws 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:
WSDLException - in case of errors

populatePart

protected void populatePart(Definition definition,
                            Part part,
                            QName elementName)
                     throws 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:
WSDLException
See Also:
Part.setElementName(javax.xml.namespace.QName)

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.