Advanced Customization > Info*Engine User’s Guide > Task Webject Reference > Message Webjects > Call-RemoteProcedure
  
Call-RemoteProcedure
Makes a remote procedure call (RPC) to a third-party Simple Object Access Protocol (SOAP) service. Results from an RPC invocation are returned to the Info*Engine task or JSP author in the form of a group. The group mimics the XML structure of the SOAP response. In simple cases, where an RPC invocation results in a single value or array of simple values, a basic Info*Engine group containing one attribute per element is returned. It is possible for an RPC service to return a complex data structure in response. In this case a group, possibly containing multiple elements with multiple attributes, is returned. If the return XML is deeply nested, then the resulting Info*Engine group is also deeply nested, containing attributes whose values are elements. Dealing with such responses might require the use of scriptlet code within the handling task or JSP.
SYNTAX
<ie:webject name="Call-RemoteProcedure" type="MSG">
<ie:param name="WSDL" data="url"/>
<ie:param name="OPERATION" data="operationName"/>
<ie:param name="GROUP_OUT" data="groupName"/>
<ie:param name="GROUP_IN" data="groupName"/>
<ie:param name="SERVICE" data="soapServiceName"/>
<ie:param name="PORT" data="soapPortName"/>
<ie:param name="PARAM" data="name=data"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="PASSWORD" data="password"/>
<ie:param name="AUTHORIZATION" data="Base64"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
OPERATION
AUTHORIZATION
WSDL
DBUSER
GROUP_IN
GROUP_OUT
PARAM
PASSWD
PORT
SERVICE
AUTHORIZATION
A base64-encoded username and password passed from a web browser to a web server through the Authorization HTTP header. This parameter is used if the SOAP endpoint is http or https. If supplied, the credentials are used in establishing a connection to the SOAP endpoint. If DBUSER and PASSWORD are specified, they are used instead of the AUTHORIZATION value. This parameter is optional.
DBUSER
The user name entered when making a connection to the SOAP endpoint, if the endpoint’s supporting protocol is http or https. If DBUSER is specified then PASSWORD must also be specified or it is ignored. This is an optional parameter.
GROUP_IN
An Info*Engine group that represents the SOAP request to be sent. All attributes found in the input group are added as XML elements. Attribute values are added as values of those XML elements. XML elements can be nested by setting attribute values to elements. This parameter can be used to generate arbitrarily complex SOAP requests. All elements generated from the input group are added to the standard RPC top-level element whose name is the operation name. This is an optional parameter. If specified, no validation of input is performed by the webject.
GROUP_OUT
The name of the Info*Engine group that the RPC invocation results should be stored in. Data found in the output group is strongly typed, based on type information found in the SOAP response. This is an optional parameter. The default value is rpcOutput.
OPERATION
The name of the operation to be executed. This is a required parameter. The operation name must be exposed by the WSDL document referenced by the WSDL parameter.
PARAM
A parameter name and value that should be sent with the RPC. The value must be in the form of name=data. Call-RemoteProcedure verifies the supplied parameters against the supplied WSDL to make sure that all required parameters are present, that the specified parameters are known to the service, that maximum and minimum occurrences of parameters are adhered to, and that parameter values are typed appropriately. It is possible that an operation requires no input parameters, and so this parameter is optional. If a web service requires specific parameters for the operation in question, then this parameter is required. If not specified, an exception is issued.
PASSWORD
Password to use when making a connection to the SOAP endpoint if the endpoint’s supporting protocol is http or https. If PASSWORD is specified then DBUSER must also be specified or it is ignored. This is an optional parameter.
PORT
The name of the SOAP port that should be used. A SOAP service might be tied to multiple ports in a WSDL document. If the selected SERVICE is tied to more than one port then this parameter is required. If the selected SERVICE is only tied to a single port then that port is used.
SERVICE
The name of the SOAP service that should be used. A WSDL document might expose multiple SOAP services. If the WSDL document referenced by the WSDL parameter exposes multiple services, then this parameter is required. If the WSDL document referenced by the WSDL parameter exposes only a single service, then that service is used.
WSDL
References a Web Services Definition Language (WSDL) document. The value must be a URL whose contents can be read by Call-RemoteProcedure. A WSDL document describes a web service; what service names it supports, what operations each service supports, what parameters each operation requires or supports, how the SOAP request should be generated (parameter order, name spaces to use). This is a required parameter. If a specific SOAP service does not have a WSDL document that describes it, then one must be made. If the URL specified is http or https and requires authorization, it can be specified as follows:
http://<user>:<password>@host/path/to/wsdl/.
EXAMPLE
<%@page language="java"
%><%@ taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"
%><html>
<head><title>Weather by Zip</title></head>
<body>

<%
String zip = request.getParameter ( "zipCode" );
if ( zip != null ) {
%><ie:webject name="Call-RemoteProcedure" type="MSG">     
<ie:param name="WSDL"
data="http://www.vbws.com/services/weatherretriever.asmx?WSDL"/>     
<ie:param name="OPERATION" data="GetWeather"/>
    <ie:param name="PORT" data="WeatherRetrieverSoap"/>
    <ie:param name="PARAM" data="zipCode=$(@FORM[]zipCode[])"/>
  </ie:webject><%
} %>

<form method="GET">
Zip:&nbsp;<input type=text size=10 name=zipCode value="<%=
(zip==null?"":zip)%>">&nbsp;
<input type=submit value="Get Weather" name=temp>
</form>
<%
if ( zip != null ) {
%><br><br>
<table>
<tr><td colspan=2 align=middle><img src="<ie:getValue name=
"IconUrl"/>"></td></tr>
<tr><td align=right><strong>Last Updated:<strong><td><td><ie:getValue
name="LastUpdated"/></td><tr>
<tr><td align=right><strong>Conditions:
</strong></td><td><ie:getValue name="Conditions"/></td></tr>
<tr><td align=right><strong>CurrentTemp:
<strong><td><td><ie:getValue name="CurrentTemp"/></td></tr>
<tr><td align=right><strong>Humidity:
</strong><td><td><ie:getValue name="Humidity"/></td></tr>
<tr><td align=right><strong>Barometer:</strong><td><td><ie:getValue
name="Barometer"/></td></tr>
<tr><td align=right><strong>Barometer Direction:
<strong><td><td><ie:getValue
name="BarometerDirection"/></td></tr>
</table><%}%></body></html>