package xfire;import org.codehaus.xfire.XFire;import org.codehaus.xfire.client.XFireProxyFactory;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.binding.ObjectServiceFactory;public class XFireTest {public static void main(String[] args) {try {String url = "Hello" ;Service service = new ObjectServiceFactory().create(IAnyName.class) ;//XFire fire=XFireFactory.newInstance().getXFire();//XFireProxyFactory factory=new XFireProxyFactory(fire);XFireProxyFactory factory = new XFireProxyFactory() ;IAnyName hello = (IAnyName) factory.create(service,url) ;String str = hello.hello("rcfeng","Parameter two") ;System.out.println(str);} catch (Exception e) {e.printStackTrace();}}}以上是XFire客户端访问WebService的实例