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

## org.apache.muse.ws.resource.properties.impl
Class WsrpUtils

    java.lang.Object
      org.apache.muse.ws.resource.properties.impl.WsrpUtils

public class WsrpUtils
extends java.lang.Object

WsrpUtils is a set of convenience methods related to WS-RP v1.2.

Author:
  Dan Jemiolo (danj)

Constructor Summary
`WsrpUtils()`

Method Summary
`static org.w3c.dom.Element` | `convertToElement(java.lang.Object property, java.lang.Class type, QName qname)` Uses one of Muse's registered Serializers to convert the given object into an XML element.
`static org.w3c.dom.Element[]` | `convertToElements(java.lang.Object[] properties, java.lang.Class type, QName qname)` Uses Muse's registered Serializers to convert the given objects into XML elements.
`static java.lang.Object` | `convertToObject(org.w3c.dom.Element property, java.lang.Class type)` Uses one of Muse's registered Serializers to convert the given Element into an instance of the given type.
`static java.lang.Object` | `convertToObjects(org.w3c.dom.Element[] properties, java.lang.Class type)` Uses Muse's registered Serializers to convert the given Elements into instances of the given type.
`static QName` | `getPropertiesName(org.w3c.dom.Node wsdl, QName portType)` Searches a WSDL document for the schema element name of a resource's WS-RP document.

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

Constructor Detail

### WsrpUtils

    public WsrpUtils()

Method Detail

### convertToElement

    public static org.w3c.dom.Element convertToElement(java.lang.Object property,
                                                       java.lang.Class type,
                                                       QName qname)
                                                throws SoapFault

  Uses one of Muse's registered Serializers to convert the given object into an XML element.

  Parameters:
    `property` - The property value to serialize.
    `type` - The type whose registered Serializer will be used to parse the property value.
    `qname` - The QName of the XML element that will represent the property value.
  Returns:
    The POJO representation of the given property value.
  Throws:
    `SoapFault` -
    - If the value could not be serialized.

### convertToElements

    public static org.w3c.dom.Element[] convertToElements(java.lang.Object[] properties,
                                                          java.lang.Class type,
                                                          QName qname)
                                                   throws SoapFault

  Uses Muse's registered Serializers to convert the given objects into XML elements.

  Parameters:
    `properties` - The property values to serialize.
    `type` - The type whose registered Serializer will be used to parse the property values.
    `qname` - The QName of the XML elements that will represent the property values.
  Returns:
    An array with the POJO representation of the given property values. The array will be the same length as the one given. The order of the objects will be the same as the order of the values.
  Throws:
    `SoapFault` -
    - If any of the values could not be serialized.

### convertToObject

    public static java.lang.Object convertToObject(org.w3c.dom.Element property,
                                                   java.lang.Class type)
                                            throws SoapFault

  Uses one of Muse's registered Serializers to convert the given Element into an instance of the given type.

  Parameters:
    `property` - The property value to deserialize.
    `type` - The type whose registered Serializer will be used to parse the property value.
  Returns:
    The POJO representation of the given property value.
  Throws:
    `SoapFault` -
    - If the value could not be deserialized.

### convertToObjects

    public static java.lang.Object convertToObjects(org.w3c.dom.Element[] properties,
                                                    java.lang.Class type)
                                             throws SoapFault

  Uses Muse's registered Serializers to convert the given Elements into instances of the given type.

  Parameters:
    `properties` - The property values to deserialize.
    `type` - The type whose registered Serializer will be used to parse the property values.
  Returns:
    An array with the POJO representation of the given property values. The array will be the same length as the one given. The order of the objects will be the same as the order of the values.
  Throws:
    `SoapFault` -
    - If any of the values could not be deserialized.

### getPropertiesName

    public static QName getPropertiesName(org.w3c.dom.Node wsdl,
                                          QName portType)

  Searches a WSDL document for the schema element name of a resource's WS-RP document. The WS-RP document is defined in the WSDL's types section and is an aggregate properties defined in other schemas (all properties listed in the WS-RP definition use the ref attribute to refer to their complete type definitions).

  Parameters:
    `wsdl` - The WSDL document that contains the WS-RP definition.
    `portType` - The WSDL portType that has the name of the WS-RP definition.
  Returns:
    The QName of the WS-RP document element in . This element is a sequence of other XSD elements that use the ref attribute to define their types.
  See Also:
    `WsdlUtils.getElementDeclaration(Node, QName)`

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