hu.soft4d.minerva.wsdl
Class JMessage

java.lang.Object
  extended by hu.soft4d.minerva.wsdl.JMessage

public class JMessage
extends java.lang.Object

Class representing a WSDL message. Use getParameters() to obtain its parameters under given conditions.

Author:
Zsolt Kiss-Gere, 4DSoft Ltd.

Constructor Summary
JMessage(javax.wsdl.Message message, int direction, org.apache.axis.wsdl.symbolTable.SymbolTable symTable)
           
 
Method Summary
 java.util.List<JParameter> getParameters(JPortBinding binding, JOperation operation, int direction)
          Convenience method which returns a list of message parameters if a binding, operation and direction are given.
 java.util.List<JParameter> getParameters(org.apache.axis.constants.Use use, org.apache.axis.constants.Style style)
          Get the soap:binding style and soap:body for this message.
 javax.xml.namespace.QName getQName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMessage

public JMessage(javax.wsdl.Message message,
                int direction,
                org.apache.axis.wsdl.symbolTable.SymbolTable symTable)
Parameters:
message - A javax.wsdl.Message
direction - The message direction: Constants.IN_MESSAGE, Constants.OUT_MESSAGE
symTable -
Method Detail

getQName

public javax.xml.namespace.QName getQName()

getParameters

public java.util.List<JParameter> getParameters(JPortBinding binding,
                                                JOperation operation,
                                                int direction)
                                         throws java.lang.Exception
Convenience method which returns a list of message parameters if a binding, operation and direction are given.

Parameters:
direction - Constants.IN_MESSAGE or Constants.OUT_MESSAGE
Returns:
List of JParameter-s of this message
Throws:
java.lang.Exception

getParameters

public java.util.List<JParameter> getParameters(org.apache.axis.constants.Use use,
                                                org.apache.axis.constants.Style style)
                                         throws java.lang.Exception
Get the soap:binding style and soap:body for this message.

If soap:body use="encoded", then each message part is a parameter and its type attribute specifies the parameter type. The soap:body optional attributes 'parts' and 'namespace' also count.

If use="literal", the parts define their type. If a part has an 'element' attribute, this element will appear directly under the body (style=document), or under body | part_name (style=rpc). In the style=document case we assume that there is one part in the message, which contains the parameters.

So in the use="literal" case, we also assume a binding style of document and that the message has one part with an 'element' attribute. This will contain the message parameters.

Note: it is not possible to get the soap:body element from a wsdl operation or message with the WSDL4J API!

Parameters:
use - The "use" attribute of the soap:body tag, defined in an operation which uses this message.
Can be "encoded" or "literal".
style - The "style" attribute of the soap:binding tag, defined in a port binding.
Can be "rpc" or "document".
Returns:
A List of JParameter-s of this message.
Throws:
java.lang.Exception