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

java.lang.Object
  extended byorg.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[] 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 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

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.

convertToObjects

public static java.lang.Object convertToObjects(org.w3c.dom.Element[] properties,
                                                java.lang.Class type)
                                         throws BaseFault
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:
BaseFault -
  • 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.getTypeDeclaration(Node, QName)