Thanks Dan -

I have another problem with List<String> as a parameter I get a type mismatch, I'm still using JAXB binding. StringArray is the wrapper created for List<String> by wsdl2java. We debug CXF code and we found that the actual parameter for the invocation is just a the string "hola" instead of the List<String>, I'm doing anything wrong??

---------Client code-----------------

StringArray keywords = new StringArray();
keywords.getItem().add("hola");
com.rbxglobal.reactor.ws.model.DocumentArray _getDocumentsByKeywords_documents = port.getDocumentsByKeywords (keywords);


----------Exception-------------------
Jul 25, 2007 9:28:30 AM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: argument type mismatch
at org.apache.cxf.service.invoker.AbstractInvoker.invoke (AbstractInvoker.java:88) at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke (JAXWSMethodInvoker.java:82) at org.apache.cxf.service.invoker.AbstractInvoker.invoke (AbstractInvoker.java:56) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run (ServiceInvokerInterceptor.java:56) at org.apache.cxf.workqueue.SynchronousExecutor.execute (SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage (ServiceInvokerInterceptor.java:87) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept (PhaseInterceptorChain.java:206) at org.apache.cxf.transport.ChainInitiationObserver.onMessage (ChainInitiationObserver.java:67) at org.apache.cxf.transport.servlet.ServletDestination.doMessage (ServletDestination.java:100) at org.apache.cxf.transport.servlet.ServletController.invokeDestination (ServletController.java:224) at org.apache.cxf.transport.servlet.ServletController.invoke (ServletController.java:137) at org.apache.cxf.transport.servlet.CXFServlet.invoke (CXFServlet.java:261) at org.apache.cxf.transport.servlet.CXFServlet.doPost (CXFServlet.java:239)



On Jul 25, 2007, at 8:21 AM, Dan Diephouse wrote:

Much to all of our general disdain here, I believe this is a limitation of
JAXB. You in essence have two options:
1. Define a wrapper type. For instance, if you were going to return a
collection of customers you would create a Customers class with a List of
customers on it
2. Use Aegis - http://cwiki.apache.org/CXF20DOC/aegis- databinding.html - if
you go this route, you may want to use the snapshot builds we've been
producing as they have several fixes in it. We'll be releasing 2.0.1 soon
with the relevant fixes.

Hopefully they'll remedy this in a future spec revision for JAXB, but I'm
sure thats a little bit off yet.

- Dan

On 7/24/07, Julio Arias <[EMAIL PROTECTED]> wrote:

Hi -

I have a method that returns or has a param of List<String> when I
generate the WSDL and then the client from that WSDL I get a strange
namespace for that type and therefore strange pakage name when the
client is generated, is there a why to customize this to be in the
appropriate namespace we tried the @WebResult and @WebParam
annotations to specified the target namespace but it didn't work.

Then namespace is: http://jaxb.dev.java.net/array


Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: [EMAIL PROTECTED] | www.rbxglobal.com
---------------------------------------------------------------------




--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog




Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: [EMAIL PROTECTED] | www.rbxglobal.com
---------------------------------------------------------------------

Reply via email to