Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.webservice
Class RPCWebServiceRenderer

java.lang.Object
  extended by oracle.portal.provider.v2.render.ManagedRenderer
      extended by oracle.portal.provider.v2.render.http.BaseManagedRenderer
          extended by oracle.portal.provider.v2.webservice.WebServiceRenderer
              extended by oracle.portal.provider.v2.webservice.RPCWebServiceRenderer
All Implemented Interfaces:
Validateable, InitializableXMLObject
Direct Known Subclasses:
HTMLStringWebServiceRenderer, XMLStringWebServiceRenderer

public class RPCWebServiceRenderer
extends WebServiceRenderer

RPCWebServiceRenderer is a specialized WebServiceRenderer for invoking 'RPC style' web services. An RPC style web service communicates using a specialized syntax to encode remote procedure calls and can be identified from a <soap:binding style="rpc"> declaration in a WSDL (Web Services Description Language) interface description. The request to the web service enodes an argument list to a method to be called on the remote service, while its response encodes the method's return value or an exception if an error occurs.

RPCWebServiceRenderer builds on the automated support for RPC style web services built in to Oracle JDeveloper version 9.0.2 and later. It assumes that you have used JDeveloper to analyze the web service's WSDL document and automatically generate a 'stub' or 'proxy' class for the web service which translates from Java method calls into remote procedure calls on the web service. Consult the JDeveloper section of otn.oracle.com to find out how to download JDeveloper, and consult the JDeveloper online help for details of how to generate Web Service Stubs.

Note that as well as using the param property to define simple parameters to a web service method, the literal property may be used to defined parameter bindings to a method which accepts one or more org.w3c.dom.Element objects.


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.portal.provider.v2.webservice.WebServiceRenderer
WebServiceRenderer.ConstParam, WebServiceRenderer.DefaultableParameterBinding, WebServiceRenderer.EditData, WebServiceRenderer.ParameterBinding, WebServiceRenderer.PromptedBinding, WebServiceRenderer.RequestParam, WebServiceRenderer.SessionAttrib, WebServiceRenderer.URLParam
 
Constructor Summary
RPCWebServiceRenderer()
           
 
Method Summary
 void addParam(java.lang.Object param)
          Defines a parameter to be passed to the render method.
 void addParam(java.lang.String param)
          Defines a constant parameter to be passed to the render method.
 void invokeService(WebServiceRenderRequest wrr, org.w3c.dom.Element docEl)
          Determines the values of parameter bindings using the given WebServiceRenderRequest, invokes the method on the web service stub, and adds an XML representation of its return value to the response XML document.
 void postInitialize()
          Performs the extra steps required to initialize and validate an RPCWebServiceRenderer once its properties have been set with the appropriate accessor methods.
 void setClassName(java.lang.String className)
          Sets the fully-qualified class name of the web service Java stub.
 void setRenderMethod(java.lang.String methodName)
          Sets the name of the method to be called on an instance of the web service stub to render a request.
 
Methods inherited from class oracle.portal.provider.v2.webservice.WebServiceRenderer
addLiteral, getBindings, getEscapeOutput, getLiteral, getLogging, getLoggingDirectory, renderBody, renderEdit, renderEditDefaults, renderLink, renderShow, setEscapeOutput, setLogging, setLoggingDirectory, setResponseXSL, validate
 
Methods inherited from class oracle.portal.provider.v2.render.http.BaseManagedRenderer
addParameter, getContentType, getGeneratesESI, preInitialize, prepareResponse, setContentType, setGeneratesESI, setGeneratesESI, setPageExpires, setPageExpires, setUseInvalidationCaching, setUseInvalidationCaching
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPCWebServiceRenderer

public RPCWebServiceRenderer()
Method Detail

postInitialize

public void postInitialize()
                    throws NodeHandlerException
Performs the extra steps required to initialize and validate an RPCWebServiceRenderer once its properties have been set with the appropriate accessor methods.

Specified by:
postInitialize in interface InitializableXMLObject
Overrides:
postInitialize in class WebServiceRenderer
Throws:
NodeHandlerException - if not all properties have been set correctly

setClassName

public void setClassName(java.lang.String className)
Sets the fully-qualified class name of the web service Java stub.

Parameters:
className - fully-qualified class name.

setRenderMethod

public void setRenderMethod(java.lang.String methodName)
Sets the name of the method to be called on an instance of the web service stub to render a request.

Parameters:
methodName - a method name.

addParam

public void addParam(java.lang.Object param)
              throws PortletException
Defines a parameter to be passed to the render method. The parameter value will be converted to the appropriate type, according to the argument list of the method.

Parameters:
param - object representing a parameter to be passed to the render method. Should be a subclass of WebServiceRenderer.ParameterBinding.
Throws:
PortletException - if the given object is not a valid WebServiceRenderer.ParameterBinding

addParam

public void addParam(java.lang.String param)
Defines a constant parameter to be passed to the render method. The parameter value will be converted to the appropriate type, according to the argument list of the method. This is provided as a shorthand for calling addParam(Object) with an instance of WebServiceRenderer.ConstParam.

Parameters:
param - constant value to be passed as an argument to the render method.

invokeService

public void invokeService(WebServiceRenderRequest wrr,
                          org.w3c.dom.Element docEl)
                   throws PortletException
Determines the values of parameter bindings using the given WebServiceRenderRequest, invokes the method on the web service stub, and adds an XML representation of its return value to the response XML document.

Specified by:
invokeService in class WebServiceRenderer
Parameters:
wrr - an object exposing the relevant properties of the current render request
docEl - the document element of the XML document to which an XML representation of the response should be added
Throws:
PortletException - if an error occurs.

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.