Spring Web Services Framework

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

java.lang.Object
  extended by org.springframework.ws.wsdl.wsdl11.provider.DefaultConcretePartProvider
All Implemented Interfaces:
BindingsProvider, ServicesProvider
Direct Known Subclasses:
Soap11Provider, Soap12Provider

public class DefaultConcretePartProvider
extends Object
implements BindingsProvider, ServicesProvider

Default implementation of the BindingsProvider and ServicesProvider interfaces.

Creates a binding that matches any present portType, and a service containing ports that match the bindings. Lets subclasses populate these through template methods. *

Since:
1.5.0
Author:
Arjen Poutsma

Field Summary
protected  Log logger
          Logger available to subclasses.
 
Constructor Summary
DefaultConcretePartProvider()
           
 
Method Summary
 void addBindings(Definition definition)
          Creates a Binding for each PortType in the definition, and calls populateBinding(Definition,javax.wsdl.Binding) with it.
 void addServices(Definition definition)
          Creates a single Service if not present, and calls populateService(Definition, Service) with it.
 String getBindingSuffix()
          Returns the suffix to append to the port type name to obtain the binding name.
 String getServiceName()
          Returns the service name.
protected  void populateBinding(Definition definition, Binding binding)
          Called after the Binding has been created, but before any sub-elements are added.
protected  void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault)
          Called after the BindingFault has been created.
protected  void populateBindingInput(Definition definition, BindingInput bindingInput, Input input)
          Called after the BindingInput has been created.
protected  void populateBindingOperation(Definition definition, BindingOperation bindingOperation)
          Called after the BindingOperation has been created, but before any sub-elements are added.
protected  void populateBindingOutput(Definition definition, BindingOutput bindingOutput, Output output)
          Called after the BindingOutput has been created.
protected  void populatePort(Definition definition, Port port)
          Called after the Port has been created, but before any sub-elements are added.
protected  void populateService(Definition definition, Service service)
          Called after the Service has been created, but before any sub-elements are added.
 void setBindingSuffix(String bindingSuffix)
          Sets the suffix to append to the port type name to obtain the binding name.
 void setServiceName(String serviceName)
          Sets the service name.
 
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

DefaultConcretePartProvider

public DefaultConcretePartProvider()
Method Detail

getServiceName

public String getServiceName()
Returns the service name.


setServiceName

public void setServiceName(String serviceName)
Sets the service name.


getBindingSuffix

public String getBindingSuffix()
Returns the suffix to append to the port type name to obtain the binding name.


setBindingSuffix

public void setBindingSuffix(String bindingSuffix)
Sets the suffix to append to the port type name to obtain the binding name.


addBindings

public void addBindings(Definition definition)
                 throws WSDLException
Creates a Binding for each PortType in the definition, and calls populateBinding(Definition,javax.wsdl.Binding) with it. Creates a BindingOperation for each Operation in the port type, a BindingInput for each Input in the operation, etc.

Calls the various populate methods with the created WSDL4J objects.

Specified by:
addBindings in interface BindingsProvider
Parameters:
definition - the WSDL4J Definition
Throws:
WSDLException - in case of errors
See Also:
populateBinding(Definition,javax.wsdl.Binding), populateBindingOperation(Definition,javax.wsdl.BindingOperation), populateBindingInput(Definition,javax.wsdl.BindingInput,javax.wsdl.Input), populateBindingOutput(Definition,javax.wsdl.BindingOutput,javax.wsdl.Output), populateBindingFault(Definition,javax.wsdl.BindingFault,javax.wsdl.Fault)

populateBinding

protected void populateBinding(Definition definition,
                               Binding binding)
                        throws WSDLException
Called after the Binding has been created, but before any sub-elements are added. Subclasses can override this method to define the binding name, or add extensions to it.

Default implementation sets the binding name to the port type name with the suffix appended to it.

Parameters:
definition - the WSDL4J Definition
binding - the WSDL4J Binding
Throws:
WSDLException

populateBindingOperation

protected void populateBindingOperation(Definition definition,
                                        BindingOperation bindingOperation)
                                 throws WSDLException
Called after the BindingOperation has been created, but before any sub-elements are added. Subclasses can override this method to define the binding name, or add extensions to it.

Default implementation sets the name of the binding operation to the name of the operation.

Parameters:
definition - the WSDL4J Definition
bindingOperation - the WSDL4J BindingOperation
Throws:
WSDLException - in case of errors

populateBindingInput

protected void populateBindingInput(Definition definition,
                                    BindingInput bindingInput,
                                    Input input)
                             throws WSDLException
Called after the BindingInput has been created. Subclasses can override this method to define the name, or add extensions to it.

Default implementation set the name of the binding input to the name of the input.

Parameters:
definition - the WSDL4J Definition
bindingInput - the WSDL4J BindingInput
input - the corresponding WSDL4J Input @throws WSDLException in case of errors
Throws:
WSDLException

populateBindingOutput

protected void populateBindingOutput(Definition definition,
                                     BindingOutput bindingOutput,
                                     Output output)
                              throws WSDLException
Called after the BindingOutput has been created. Subclasses can override this method to define the name, or add extensions to it.

Default implementation sets the name of the binding output to the name of the output.

Parameters:
definition - the WSDL4J Definition
bindingOutput - the WSDL4J BindingOutput
output - the corresponding WSDL4J Output @throws WSDLException in case of errors
Throws:
WSDLException

populateBindingFault

protected void populateBindingFault(Definition definition,
                                    BindingFault bindingFault,
                                    Fault fault)
                             throws WSDLException
Called after the BindingFault has been created. Subclasses can implement this method to define the name, or add extensions to it.

Default implementation set the name of the binding fault to the name of the fault.

Parameters:
bindingFault - the WSDL4J BindingFault
fault - the corresponding WSDL4J Fault @throws WSDLException in case of errors
Throws:
WSDLException

addServices

public void addServices(Definition definition)
                 throws WSDLException
Creates a single Service if not present, and calls populateService(Definition, Service) with it. Creates a corresponding Port for each Binding, which is passed to populatePort(javax.wsdl.Definition,javax.wsdl.Port).

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

populateService

protected void populateService(Definition definition,
                               Service service)
                        throws WSDLException
Called after the Service has been created, but before any sub-elements are added. Subclasses can implement this method to define the service name, or add extensions to it.

Default implementation sets the name to the serviceName property.

Parameters:
service - the WSDL4J Service
Throws:
WSDLException - in case of errors

populatePort

protected void populatePort(Definition definition,
                            Port port)
                     throws WSDLException
Called after the Port has been created, but before any sub-elements are added. Subclasses can implement this method to define the port name, or add extensions to it.

Default implementation sets the port name to the binding name.

Parameters:
definition - the WSDL4J Definition
port - the WSDL4J Port
Throws:
WSDLException - in case of errors

Spring Web Services Framework

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