users@jax-rpc.java.net

Proxy servers and the Call object...

From: Fegenbush Scott <FegenbushScottC_at_JohnDeere.com>
Date: Mon, 10 Nov 2003 15:39:42 -0600

Does anyone have any suggestions on ways I can use the following code to get outside my corporate proxy server with a userid and password? I can't seem to find and object or method in which I can set the credentials. Thank you!

                Call call = new Call();
                call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
                call.setMethodName("getPrice");
                call.setTargetObjectURI("urn:xmethods-BNPriceCheck");
                call.setSOAPMappingRegistry(new SOAPMappingRegistry());
                
                Vector params = new Vector();
                params.addElement(new Parameter("isbn", String.class, "0760745307", null));
                call.setParams(params);

                URL url;
                Parameter resultParam = null;
                try {
                        url = new URL("http://services.xmethods.net:80/soap/servlet/rpcrouter");
                        Response response = call.invoke(url, "");
                        if(response.generatedFault()) {
                                Fault fault = response.getFault();
                                System.out.println(" Fault code: "+fault.getFaultCode());
                                System.out.println(" Fault string: "+fault.getFaultString());
                        } else {
                                resultParam = response.getReturnValue();
                                System.out.println(" RPC result value: "+resultParam.getValue());
                        }
                } catch (MalformedURLException e) {
                        e.printStackTrace();
                }
                
                catch (SOAPException e) {
                        e.printStackTrace();
                }





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net