Package soaprmi.soaprpc

Examples of soaprmi.soaprpc.MethodInvoker


                            + types[i]);
                }
                params[i] = value;
            }

            MethodInvoker mi = null; //newCall(m);
            // prepare this method invoker
            //      try {
            mi =
                MethodInvoker.makeMethodInvoker(
                    getInputNamespace(),
                    returnType,
                    getName(),
                    types,
                    names,
                    getSoapActionURI(),
                    soaprmiMapping);
            //      } catch(soaprmi.RemoteException ex) {
            //      throw new WSIFException(
            //        "Could not prepare method invoker for operation "+getName(), ex);
            //      }

            Map requestHeaders = new HashMap();

            requestHeaders.put("SOAPAction", getSoapActionURI());

            StringWriter sw = new StringWriter();
            Writer writer = new BufferedWriter(sw);

            String locationUri = portInstance.getLocation();

            if (Trc.ON)
                Trc.event(
                    this,
                    "invoking SoapRMI operation "
                        + getName()
                        + " on "
                        + locationUri);

            mi.sendRequest(params, writer);

            String requestContent = sw.toString();

            String httpProxyHost = null;
            int httpProxyPort = -1;

            URL url = new URL(locationUri);

            Reader reader =
                HTTPUtils.post(url, requestContent, requestHeaders, "text/xml; charset=utf-8",
                //NOTE putting "" around utf-8 is crashing Tomcat 3.2.1
        60 * 1000, //timeout,
    httpProxyHost, httpProxyPort);

            Object result = mi.receiveResponse(reader);

            if (returnType != null) {
                if (result != null
                    && !returnType.isPrimitive()
                    && !(returnType.isAssignableFrom(result.getClass()))) {
View Full Code Here

TOP

Related Classes of soaprmi.soaprpc.MethodInvoker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.