electric.soap.wsdl
Class SOAPOperation

java.lang.Object
  extended byelectric.soap.wsdl.SOAPOperation
All Implemented Interfaces:
IDIMEConstants, IEXMLLoggingConstants, IGLUELoggingConstants, ILoggingConstants, IOperation, ISOAPConstants, IWSDLConstants
Direct Known Subclasses:
SOAP12Operation

public class SOAPOperation
extends java.lang.Object
implements ISOAPConstants, IOperation, IGLUELoggingConstants, IWSDLConstants, IDIMEConstants

SOAPOperation objects correspond to the wsdl elements at definitions/binding/operation, and describes how the abstract definitions in portType/operation are bound to a particular protocol.

GLUE binds SOAP operations directly to Java methods, and SOAPOperation is responsible for holding the mapping between the binding/operation and the type and order of the corresponding Java method return values and parameters.

Since SOAPOperation knows about the mapping from Java types to SOAP messages, it does the actual conversion from Java method invocations into SOAPMessage objects, and from SOAPMessage objects back into Java return values.

Author:
webMethods

Field Summary
 Parameter[] parameters
           
 
Fields inherited from interface electric.soap.ISOAPConstants
ACTOR, ASYNC, BODY, DETAIL, ENCODING_STYLE, ENVELOPE, EXCEPTION, FAULT, FAULT_ACTOR, FAULT_CODE, FAULT_STRING, GET_SOAP_ACTOR, GET_SOAP_CODE, HEADER, MUST_UNDERSTAND, NEXT_ACTOR, OPTIMIZED_HEADER, SET_SOAP_ACTOR, SET_SOAP_CODE, SET_SOAP_DETAIL, SOAP_ACTION_HEADER, SOAP_BINDING, SOAP_ENCODING, SOAP_ENCODING_PREFIX, SOAP_ENVELOPE, SOAP_HTTP_TRANSPORT, SOAP_PREFIX, SOAP11_BINDING, SOAP11_ENCODING, SOAP11_ENVELOPE, SOAP12, SOAP12_BINDING, SOAP12_ENCODING, SOAP12_ENVELOPE, SOAP12_HTTP_CONTENT_TYPE, STACKTRACE, TME_PREFIX, UNDERSTOOD, XSD_PREFIX, XSI_PREFIX, XSI_SUFFIX
 
Fields inherited from interface electric.glue.IGLUELoggingConstants
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT
 
Fields inherited from interface electric.xml.IEXMLLoggingConstants
MAPPING_EVENT, SCHEMA_EVENT
 
Fields inherited from interface electric.util.log.ILoggingConstants
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT
 
Fields inherited from interface electric.wsdl.IWSDLConstants
ADDRESS, BINDING, DEFINITIONS, DESCRIPTION, DOCUMENT, DOCUMENTATION, ELEMENT, ENCODED, ENCODING_STYLE, ENDPOINT, FAULT, FAULT_DETAIL, GET, GETPOST, HTTP, INPUT, LITERAL, LOCATION, MESSAGE, METHOD_NAMESPACE, MIME, NAME, NAMESPACE, OPERATION, OUTPUT, PARAMETER_ORDER, PARAMETERS, PART, PORT, PORT_TYPE, POST, RPC, SERVICE, SOAP, SOAP_ACTION, STYLE, TARGET_NAMESPACE, TARGET_NAMESPACE_PREFIX, TNS, TRANSPORT, TYPE, USE, VERB, WSDL_EXTENSION, WSDL_NAMESPACE, WSDL_PREFIX, WSDL_SOAP_NAMESPACE, WSDL_SOAP_PREFIX, WSDL_SOAP11_NAMESPACE, WSDL_SOAP11_PREFIX, WSDL_SOAP12_NAMESPACE, WSDL_SOAP12_PREFIX
 
Fields inherited from interface electric.util.dime.IDIMEConstants
DIME_ATTACHMENT_STYLE, DIME_CLOSED_LAYOUT, DIME_CONTENT_TYPE, DIME_DEFAULT_PREFIX, DIME_LAYOUT_ATTRIBUTE, DIME_MEMORY, DIME_MESSAGE_ELEMENT, DIME_NAMESPACE, DIME_SOAP_ENVELOPE_URI, DIME_STREAM, DIME_TYPE_FORMAT_HEADER, TYPE_ABSOLUTEURI, TYPE_MEDIATYPE, TYPE_NONE, TYPE_UNCHANGED, TYPE_UNKNOWN, VERSION_ONE
 
