package test; import java.net.MalformedURLException; import java.net.URL; import org.codehaus.xfire.client.Client; public class Test { public static void main(String[] args) { Client client = null; try { client = new Client(new URL("http://192.168.0.112:8080/Infservice/service/LoginInterface?wsdl")); String param = "{\"name\":\"rose\",\"password\":\"123\"}"; Object result[] = client.invoke("login", new Object[] { param }); System.out.println(result[0]); } catch(MalformedURLException e) { e.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } } }
