Problem handling external WSDLs with multiple namespaces
--------------------------------------------------------

                 Key: ODE-379
                 URL: https://issues.apache.org/jira/browse/ODE-379
             Project: ODE
          Issue Type: Bug
          Components: Axis2 Integration
    Affects Versions: 1.2
            Reporter: Jon Coogan


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.

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 wonder if there are other areas where the same kinds of assumptions are made.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to