Yes, this appears to be a bug.  Can you file an issue in Jira?

Perhaps we should provide a compiler error in the mean time if the WSDL
import namespace isn't the same as the target namespace so people don't get
tripped by this bug until it's fixed.

alex


On Mon, Sep 29, 2008 at 10:39 AM, Jonathan Coogan <
[EMAIL PROTECTED]> wrote:

> Hi everybody.
>
> I think I¹ve discovered a bug in the way Ode 1.2 handles external WSDLs
> that
> contain multiple namespaces.  For example, I have a web service that has
> the
> following format:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/";
> xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xyzNamespace="xyz"
> name="SampleService" targetNamespace="abc">
>    <plnk:partnerLinkType name="SamplePartnerLinkType">
>        <plnk:role name="SampleRole"
> portType="xyzNamespace:SamplePortType"/>
>    </plnk:partnerLinkType>
>    <import location="xyz.wsdl" namespace="xyz"/>
>    <service name="SampleService">
>        <port binding="xyzNamespace:SamplePortBinding" name="SamplePort">
>            <soap:address location="http://xxxxxx/Sample"/>
>        </port>
>    </service>
> </definitions>
>
> The target namespace of the WSDL is "abc", but the service
> binding/operations/faults/etc are actually declared in the "xyz" namespace.
> As far as I can tell, this is perfectly legal.
>
> The problem is that I can't get fault handling to work at all with a
> service
> like this.  The WSDL defines a fault in the xyz namespace.  When I
> encounter
> the fault, I see this in the Ode log:
>
> WARN  [SoapExternalService]: Fault response: faultType={abc}SampleFault
>
> What's puzzling about this is that the namespace is wrong.  The SampleFault
> is declared in the xyz namespace, not the abc namespace.  I surmised that
> Ode somehow assumes that the faults (and possibly other things) reside in
> the same namespace as the top-level WSDL.
>
> I did some snooping and found some code that seems to confirm this.  See
> parseSoapFault() in:
>
>
> http://svn.apache.org/repos/asf/ode/tags/APACHE_ODE_1.2/axis2/src/main/java/
> org/apache/ode/axis2/util/SoapMessageConverter.java<http://svn.apache.org/repos/asf/ode/tags/APACHE_ODE_1.2/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java>
> .
>
> The last line jumped out at me:
>
> return new QName(_def.getTargetNamespace(), fdef.getName());
>
> Now I am not very familiar with the Ode sources, but it looks the namespace
> is being pulled off the top-level definition.  In this case, that is
> incorrect because the fault actually has a different namespace.
>
> I'd like to know what the developers think about this.  I wonder if there
> are other areas where the same kinds of assumptions are made.
>
> Thanks for your time.
> -Jon
>
>
>
>
>
>
>

Reply via email to