I am trying to add client interceptors programmatically and need some help to
user the Client interface.
here is the snippet of code:

// WITHOUT DYNAMIC CLIENT
ConfigurationService service = new ConfigurationService(); //SERVICE            
        
ManagedElementMgr mgr = service.getManagedElementMgrHttp(); // PORT
Holder<HeaderT> holder = new Holder<HeaderT>(); //PARAM 1
GetAllManagedElementsResponseT response =
    mgr.getAllManagedElements(holder, new GetAllManagedElementsT()); // WS
CALL

//WITH DYNAMIC CLIENT           
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ManagedElementMgr.class);
factory.setAddress("http://localhost:8080/mtosi/v1/ManagedElementMgr?wsdl";);    
        
Client client = ClientProxy.getClient(factory.create());                
IteratorClientInterceptor inter = new IteratorClientInterceptor(); // ADD MY
ITERCEPTOR
client.what?????

I don't know how to invoke the client.
I havev tried:
client.invoke("getAllManagedElements",holder,new GetAllManagedElements());

but I get an exception:

org.apache.cxf.binding.soap.SoapFault: "http://schemas.xmlsoap.org/wsdl/"; is
not a valid SOAP version.
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:90)
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1948)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:180)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:200)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:186)


WHATAM I MISSING??
-- 
View this message in context: 
http://www.nabble.com/org.apache.cxf.endpoint.Client-usage-tp14292643p14292643.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to