Hello,
I am trying to figure out if CXF can be used to make a SOAP call (with
ws-secure)
*without* creating/compiling a Java class that mimics the WSDL description
In other words, I would like to pass to my generic class instance
a wsdl, a method name to call and an array of Objects that are to be serialized
as 'arguments' to the
SOAP call
(and user id and password).
The examples that I saw of DynamicClientFactory all require to have already
defined
An underlying class with methods names/etc
(and I do not want that - because I I do not know in advance what SOAP service
my clients will be calling)
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.endpoint.dynamic.DynamicClientFactory.
import java.util.Map;
/**
* Created by IntelliJ IDEA.
* User: stefoli
* Date: Mar 5, 2009
* Time: 5:25:44 PM
* To change this template use File | Settings | File Templates.
*/
public class SoapWsCall
{
public Object send(String wsdlURL,
String uid,
String password,
String methodName,
Object[] arguments)
{
DynamicClientFactory dcf = DynamicClientFactory.newInstance();
Client client = dcf.createClient(wsdlURL);
//NOT clear what to do next
// ......
Object res=new Object();
return res;
}
}
Thanks in advance,
vlad
---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.