<%@page import="java.io.*,java.net.*,java.util.*,java.text.*"%>
<%@page import="javax.mail.internet.*"%>
<%@page import="com.psol.resourceful.*"%>
<%@page import="org.apache.soap.transport.*"%>
<%@page import="org.apache.soap.messaging.*"%>
<%@page import="javax.xml.parsers.*,org.w3c.dom.*"%>
<%@page import="org.apache.soap.*,org.apache.soap.encoding.*"%>
<%@page import="org.apache.soap.rpc.*,org.apache.soap.util.xml.*"%>
<%@page import="org.apache.soap.encoding.soapenc.*"%>
<%!
private Response rpcCall(URL rpcRouter,
                         String methodName,
                         Vector params)
   throws SOAPException
{
   BeanSerializer serializer = new BeanSerializer();
   SOAPMappingRegistry registry = new SOAPMappingRegistry();
   registry.mapTypes(Constants.NS_URI_SOAP_ENC,
                     new QName(
                        "http://www.psol.com/2001/resourceful",
                        "Resource"),
                     Resource.class,serializer,serializer);
   Call call = new Call();
   call.setSOAPMappingRegistry(registry);
   call.setTargetObjectURI("http://www.psol.com/2001/resourceful");
   call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
   call.setMethodName(methodName);
   if(params != null)
      call.setParams(params);
   return call.invoke(rpcRouter,
                      "http://www.psol.com/2001/soapaction");
}
%>
