I am sure I am misunderstanding something here, but if I setup a
client with spring, all seems to be well. If I setup a client with
ClientProxyFactoryBean, I think I am missing some settings, but
cannot tell what.

ClassPathXmlApplicationContext context = new
ClassPathXmlApplicationContext(new String[]
{"com/quaris/soap/sample/client-beans.xml"});
Metadata client = (Metadata)context.getBean("Metadata");
NGramList list = client.getNGrams();

all is fine... However, now I cannot figure out how to change the
settings in client-beans.xml programatically, like the address of
the service, or username/password. So I try ClientProxyFactoryBean
as in the examples and I get this error:


ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(Metadata.class);                        
factory.setAddress("http://localhost:8080/qproxy/Metadata";);
Metadata client = (Metadata) factory.create();
NGramList list = client.getNGrams();

INFO: Creating Service {http://metadata.soap.quaris.com/}Metadata
from class com.quaris.soap.metadata.Metadata
Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
Parameter {http://metadata.soap.quaris.com/}arg00 does not exist!
        at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:69)
        at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:36)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
        at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:86)
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:178)
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1830)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
        at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
        at $Proxy19.getNGrams(Unknown Source)
        at com.quaris.soap.sample.Client2.main(Client2.java:16)

Reply via email to