You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by James Talbut <jt...@tardis.spudsoft> on 2011/07/06 11:27:32 UTC

Confusion between multiple services using the same namespace and action names for different services

Hi,

I'm using camel-cxf, but I think this issue is on the CXF side (though I'm not at all sure whether it's CXF or the web services that are at fault).

I have to consume four web services ('Groups' and 'Ranking' being two of them), each of which offers the same four operations ('Check' being one of them).
The four web services are all in the same namespace and all use the same SOAP Actions for those operations - but they each define different services, bindings and port 
types.

When I try to call one of the Check operations I'm getting this error:
WARNING: Interceptor for {namespace}Groups#{namespace}Check has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: java_namespace.ArrayOfGroup cannot be cast to java_namespace.ArrayOfRanking

The interceptor is getting confused between {namespace}Groups#{namespace}Check and {namespace}Rankings#{namespace}Check.

I'm not sure what the relationship between different wsdl files is supposed to be, so is this error demonstrating a flaw in CXF or in the web services?
Is there a simple way around it?

Thanks.

Jim


Re: Confusion between multiple services using the same namespace and action names for different services

Posted by Glen Mazza <gm...@talend.com>.
It looks like the unmarshalling back to Java isn't working because 
you're using the same namespace for each WSDL (the common action names 
may also be playing a role)--CXF doesn't know which object the incoming 
XML should be unmarshalled to.  I would provide each WSDL a different 
namespace, a good design in any event.

Glen

On 07/06/2011 05:27 AM, James Talbut wrote:
> Hi,
>
> I'm using camel-cxf, but I think this issue is on the CXF side (though I'm not at all sure whether it's CXF or the web services that are at fault).
>
> I have to consume four web services ('Groups' and 'Ranking' being two of them), each of which offers the same four operations ('Check' being one of them).
> The four web services are all in the same namespace and all use the same SOAP Actions for those operations - but they each define different services, bindings and port
> types.
>
> When I try to call one of the Check operations I'm getting this error:
> WARNING: Interceptor for {namespace}Groups#{namespace}Check has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: java_namespace.ArrayOfGroup cannot be cast to java_namespace.ArrayOfRanking
>
> The interceptor is getting confused between {namespace}Groups#{namespace}Check and {namespace}Rankings#{namespace}Check.
>
> I'm not sure what the relationship between different wsdl files is supposed to be, so is this error demonstrating a flaw in CXF or in the web services?
> Is there a simple way around it?
>
> Thanks.
>
> Jim
>


-- 
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza