I've tried to find an example of how to use the SecureClient to send a message to a SSL (https) server but have had no luck. It is probably my lack of understanding of SSL. But an example would greatly help. I'm kinda desprate at this point. I'm willing to pay somebody if you can help me get this working. Anybody need some extra money?
Here is my current code. I get the error "java.net.MalformedURLException: unknown protocol: https".
package org.apache.xmlrpc;
import java.util.*;
import java.io.*;
import org.apache.xmlrpc.*;
import org.apache.xmlrpc.secure.*;
import java.net.*;
public class Example2 {
public static final String userName = "username";
public static final String password = "password";
public static final String urlGetFileName = "https://anglebar.com/perl/getfilename";
public static final String serviceGetFileName = "Service.GetName";
public static void main(String[] args) {
sendCusFile("x");
}
private static void sendCusFile(String fileName) {
try {
SecureXmlRpcClient xmlrpc = new SecureXmlRpcClient(urlGetFileName);
// set Authentication
xmlrpc.setBasicAuthentication(userName, password);
URL urlS = xmlrpc.getURL();
Vector params = new Vector();
params.addElement(userName);
params.addElement(password);
params.addElement("A");
params.addElement("0100");
params.addElement("PR");
// this method returns a string
String result = (String) xmlrpc.execute(serviceGetFileName, params);
}
catch (IOException ioE) {
ioE.printStackTrace();
}
catch (XmlRpcException xmlRpcE) {
xmlRpcE.printStackTrace();
}
}
}
- Re: SSL & Secure Client Robert . Mattler
- Re: SSL & Secure Client James O. Flynn
- Re: SSL & Secure Client Ryan Hoegg
- Re: SSL & Secure Client Tim Heath
- RE: SSL & Secure Client Tom Wang
- Re: SSL & Secure Client Robert . Mattler
- Re: SSL & Secure Client Robert . Mattler
