FileDocCategorySizeDatePackage
BetterRPCJavaProvider.javaAPI DocExample1136Tue Jan 15 12:18:32 GMT 2002javasoap.book.ch10.services

BetterRPCJavaProvider

public class BetterRPCJavaProvider extends org.apache.soap.providers.RPCJavaProvider

Fields Summary
Constructors Summary
Methods Summary
public voidinvoke(SOAPContext reqContext, SOAPContext resContext)

      try {
         Response resp = BetterRPCRouter.invoke(envelope.getHeader(), dd, 
               call, targetObject, reqContext, resContext);
         Envelope env = resp.buildEnvelope();
         StringWriter sw = new StringWriter();
         env.marshall(sw, call.getSOAPMappingRegistry(), resContext);
         resContext.setRootPart(sw.toString(), 
                       Constants.HEADERVAL_CONTENT_TYPE_UTF8);
      }
      catch(Exception e) {
         if (e instanceof SOAPException) 
            throw (SOAPException )e;

         throw new SOAPException(Constants.FAULT_CODE_SERVER, e.toString());
      }