org.codehaus.xfire.client
Class XFireProxyFactory
java.lang.Object
org.codehaus.xfire.client.XFireProxyFactory
public class XFireProxyFactory
- extends Object
Factory for creating XFire SOAP client stubs. The returned stub will call the remote object for all methods.
Service serviceModel = new ObjectServiceFactory().create(Echo.class);
String url = "http://localhost:8080/services/Echo");
Echo echo = (Echo) factory.create(serviceModel, url);
After creation, the stub can be like a regular Java class. Because it makes remote calls, it can throw more
exceptions than a Java class. In particular, it may throw protocol exceptions, and XFireFaults
- Author:
- Arjen Poutsma
- See Also:
XFireFault
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XFireProxyFactory
public XFireProxyFactory()
XFireProxyFactory
public XFireProxyFactory(XFire xfire)
create
public Object create(Service service,
String url)
throws MalformedURLException
- Creates a new proxy with the specified URL. The returned object is a proxy with the interface specified by the
given service interface.
String url = "http://localhost:8080/services/Echo");
Echo echo = (Echo) factory.create(myService, url);
- Parameters:
service
- the service to create a client for.url
- the URL where the client object is located.
- Returns:
- a proxy to the object with the specified interface.
- Throws:
MalformedURLException
create
public Object create(Service service,
Transport transport,
String url)
throws MalformedURLException
- Creates a new proxy with the specified URL. The returned object is a proxy with the interface specified by the
given service interface.
String url = "http://localhost:8080/services/Echo");
Echo echo = (Echo) factory.create(transport, myService, url);
- Parameters:
transport
- The transport to use.url
- the URL where the client object is located.serviceInterface
- the service to create a client for.
- Returns:
- a proxy to the object with the specified interface.
- Throws:
MalformedURLException
create
public Object create(Client client)
create
public Object create(Endpoint endpoint)
throws MalformedURLException
- Throws:
MalformedURLException
create
public Object create(Binding binding,
String address)
throws MalformedURLException
- Throws:
MalformedURLException
Copyright © 2004-2013. All Rights Reserved.