Constructor Summary
SOAPOperation()
           
 
Method Summary
 void addParameter(Parameter parameter)
           
 SOAPMessage generateFault(java.lang.Throwable exception, SOAPMessage request)
          Given an java.lang.Exception, generate a SOAP fault message matching one of the declared faults on this operation, or null if there is no matching fault.
 SOAPMessage generateSOAP11Fault(java.lang.Throwable exception, SOAPMessage request)
          Given a java.lang.Exception, generate a SOAP 1.1 style fault message.
 java.lang.Class[] getArgClasses()
           
 java.lang.Object[] getArgs(SOAPMessage request)
           
 int getAttachmentCount()
           
 SOAPBinding getBinding()
           
 SOAPMessageDecl getFault(java.lang.String faultName)
          Give a faultName, try to find a matching fault declartion in the wsdl for this operation.
 SOAPMessageDecl[] getFaults()
           
 java.lang.Class[] getInArgClasses()
           
 int getInArgCount()
           
 SOAPMessageDecl getInput()
           
 SOAPMessageDecl getMatchingFault(java.lang.Throwable exception)
          Pick a soap fault declaration that "matches" the given exception, return null if none match.
 java.lang.reflect.Method getMethod()
           
 java.lang.String getMethodName()
           
 Namespaces getNamespaces()
           
 Operation getOperation()
           
 int getOutArgCount()
           
 SOAPMessageDecl getOutput()
           
 int getParameterCount()
           
 Return getReturnValue()
           
 java.lang.String getSoapAction()
           
 java.lang.String getSOAPAction()
           
 java.lang.String getVersion()
           
 ISOAPWriter getWriter()
           
 boolean hasAttachments()
           
 boolean isAsync()
           
 boolean isPolymorphic()
           
 boolean isRPC()
           
 boolean isSoapActionRequired()
           
 java.rmi.RemoteException mapFaultToException(SOAPMessage faultMessage)
          Convert a faultMessage into an exception, possibly using the WSDL declarations to deserialize the fault detail.
 Value readResponse(SOAPMessage response, java.lang.Object[] args)
          Given a SOAP message, convert the data into a set of Java objects representing the return value plus any Out or InOut parameters.
 void removeParameters()
          Used by JAX-RPC implementation
 SOAPOptimizations selectOptimizations(SOAPOptimizations optimizations)
           
 void setArgClasses(java.lang.Class[] argClasses)
           
 void setAttachmentCount(int attachmentCount)
           
 void setBinding(SOAPBinding binding)
           
 void setFaults(SOAPMessageDecl[] faults)
           
 void setInArgClasses(java.lang.Class[] inArgClasses)
           
 void setInArgCount(int inArgCount)
           
 void setInput(SOAPMessageDecl input)
           
 void setMethod(java.lang.reflect.Method method)
           
 void setNamespaces(Namespaces namespaces)
           
 void setOperation(Operation operation)
           
 void setOutArgCount(int outArgCount)
           
 void setOutput(SOAPMessageDecl output)
           
 void setParameterFlags()
           
 void setPolymorphic(boolean polymorphic)
           
 void setReturnValue(Return returnValue)
           
 void setSoapAction(java.lang.String soapAction)
           
 void setSoapActionRequired(boolean soapActionRequired)
          valid only for soapbuilders soap 1.2/wsdl 1.1 binding
 void setWriter(ISOAPWriter writer)
           
 java.lang.String toString()
           
 void writeRequest(SOAPMessage request, SOAPOptimizations optimizations, java.lang.Object[] args)
          Given Java method arguments, convert the arguments into a SOAP message.
 void writeResponse(SOAPMessage response, SOAPOptimizations requestOptimizations, java.lang.Object[] args, Value result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parameters

public Parameter[] parameters
Constructor Detail

SOAPOperation

public SOAPOperation()
Method Detail

toString

public java.lang.String toString()

getMethodName

public java.lang.String getMethodName()
Specified by:
getMethodName in interface IOperation

isAsync

public boolean isAsync()
Specified by:
isAsync in interface IOperation

isRPC

public boolean isRPC()

setParameterFlags

public void setParameterFlags()
                       throws SchemaException
Throws:
SchemaException

getSOAPAction

public java.lang.String getSOAPAction()

isSoapActionRequired

public boolean isSoapActionRequired()
Returns:
true if soap 1.1, or soap 1.2 and wsdl says yes.

setSoapActionRequired

public void setSoapActionRequired(boolean soapActionRequired)
valid only for soapbuilders soap 1.2/wsdl 1.1 binding

Parameters:
soapActionRequired -

hasAttachments

public boolean hasAttachments()

getVersion

public java.lang.String getVersion()

getInArgCount

public int getInArgCount()
Specified by:
getInArgCount in interface IOperation

getOutArgCount

public int getOutArgCount()

getArgClasses

public java.lang.Class[] getArgClasses()
                                throws java.lang.ClassNotFoundException
Specified by:
getArgClasses in interface IOperation
Throws:
java.lang.ClassNotFoundException

getInArgClasses

public java.lang.Class[] getInArgClasses()
                                  throws java.lang.ClassNotFoundException
Specified by:
getInArgClasses in interface IOperation
Throws:
java.lang.ClassNotFoundException

removeParameters

public void removeParameters()
Used by JAX-RPC implementation


addParameter

public void addParameter(Parameter parameter)
Parameters:
parameter -

getParameterCount

public int getParameterCount()

writeRequest

public void writeRequest(SOAPMessage request,
                         SOAPOptimizations optimizations,
                         java.lang.Object[] args)
                  throws java.rmi.MarshalException
Given Java method arguments, convert the arguments into a SOAP message.

Parameters:
request -
optimizations -
args -
Throws:
java.rmi.MarshalException

readResponse

public Value readResponse(SOAPMessage response,
                          java.lang.Object[] args)
                   throws java.rmi.UnmarshalException
Given a SOAP message, convert the data into a set of Java objects representing the return value plus any Out or InOut parameters.

Parameters:
response -
args -
Throws:
java.rmi.UnmarshalException

writeResponse

public void writeResponse(SOAPMessage response,
                          SOAPOptimizations requestOptimizations,
                          java.lang.Object[] args,
                          Value result)
                   throws java.rmi.MarshalException
Parameters:
response -
requestOptimizations -
args -
result -
Throws:
java.rmi.MarshalException

getArgs

public java.lang.Object[] getArgs(SOAPMessage request)
                           throws java.rmi.UnmarshalException
Parameters:
request -
Throws:
java.rmi.UnmarshalException

getNamespaces

public Namespaces getNamespaces()
Returns:

getWriter

public ISOAPWriter getWriter()

setWriter

public void setWriter(ISOAPWriter writer)
Parameters:
writer -

selectOptimizations

public SOAPOptimizations selectOptimizations(SOAPOptimizations optimizations)
Parameters:
optimizations -

getBinding

public SOAPBinding getBinding()
Returns:
wsdl:binding associated with this soap:operation.

setBinding

public void setBinding(SOAPBinding binding)
Parameters:
binding -

getInput

public SOAPMessageDecl getInput()
Returns:
wsdl:binding/wsdl:operation/wsdl:input.

setInput

public void setInput(SOAPMessageDecl input)
Parameters:
input -

getOutput

public SOAPMessageDecl getOutput()
Returns:
wsdl:binding/wsdl:operation/wsdl:output

setOutput

public void setOutput(SOAPMessageDecl output)
Parameters:
output -

getOperation

public Operation getOperation()
Returns:
associated wsdl:portType/wsdl:operation.

setOperation

public void setOperation(Operation operation)
Parameters:
operation -

getSoapAction

public java.lang.String getSoapAction()
Returns:
wsdl:binding/wsdl:operation/soap:operation/@soapAction

setSoapAction

public void setSoapAction(java.lang.String soapAction)
Parameters:
soapAction -

getAttachmentCount

public int getAttachmentCount()

setAttachmentCount

public void setAttachmentCount(int attachmentCount)
Parameters:
attachmentCount -

getReturnValue

public Return getReturnValue()

setReturnValue

public void setReturnValue(Return returnValue)
Parameters:
returnValue -

setInArgCount

public void setInArgCount(int inArgCount)
Parameters:
inArgCount -

setOutArgCount

public void setOutArgCount(int outArgCount)
Parameters:
outArgCount -

setArgClasses

public void setArgClasses(java.lang.Class[] argClasses)
Parameters:
argClasses -

setInArgClasses

public void setInArgClasses(java.lang.Class[] inArgClasses)
Parameters:
inArgClasses -

isPolymorphic

public boolean isPolymorphic()

setPolymorphic

public void setPolymorphic(boolean polymorphic)
Parameters:
polymorphic -

getMethod

public java.lang.reflect.Method getMethod()

setMethod

public void setMethod(java.lang.reflect.Method method)
Parameters:
method -

setNamespaces

public void setNamespaces(Namespaces namespaces)
Parameters:
namespaces -

getFaults

public SOAPMessageDecl[] getFaults()
Returns:
wsdl:binding/wsdl:operation/wsdl:fault

setFaults

public void setFaults(SOAPMessageDecl[] faults)
Parameters:
faults -

getMatchingFault

public SOAPMessageDecl getMatchingFault(java.lang.Throwable exception)
                                 throws SchemaException
Pick a soap fault declaration that "matches" the given exception, return null if none match.

Parameters:
exception -
Returns:
a SOAP fault, or null.
Throws:
SchemaException

generateFault

public SOAPMessage generateFault(java.lang.Throwable exception,
                                 SOAPMessage request)
Given an java.lang.Exception, generate a SOAP fault message matching one of the declared faults on this operation, or null if there is no matching fault.

Parameters:
exception -
Returns:
a soap fault message, or null.

generateSOAP11Fault

public SOAPMessage generateSOAP11Fault(java.lang.Throwable exception,
                                       SOAPMessage request)
Given a java.lang.Exception, generate a SOAP 1.1 style fault message. The message will not be optimized, even if optimizations are turned on.

Parameters:
exception -
request -
Returns:
a soap 1.1 fault message, or null.

getFault

public SOAPMessageDecl getFault(java.lang.String faultName)
Give a faultName, try to find a matching fault declartion in the wsdl for this operation.

Parameters:
faultName -
Returns:
matching wsdl fault declaration, or null.

mapFaultToException

public java.rmi.RemoteException mapFaultToException(SOAPMessage faultMessage)
Convert a faultMessage into an exception, possibly using the WSDL declarations to deserialize the fault detail. Caller should confirm that the message is actually a fault using isFault.

Parameters:
faultMessage - message containing fault
Returns:
remote exception deserialized from detail, or null if there is a problem processing the fault.


copyright© 2001-2004 by webMethods All Rights Reserved.