Spring Web Services Framework

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

java.lang.Object
  extended by org.springframework.ws.wsdl.wsdl11.provider.AbstractPortTypesProvider
All Implemented Interfaces:
PortTypesProvider
Direct Known Subclasses:
SuffixBasedPortTypesProvider

public abstract class AbstractPortTypesProvider
extends Object
implements PortTypesProvider

Abstract base class for PortTypesProvider implementations.

Since:
1.5.0
Author:
Arjen Poutsma

Field Summary
protected  Log logger
          Logger available to subclasses.
 
Constructor Summary
AbstractPortTypesProvider()
           
 
Method Summary
 void addPortTypes(Definition definition)
          Creates a single PortType, and calls populatePortType(Definition, PortType) with it.
protected abstract  String getOperationName(Message message)
          Template method that returns the name of the operation coupled to the given Message.
protected  OperationType getOperationType(Operation operation)
          Returns the OperationType for the given operation.
 String getPortTypeName()
          Returns the port type name used for this definition.
protected abstract  boolean isFaultMessage(Message message)
          Indicates whether the given name name should be included as Fault message in the definition.
protected abstract  boolean isInputMessage(Message message)
          Indicates whether the given name name should be included as Input message in the definition.
protected abstract  boolean isOutputMessage(Message message)
          Indicates whether the given name name should be included as Output message in the definition.
protected  void populateFault(Definition definition, Fault fault)
          Called after the Fault has been created, but it's added to the operation.
protected  void populateInput(Definition definition, Input input)
          Called after the Input has been created, but it's added to the operation.
protected  void populateOutput(Definition definition, Output output)
          Called after the Output has been created, but it's added to the operation.
protected  void populatePortType(Definition definition, PortType portType)
          Called after the PortType has been created.
 void setPortTypeName(String portTypeName)
          Sets the port type name used for this definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger
Logger available to subclasses.

Constructor Detail

AbstractPortTypesProvider

public AbstractPortTypesProvider()
Method Detail

getPortTypeName

public String getPortTypeName()
Returns the port type name used for this definition.


setPortTypeName

public void setPortTypeName(String portTypeName)
Sets the port type name used for this definition. Required.


addPortTypes

public void addPortTypes(Definition definition)
                  throws WSDLException
Creates a single PortType, and calls populatePortType(Definition, PortType) with it.

Specified by:
addPortTypes in interface PortTypesProvider
Parameters:
definition - the WSDL4J Definition
Throws:
WSDLException - in case of errors

populatePortType

protected void populatePortType(Definition definition,
                                PortType portType)
                         throws WSDLException
Called after the PortType has been created.

Default implementation sets the name of the port type to the defined value.

Parameters:
portType - the WSDL4J PortType
Throws:
WSDLException - in case of errors
See Also:
setPortTypeName(String)

getOperationName

protected abstract String getOperationName(Message message)
Template method that returns the name of the operation coupled to the given Message. Subclasses can return null to indicate that a message should not be coupled to an operation.

Parameters:
message - the WSDL4J Message
Returns:
the operation name; or null

isInputMessage

protected abstract boolean isInputMessage(Message message)
Indicates whether the given name name should be included as Input message in the definition.

Parameters:
message - the message
Returns:
true if to be included as input; false otherwise

populateInput

protected void populateInput(Definition definition,
                             Input input)
Called after the Input has been created, but it's added to the operation. Subclasses can override this method to define the input name.

Default implementation sets the input name to the message name.

Parameters:
definition - the WSDL4J Definition
input - the WSDL4J Input

isOutputMessage

protected abstract boolean isOutputMessage(Message message)
Indicates whether the given name name should be included as Output message in the definition.

Parameters:
message - the message
Returns:
true if to be included as output; false otherwise

populateOutput

protected void populateOutput(Definition definition,
                              Output output)
Called after the Output has been created, but it's added to the operation. Subclasses can override this method to define the output name.

Default implementation sets the output name to the message name.

Parameters:
definition - the WSDL4J Definition
output - the WSDL4J Output

isFaultMessage

protected abstract boolean isFaultMessage(Message message)
Indicates whether the given name name should be included as Fault message in the definition.

Parameters:
message - the message
Returns:
true if to be included as fault; false otherwise

populateFault

protected void populateFault(Definition definition,
                             Fault fault)
Called after the Fault has been created, but it's added to the operation. Subclasses can override this method to define the fault name.

Default implementation sets the fault name to the message name.

Parameters:
definition - the WSDL4J Definition
fault - the WSDL4J Fault

getOperationType

protected OperationType getOperationType(Operation operation)
Returns the OperationType for the given operation.

Default implementation returns OperationType.REQUEST_RESPONSE if both input and output are set; OperationType.ONE_WAY if only input is set, or OperationType.NOTIFICATION if only output is set.

Parameters:
operation - the WSDL4J Operation
Returns:
the operation type for the operation

Spring Web Services Framework

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