Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ode.utils.wsdl
Class WsdlUtils

    java.lang.Object
      org.apache.ode.utils.wsdl.WsdlUtils

    public class WsdlUtils

extends java.lang.Object

Constructor Summary
`WsdlUtils()`

Method Summary
`static javax.wsdl.extensions.ExtensibilityElement` | `getAddressExtension(javax.wsdl.Port port)` Extract the instance of javax.wsdl.extensions.http.HTTPAddress] or {@link javax.wsdl.extensions.soap.SOAPAddress} from the list of extensibility elements of the given {@link javax.wsdl.Port}.
`static javax.wsdl.extensions.ExtensibilityElement` | `getBindingExtension(javax.wsdl.Binding binding)` Look up the ExtensibilityElement defining the binding for the given Port or throw an `IllegalArgumentException` if multiple bindings found.
`static javax.wsdl.extensions.ExtensibilityElement` | `getBindingExtension(javax.wsdl.Port port)`
`static java.util.Collection<javax.wsdl.extensions.UnknownExtensibilityElement>` | `getHttpHeaders(java.util.List extensibilityElements)`
`static javax.wsdl.extensions.mime.MIMEContent` | `getMimeContent(java.util.List extensibilityElements)`
`static javax.wsdl.extensions.ExtensibilityElement` | `getOperationExtension(javax.wsdl.BindingOperation bindingOperation)` Extract the instance of javax.wsdl.extensions.http.HTTPOperation] or {@link javax.wsdl.extensions.soap.SOAPOperation} from the list of extensibility elements of the given {@link javax.wsdl.BindingOperation}.
`static java.lang.String` | `getOperationVerb(javax.wsdl.BindingOperation bindingOperation)` ODE extends the wsdl spec by allowing definition of the HTTP verb at the operation level.
`static javax.wsdl.Fault` | `inferFault(javax.wsdl.Operation operation, javax.xml.namespace.QName elName)` Return the `Fault` that has the given element as message part.
`static boolean` | `isOdeFault(javax.wsdl.BindingFault fault)`
`static java.lang.String` | `resolveVerb(javax.wsdl.Binding binding, javax.wsdl.BindingOperation bindingOperation)` ODE extends the wsdl spec by allowing definition of the HTTP verb at the operation level.
`static boolean` | `useHTTPBinding(javax.wsdl.Binding binding)` Test if the given binding uses HTTP binding.
`static boolean` | `useHTTPBinding(javax.wsdl.Definition def, javax.xml.namespace.QName serviceName, java.lang.String portName)`
`static boolean` | `useHTTPBinding(javax.wsdl.Port port)`
`static boolean` | `useMimeMultipartRelated(javax.wsdl.BindingInput bindingInput)`
`static boolean` | `useSOAPBinding(javax.wsdl.Binding binding)` Test if the given binding uses a Soap binding.
`static boolean` | `useSOAPBinding(javax.wsdl.Definition def, javax.xml.namespace.QName serviceName, java.lang.String portName)`
`static boolean` | `useSOAPBinding(javax.wsdl.Port port)`
`static boolean` | `useUrlEncoded(javax.wsdl.BindingInput bindingInput)`
`static boolean` | `useUrlReplacement(javax.wsdl.BindingInput bindingInput)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WsdlUtils

    public WsdlUtils()

Method Detail

### useSOAPBinding

    public static boolean useSOAPBinding(javax.wsdl.Binding binding)

  Test if the given binding uses a Soap binding.

  Parameters:
    `binding` -
  Returns:
    true if `SOAPBinding` is assignable from the binding
  See Also:
    `getBindingExtension(javax.wsdl.Binding)`

### useHTTPBinding

    public static boolean useHTTPBinding(javax.wsdl.Binding binding)

  Test if the given binding uses HTTP binding.

  Parameters:
    `binding` -
  Returns:
    true if `HTTPBinding` is assignable from the binding
  See Also:
    `getBindingExtension(javax.wsdl.Binding)`

### useSOAPBinding

    public static boolean useSOAPBinding(javax.wsdl.Port port)

  See Also:
    `useSOAPBinding(javax.wsdl.Binding)`

### useHTTPBinding

    public static boolean useHTTPBinding(javax.wsdl.Port port)

  See Also:
    `useHTTPBinding(javax.wsdl.Binding)`

### useSOAPBinding

    public static boolean useSOAPBinding(javax.wsdl.Definition def,
                                         javax.xml.namespace.QName serviceName,
                                         java.lang.String portName)

  See Also:
    `useSOAPBinding(javax.wsdl.Binding)`

### useHTTPBinding

    public static boolean useHTTPBinding(javax.wsdl.Definition def,
                                         javax.xml.namespace.QName serviceName,
                                         java.lang.String portName)

  See Also:
    `useHTTPBinding(javax.wsdl.Binding)`

### getBindingExtension

    public static javax.wsdl.extensions.ExtensibilityElement getBindingExtension(javax.wsdl.Binding binding)

  Look up the ExtensibilityElement defining the binding for the given Port or throw an `IllegalArgumentException` if multiple bindings found.

  Parameters:
    `binding` -
  Returns:
    an instance of `SOAPBinding` or `HTTPBinding` or null
  Throws:
    `java.lang.IllegalArgumentException` - if multiple bindings found.

### getBindingExtension

    public static javax.wsdl.extensions.ExtensibilityElement getBindingExtension(javax.wsdl.Port port)

  See Also:
    `getBindingExtension(javax.wsdl.Binding)`

### getOperationExtension

    public static javax.wsdl.extensions.ExtensibilityElement getOperationExtension(javax.wsdl.BindingOperation bindingOperation)

  Extract the instance of javax.wsdl.extensions.http.HTTPOperation] or {@link javax.wsdl.extensions.soap.SOAPOperation} from the list of extensibility elements of the given {@link javax.wsdl.BindingOperation}.

  Parameters:
    `bindingOperation` -
  Returns:
    an instance of `HTTPOperation` or `SOAPOperation`
  Throws:
    `java.lang.IllegalArgumentException` - if not exactly 1 element is found.

### useUrlEncoded

    public static boolean useUrlEncoded(javax.wsdl.BindingInput bindingInput)

  Returns:
    true if the extensibility elements of the given `BindingInput` contains an instance of `HTTPUrlEncoded`

### useUrlReplacement

    public static boolean useUrlReplacement(javax.wsdl.BindingInput bindingInput)

  Returns:
    true if the extensibility elements of the given `BindingInput` contains an instance of `HTTPUrlReplacement`

### useMimeMultipartRelated

    public static boolean useMimeMultipartRelated(javax.wsdl.BindingInput bindingInput)

  Returns:
    true if the extensibility elements of the given `BindingInput` contains an instance of `MIMEMultipartRelated`

### getMimeContent

    public static javax.wsdl.extensions.mime.MIMEContent getMimeContent(java.util.List extensibilityElements)

  Returns:
    the type of the instance of `MIMEContent` contained in the extensibility element list. Or null if none.
  Throws:
    `java.lang.IllegalArgumentException` - if more than 1 MIMEContent is found.

### getAddressExtension

    public static javax.wsdl.extensions.ExtensibilityElement getAddressExtension(javax.wsdl.Port port)

  Extract the instance of javax.wsdl.extensions.http.HTTPAddress] or {@link javax.wsdl.extensions.soap.SOAPAddress} from the list of extensibility elements of the given {@link javax.wsdl.Port}.

  Parameters:
    `port` -
  Returns:
    an instance of `HTTPAddress` or `SOAPAddress`
  Throws:
    `java.lang.IllegalArgumentException` - if not exactly 1 element is found.

### getOperationVerb

    public static java.lang.String getOperationVerb(javax.wsdl.BindingOperation bindingOperation)

  ODE extends the wsdl spec by allowing definition of the HTTP verb at the operation level.
  If you do so, an `UnknownExtensibilityElement` will be added to the list of extensibility elements of the `BindingOperation`.
  This method looks up for such an element and return the value of the verb attribute if the underlying `Element` is <binding xmlns="http://schemas.xmlsoap.org/wsdl/http/"/> or null.

  Parameters:
    `bindingOperation` -

### isOdeFault

    public static boolean isOdeFault(javax.wsdl.BindingFault fault)

  Parameters:
    `fault` -
  Returns:
    true if the given fault is bound with the `org.apache.ode.utils.Namespaces.ODE_HTTP_EXTENSION_NS`:fault element.

### getHttpHeaders

    public static java.util.Collection<javax.wsdl.extensions.UnknownExtensibilityElement> getHttpHeaders(java.util.List extensibilityElements)

### inferFault

    public static javax.wsdl.Fault inferFault(javax.wsdl.Operation operation,
                                              javax.xml.namespace.QName elName)

  Return the `Fault` that has the given element as message part.

  Parameters:
    `operation` - the operation
    `elName` - the qname to look for
  Returns:
    the first fault for which the element of message part matches the given qname

### resolveVerb

    public static java.lang.String resolveVerb(javax.wsdl.Binding binding,
                                               javax.wsdl.BindingOperation bindingOperation)

  ODE extends the wsdl spec by allowing definition of the HTTP verb at the operation level.
  The current implementation implementations allows you to have a <binding xmlns="http://schemas.xmlsoap.org/wsdl/http/"/> element at the port level and at the operation level. In such a case the operation's verb overrides the port's verb.
  This method applies the later rule.
  If defined the operation's verb is returned, else the port's verb.

  Parameters:
    `binding` -
    `bindingOperation` -
  Returns:
    If defined the operation's verb is returned, else the port's verb.
  See Also:
    `getOperationVerb(javax.wsdl.BindingOperation)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD