cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acze <a...@ncdc.pl>
Subject Dynamic typing
Date Fri, 04 Jul 2008 09:30:40 GMT
Hi!
 
We are writing an abstract webservice connection to our system, and we
have some problems with Types.

Is it possible to use a kind of "dynamic typing" when calling:

org.apache.cxf.endpoint.Client#invoke()
method? I mean something like:

client.invoke("hello", "2", "bleble");

where all the parameters are in fact strings. These strings are always 
in form which can be converted to parameter value of specific type as 
defined in wsdl.

This kind of call causes:
> org.apache.cxf.binding.soap.SoapFault: argument type mismatch while
> invoking public java.lang.String
> pl.ncdc.pcm.module.http.TestWebService.hello(int,java.lang.String)
with
> params [2, bleble].
>       at
>
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
>       at
>
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
>       at
>
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>       at
>
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
>       at
>
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:65)
>       at
>
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
>       at
>
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>       at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
>       at org.apache.cxf.transport.http.HTTPConduit
> $WrappedOutputStream.handleResponse(HTTPConduit.java:1988)
>       at org.apache.cxf.transport.http.HTTPConduit
> $WrappedOutputStream.close(HTTPConduit.java:1824)
>       at
>
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>       at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
>       at org.apache.cxf.interceptor.MessageSenderInterceptor
>
$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>       at
>
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>       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)
>       at
>
pl.ncdc.pcm.module.http.WebServiceInvokerNG.execute(WebServiceInvokerNG.java:102)


Is it possible to somehow relax the type checks?

If not, maybe there is a way of defining a kind of "default type
binding"?

-- 
Adam Czerwiński
acze@ncdc.pl
Nordic Consulting &
Development Company


Mime
View raw message