org.apache.axis.wsdl.symbolTable

Class BindingEntry

public class BindingEntry extends SymTabEntry

This class represents a WSDL binding. It encompasses the WSDL4J Binding object so it can reside in the SymbolTable. It also adds a few bits of information that are a nuisance to get from the WSDL4J Binding object: binding type, binding style, input/output/fault body types.
Nested Class Summary
protected static classBindingEntry.OperationAttr
Contains attributes for Operations - Body type: encoded or literal
Field Summary
static intIN_HEADER
Field IN_HEADER
static intNO_HEADER
Get the flag indicating what sort of header this part is.
static intOUT_HEADER
Field OUT_HEADER
static intTYPE_HTTP_GET
Field TYPE_HTTP_GET
static intTYPE_HTTP_POST
Field TYPE_HTTP_POST
static intTYPE_SOAP
Field TYPE_SOAP
static intTYPE_UNKNOWN
Field TYPE_UNKNOWN
static intUSE_ENCODED
Field USE_ENCODED
static intUSE_LITERAL
Field USE_LITERAL
Constructor Summary
BindingEntry(Binding binding, int bindingType, Style bindingStyle, boolean hasLiteral, HashMap attributes, Map mimeTypes, Map headerParts)
Construct a BindingEntry from a WSDL4J Binding object and the additional binding info: binding type, binding style, whether there is any literal binding, and the attributes which contain the input/output/fault body type information.
BindingEntry(Binding binding)
This is a minimal constructor.
Method Summary
BindinggetBinding()
Get this entry's WSDL4J Binding object.
StylegetBindingStyle()
Get this entry's binding style.
intgetBindingType()
Get this entry's binding type.
UsegetFaultBodyType(Operation operation, String faultName)
Get the fault body type for the given fault of the given operation.
HashMapgetFaults()
Return the map of BindingOperations to ArraList of FaultBodyType
MapgetHeaderParts()
Get the header parameter map.
UsegetInputBodyType(Operation operation)
Get the input body type for the given operation.
MimeInfogetMIMEInfo(String operationName, String parameterName)
Get the mime mapping for the given parameter name.
MapgetMIMETypes()
Get the MIME types map.
SetgetOperations()
Get a {@link Set} of comprised {@link Operation} objects.
UsegetOutputBodyType(Operation operation)
Get the output body type for the given operation.
ParametersgetParameters(Operation operation)
Get the Parameters object for the given operation.
HashMapgetParameters()
Get all of the parameters for all operations.
booleanhasLiteral()
Do any of the message stanzas contain a soap:body which uses literal?
booleanisInHeaderPart(String operationName, String partName)
Is this part an input header part?
booleanisOperationDIME(String operationName)
Check if this operation should use DIME
booleanisOutHeaderPart(String operationName, String partName)
Is this part an output header part?
protected voidsetBindingStyle(Style bindingStyle)
Set this entry's binding style.
protected voidsetBindingType(int bindingType)
Set this entry's binding type.
protected voidsetBodyType(Operation operation, Use bodyType, boolean input)
Set the body type for the given operation.
protected voidsetFaultBodyTypeMap(Operation operation, HashMap faultBodyTypeMap)
Set the fault body type map for the given operation.
voidsetFaults(HashMap faults)
Method setFaults
protected voidsetHasLiteral(boolean hasLiteral)
Set the literal flag.
voidsetHeaderPart(String operationName, String partName, int headerFlags)
Set the header part mapping for the given part name.
protected voidsetInputBodyType(Operation operation, Use inputBodyType)
Set the input body type for the given operation.
voidsetMIMEInfo(String operationName, String parameterName, String type, String dims)
Set the mime mapping for the given parameter name.
voidsetOperationDIME(String operationName)
Mark the operation as a DIME operation
protected voidsetOutputBodyType(Operation operation, Use outputBodyType)
Set the output body type for the given operation.
voidsetParameters(HashMap parameters)
Set the parameters for all operations

Field Detail

IN_HEADER

public static final int IN_HEADER
Field IN_HEADER

NO_HEADER

public static final int NO_HEADER
Get the flag indicating what sort of header this part is.

OUT_HEADER

public static final int OUT_HEADER
Field OUT_HEADER

TYPE_HTTP_GET

public static final int TYPE_HTTP_GET
Field TYPE_HTTP_GET

TYPE_HTTP_POST

public static final int TYPE_HTTP_POST
Field TYPE_HTTP_POST

TYPE_SOAP

public static final int TYPE_SOAP
Field TYPE_SOAP

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
Field TYPE_UNKNOWN

USE_ENCODED

public static final int USE_ENCODED
Field USE_ENCODED

USE_LITERAL

public static final int USE_LITERAL
Field USE_LITERAL

Constructor Detail

BindingEntry

public BindingEntry(Binding binding, int bindingType, Style bindingStyle, boolean hasLiteral, HashMap attributes, Map mimeTypes, Map headerParts)
Construct a BindingEntry from a WSDL4J Binding object and the additional binding info: binding type, binding style, whether there is any literal binding, and the attributes which contain the input/output/fault body type information.

Parameters: binding bindingType bindingStyle hasLiteral attributes mimeTypes headerParts

BindingEntry

public BindingEntry(Binding binding)
This is a minimal constructor. Everything will be set up with defaults. If the defaults aren't desired, then the appropriate setter method should be called. The defaults are: bindingType = TYPE_UNKNOWN bindingStyle = DOCUMENT hasLiteral = false operation inputBodyTypes = USE_ENCODED operation outputBodyTypes = USE_ENCODED operation faultBodyTypes = USE_ENCODED mimeTypes = null

The caller of this constructor should also call the various setter methods to fully fill out this object: setBindingType, setBindingStyle, setHasLiteral, setAttribute, setMIMEType.

Parameters: binding

Method Detail

getBinding

public Binding getBinding()
Get this entry's WSDL4J Binding object.

Returns:

getBindingStyle

public Style getBindingStyle()
Get this entry's binding style.

Returns:

getBindingType

public int getBindingType()
Get this entry's binding type. One of BindingEntry.TYPE_SOAP, BindingEntry.TYPE_HTTP_GET, BindingEntry.TYPE_HTTP_POST.

Returns:

getFaultBodyType

public Use getFaultBodyType(Operation operation, String faultName)
Get the fault body type for the given fault of the given operation.

Parameters: operation faultName

Returns: Use.ENCODED or Use.LITERAL

getFaults

public HashMap getFaults()
Return the map of BindingOperations to ArraList of FaultBodyType

Returns:

getHeaderParts

public Map getHeaderParts()
Get the header parameter map.

Returns:

getInputBodyType

public Use getInputBodyType(Operation operation)
Get the input body type for the given operation.

Parameters: operation

Returns:

getMIMEInfo

public MimeInfo getMIMEInfo(String operationName, String parameterName)
Get the mime mapping for the given parameter name. If there is none, this returns null.

Parameters: operationName parameterName

Returns:

getMIMETypes

public Map getMIMETypes()
Get the MIME types map.

Returns:

getOperations

public Set getOperations()
Get a {@link Set} of comprised {@link Operation} objects.

Returns:

getOutputBodyType

public Use getOutputBodyType(Operation operation)
Get the output body type for the given operation.

Parameters: operation

Returns:

getParameters

public Parameters getParameters(Operation operation)
Get the Parameters object for the given operation.

Parameters: operation

Returns:

getParameters

public HashMap getParameters()
Get all of the parameters for all operations.

Returns:

hasLiteral

public boolean hasLiteral()
Do any of the message stanzas contain a soap:body which uses literal?

Returns:

isInHeaderPart

public boolean isInHeaderPart(String operationName, String partName)
Is this part an input header part?.

Parameters: operationName partName

Returns:

isOperationDIME

public boolean isOperationDIME(String operationName)
Check if this operation should use DIME

Parameters: operationName

Returns:

isOutHeaderPart

public boolean isOutHeaderPart(String operationName, String partName)
Is this part an output header part?.

Parameters: operationName partName

Returns:

setBindingStyle

protected void setBindingStyle(Style bindingStyle)
Set this entry's binding style.

Parameters: bindingStyle

setBindingType

protected void setBindingType(int bindingType)
Set this entry's binding type.

Parameters: bindingType

setBodyType

protected void setBodyType(Operation operation, Use bodyType, boolean input)
Set the body type for the given operation. If input is true, then this is the inputBodyType, otherwise it's the outputBodyType. (NOTE: this method exists to enable reusing some SymbolTable code.

Parameters: operation bodyType input

setFaultBodyTypeMap

protected void setFaultBodyTypeMap(Operation operation, HashMap faultBodyTypeMap)
Set the fault body type map for the given operation.

Parameters: operation faultBodyTypeMap

setFaults

public void setFaults(HashMap faults)
Method setFaults

Parameters: faults

setHasLiteral

protected void setHasLiteral(boolean hasLiteral)
Set the literal flag.

Parameters: hasLiteral

setHeaderPart

public void setHeaderPart(String operationName, String partName, int headerFlags)
Set the header part mapping for the given part name.

Parameters: operationName partName headerFlags

setInputBodyType

protected void setInputBodyType(Operation operation, Use inputBodyType)
Set the input body type for the given operation.

Parameters: operation inputBodyType

setMIMEInfo

public void setMIMEInfo(String operationName, String parameterName, String type, String dims)
Set the mime mapping for the given parameter name.

Parameters: operationName parameterName type dims

setOperationDIME

public void setOperationDIME(String operationName)
Mark the operation as a DIME operation

Parameters: operationName

setOutputBodyType

protected void setOutputBodyType(Operation operation, Use outputBodyType)
Set the output body type for the given operation.

Parameters: operation outputBodyType

setParameters

public void setParameters(HashMap parameters)
Set the parameters for all operations

Parameters: parameters

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.