org.licas.ws.wsdl.model

## Class WsdlModel

- java.lang.Object
- - org.licas.ws.wsdl.model.LicasWsdlModel
  - - org.licas.ws.wsdl.model.WsdlModel

-     public class WsdlModel
      extends LicasWsdlModel

  This class describes an entire wsdl document and stores the info in Java objects.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WsdlModel()` Create a new instance of WsdlModel.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addBinding(WsdlBinding binding)` Add a new binding to the model.
    `boolean` | `addInterface(WsdlInterface wsdlInterface)` Add a new interface object to the model.
    `boolean` | `addMessage(WsdlMessage message)` Add a new message to the model.
    `boolean` | `addOperation(WsdlOperation operation)` Add a new operation to the model.
    `boolean` | `addPort(WsdlPort port)` Add a new port to the model.
    `boolean` | `addService(WsdlService service)` Add a new service to the model.
    `void` | `convertMessagesToParameters()` Traverse all of the stored operations and convert the related message parts into empty parameter info elements as part of a complete nested structure.
    `static java.lang.String` | `convertToBindingType(java.lang.String bindingName)` Convert the binding name to a binding type tag.
    `static java.lang.String` | `createPortTypeTag(java.lang.String portName)` Convert the port name to a port type tag.
    `WsdlBinding` | `getBinding(java.lang.String bindingName)` Get the binding with the specified name.
    `java.util.HashMap` | `getBindings()` Get all bindings.
    `javax.xml.namespace.QName` | `getLocalNamespace()` Get the local namespace.
    `WsdlMessage` | `getMessage(java.lang.String messageName)` Get the message with the specified name.
    `java.util.HashMap` | `getMessages()` Get all messages.
    `java.lang.String` | `getName()` Get the web service name.
    `WsdlOperation` | `getOperation(java.lang.String operationName)` Get the operation with the specified name.
    `java.util.HashMap` | `getOperations()` Get all operations.
    `WsdlPort` | `getPort(java.lang.String portName)` Get the port with the specified name.
    `java.util.HashMap` | `getPorts()` Get all pports.
    `WsdlService` | `getService(java.lang.String serviceName)` Get the service with the specified name.
    `java.util.ArrayList` | `getServiceNames()` Return a list of service names.
    `java.util.HashMap` | `getServices()` Get all services.
    `WsdlTypes` | `getTypes()` Get the parameter type descriptions.
    `WsMethodInfo` | `getWebServiceInfo(java.lang.String operationName)` Generate and return the appropriate information to call an operation on a web service.
    `javax.xml.namespace.QName` | `getXmlNamespace()` Get the xml namespace.
    `static boolean` | `isInterface(java.lang.String elementName)` Return true if the tag indicates an interface element.
    `void` | `setLocalNamespace(javax.xml.namespace.QName thisLocalNamespace)` Set the local namespace.
    `void` | `setName(java.lang.String thisName)` Set the web service name.
    `void` | `setTypes(WsdlTypes thisWsdlTypes)` Set the parameter type descriptions.
    `void` | `setXmlNamespace(javax.xml.namespace.QName thisXmlNamespace)` Set the xml namespace.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WsdlModel

          public WsdlModel()

      Create a new instance of WsdlModel.

  - ### Method Detail

    - #### getWebServiceInfo

          public WsMethodInfo getWebServiceInfo(java.lang.String operationName)
                                         throws java.lang.Exception

      Generate and return the appropriate information to call an operation on a web service. This automatically sets the return type and adds the parameter values.
      Parameters:
        `operationName` - the name of the operation to call.
      Returns:
        a web service info object with the appropriate values.
      Throws:
        `java.lang.Exception` - any error.

    - #### convertMessagesToParameters

          public void convertMessagesToParameters()

      Traverse all of the stored operations and convert the related message parts into empty parameter info elements as part of a complete nested structure.

    - #### setName

          public void setName(java.lang.String thisName)

      Set the web service name.
      Parameters:
        `thisName` - the optional web service name.

    - #### getName

          public java.lang.String getName()

      Get the web service name.
      Returns:
        the value of name.

    - #### setLocalNamespace

          public void setLocalNamespace(javax.xml.namespace.QName thisLocalNamespace)

      Set the local namespace.
      Parameters:
        `thisLocalNamespace` - the local namespace.

    - #### getLocalNamespace

          public javax.xml.namespace.QName getLocalNamespace()

      Get the local namespace.
      Returns:
        the value of localNamespace.

    - #### setXmlNamespace

          public void setXmlNamespace(javax.xml.namespace.QName thisXmlNamespace)

      Set the xml namespace.
      Parameters:
        `thisXmlNamespace` - the xml namespace.

    - #### getXmlNamespace

          public javax.xml.namespace.QName getXmlNamespace()

      Get the xml namespace.
      Returns:
        the value of xmlNamespace.

    - #### getServiceNames

          public java.util.ArrayList getServiceNames()

      Return a list of service names.
      Returns:
        ArrayList a list of service names, of type String.

    - #### addService

          public boolean addService(WsdlService service)

      Add a new service to the model.
      Parameters:
        `service` - the service to add.
      Returns:
        true if a new service or false otherwise.

    - #### getService

          public WsdlService getService(java.lang.String serviceName)

      Get the service with the specified name.
      Parameters:
        `serviceName` - the service name.
      Returns:
        the service with the specified name or null if none exist.

    - #### getServices

          public java.util.HashMap getServices()

      Get all services.
      Returns:
        the value of services.

    - #### addMessage

          public boolean addMessage(WsdlMessage message)

      Add a new message to the model.
      Parameters:
        `message` - the message to add.
      Returns:
        true if a new message or false otherwise.

    - #### getMessage

          public WsdlMessage getMessage(java.lang.String messageName)

      Get the message with the specified name.
      Parameters:
        `messageName` - the message name.
      Returns:
        the message with the specified name or null if none exist.

    - #### getMessages

          public java.util.HashMap getMessages()

      Get all messages.
      Returns:
        the value of messages.

    - #### addInterface

          public boolean addInterface(WsdlInterface wsdlInterface)

      Add a new interface object to the model.
      Parameters:
        `wsdlInterface` - the interface to add. Could be a port or binding, for example.
      Returns:
        true if a new interface or false otherwise.

    - #### addBinding

          public boolean addBinding(WsdlBinding binding)

      Add a new binding to the model.
      Parameters:
        `binding` - the binding to add.
      Returns:
        true if a new binding or false otherwise.

    - #### getBinding

          public WsdlBinding getBinding(java.lang.String bindingName)

      Get the binding with the specified name.
      Parameters:
        `bindingName` - the binding name.
      Returns:
        the binding with the specified name or null if none exist.

    - #### getBindings

          public java.util.HashMap getBindings()

      Get all bindings.
      Returns:
        the value of bindings.

    - #### addPort

          public boolean addPort(WsdlPort port)

      Add a new port to the model.
      Parameters:
        `port` - the port to add.
      Returns:
        true if a new port or false otherwise.

    - #### getPort

          public WsdlPort getPort(java.lang.String portName)

      Get the port with the specified name.
      Parameters:
        `portName` - the port name.
      Returns:
        the port with the specified name or null if none exist.

    - #### getPorts

          public java.util.HashMap getPorts()

      Get all pports.
      Returns:
        the value of ports.

    - #### addOperation

          public boolean addOperation(WsdlOperation operation)

      Add a new operation to the model.
      Parameters:
        `operation` - the operation to add.
      Returns:
        true if a new operation or false otherwise.

    - #### getOperation

          public WsdlOperation getOperation(java.lang.String operationName)

      Get the operation with the specified name.
      Parameters:
        `operationName` - the operation name.
      Returns:
        the operation with the specified name or null if none exist.

    - #### getOperations

          public java.util.HashMap getOperations()

      Get all operations.
      Returns:
        the value of operations.

    - #### setTypes

          public void setTypes(WsdlTypes thisWsdlTypes)

      Set the parameter type descriptions.
      Parameters:
        `thisWsdlTypes` - the type descriptions.

    - #### getTypes

          public WsdlTypes getTypes()

      Get the parameter type descriptions.
      Returns:
        the value of wsdlTypes.

    - #### isInterface

          public static boolean isInterface(java.lang.String elementName)

      Return true if the tag indicates an interface element.
      Parameters:
        `elementName` - the element name.
      Returns:
        true if an interface element.

    - #### createPortTypeTag

          public static java.lang.String createPortTypeTag(java.lang.String portName)

      Convert the port name to a port type tag.
      Parameters:
        `portName` - the port name.
      Returns:
        the name converted to the appropriate tag value.

    - #### convertToBindingType

          public static java.lang.String convertToBindingType(java.lang.String bindingName)

      Convert the binding name to a binding type tag.
      Parameters:
        `bindingName` - the binding name.
      Returns:
        the name converted to the appropriate tag value.