org.codehaus.xfire.client
Class XFireProxyFactory
java.lang.Object
org.codehaus.xfire.client.XFireProxyFactory
public class XFireProxyFactory
- extends java.lang.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
Method Summary |
java.lang.Object |
create(Binding binding,
java.lang.String address)
|
java.lang.Object |
create(Client client)
|
java.lang.Object |
create(Endpoint endpoint)
|
java.lang.Object |
create(Service service,
java.lang.String url)
Creates a new proxy with the specified URL. |
java.lang.Object |
create(Service service,
Transport transport,
java.lang.String url)
Creates a new proxy with the specified URL. |
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 java.lang.Object create(Service service,
java.lang.String url)
throws java.net.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:
java.net.MalformedURLException
create
public java.lang.Object create(Service service,
Transport transport,
java.lang.String url)
throws java.net.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:
java.net.MalformedURLException
create
public java.lang.Object create(Client client)
create
public java.lang.Object create(Endpoint endpoint)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
create
public java.lang.Object create(Binding binding,
java.lang.String address)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
Copyright © 2004-2008. All Rights Reserved.