You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Glam <gl...@abv.bg> on 2009/10/17 17:36:40 UTC

CXF fails to invoke WebService

The WebService is generated from a WSDL via wsdl2java, then deployed. Then a
client is also generated by wsdl2java, and invoked. The exception on the
server is:

org.apache.cxf.interceptor.Fault: java.lang.ClassCastException@e9f1cb while
invoking public void (msg details).
	at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:152)
	at
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83)
	at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:126)
	at
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55)
and so on..


In the message details I trimmed above follow the method signature (which is
OK), and the arguments with which it is invoked. One of the arguments there
(2nd or 3rd) fails to be resolved, and is instead moved as LAST argument,
with null value, thus breaking the correct sequence of argument types.

I thought it had something to do with XmlGregorianCalendar, and replaced it
with Calendar - same error. I then replaced the Calendar with plain String
(and xsd:dateTime with xsd:string) - fails again.

The value that fails to be parsed/read/.. is just an ordinary String.

I intercepted the raw SOAP message (with a proxy), and it is completely fine
there.

CXF 2.2.4 (latest version). 
-- 
View this message in context: http://www.nabble.com/CXF-fails-to-invoke-WebService-tp25939325p25939325.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: CXF fails to invoke WebService

Posted by Glam <gl...@abv.bg>.
I created an issue on the matter. Posting a link here for those who would
stumble upon in: https://issues.apache.org/jira/browse/CXF-2478


Glam wrote:
> 
> The WebService is generated from a WSDL via wsdl2java, then deployed. Then
> a client is also generated by wsdl2java, and invoked. The exception on the
> server is:
> 
> org.apache.cxf.interceptor.Fault: java.lang.ClassCastException@e9f1cb
> while invoking public void (msg details).
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:152)
> 	at
> org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83)
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:126)
> 	at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55)
> and so on..
> 
> 
> In the message details I trimmed above follow the method signature (which
> is OK), and the arguments with which it is invoked. One of the arguments
> there (2nd or 3rd) fails to be resolved, and is instead moved as LAST
> argument, with null value, thus breaking the correct sequence of argument
> types.
> 
> I thought it had something to do with XmlGregorianCalendar, and replaced
> it with Calendar - same error. I then replaced the Calendar with plain
> String (and xsd:dateTime with xsd:string) - fails again.
> 
> The value that fails to be parsed/read/.. is just an ordinary String.
> 
> I intercepted the raw SOAP message (with a proxy), and it is completely
> fine there.
> 
> CXF 2.2.4 (latest version). 
> 

-- 
View this message in context: http://www.nabble.com/CXF-fails-to-invoke-WebService-tp25939325p25946901.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: CXF fails to invoke WebService

Posted by Daniel Kulp <dk...@apache.org>.
Fix committed to trunk/2.2.x/2.1.x

Thanks for the test case.  Always a big help.

Dan


On Sat October 17 2009 11:36:40 am Glam wrote:
> The WebService is generated from a WSDL via wsdl2java, then deployed. Then
>  a client is also generated by wsdl2java, and invoked. The exception on the
>  server is:
> 
> org.apache.cxf.interceptor.Fault: java.lang.ClassCastException@e9f1cb while
> invoking public void (msg details).
> 	at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
> java:152) at
> org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMe
> thodInvoker.java:83) at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:
> 126) at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55)
> and so on..
> 
> 
> In the message details I trimmed above follow the method signature (which
>  is OK), and the arguments with which it is invoked. One of the arguments
>  there (2nd or 3rd) fails to be resolved, and is instead moved as LAST
>  argument, with null value, thus breaking the correct sequence of argument
>  types.
> 
> I thought it had something to do with XmlGregorianCalendar, and replaced it
> with Calendar - same error. I then replaced the Calendar with plain String
> (and xsd:dateTime with xsd:string) - fails again.
> 
> The value that fails to be parsed/read/.. is just an ordinary String.
> 
> I intercepted the raw SOAP message (with a proxy), and it is completely
>  fine there.
> 
> CXF 2.2.4 (latest version).
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog