axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Guillon (JIRA)" <>
Subject [jira] Created: (AXIS2-3333) wsdl2java namespace problem
Date Mon, 12 Nov 2007 10:46:51 GMT
wsdl2java namespace problem

                 Key: AXIS2-3333
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
    Affects Versions: 1.3
         Environment: Windows XP 5.1.2600
Axis2 1.3
Maven 2.0.7
Java 1.5.0_12
            Reporter: Benoit Guillon

I'm having problems with the code generated by wsdl2java (precisely using the maven2 plugin).
I'm using Axis2 1.3 with the ADB binding.

It seems that the generator gets confused because an operation is declared in a given XML
namespace and a bean used in the response of the operation is declared in a different namespace.

The sample WSDL in attachment illustrates the situation. The operation "timer" and its associated
messages "timerRequest" and "timerResponse" belong to the namespace ""
however the data structure ReturnStructure is defined with the namespace "".

In this situation, the generated code for the message TimerResponse expects an element ReturnStructure
with namespace instead of "".

When the code is run, the parse method of TimerResponse class throws an ADBException "Unexepected
subelement ReturnStructure" when the response is parsed.

Is there something wrong with my WSDL (which is generated using another tool)? Or is this
a bug?

The part of my pom.xml that defines the use of the maven2 plugin:


The portion of code that causes the problem is located in

if (reader.isStartElement() && new javax.xml.namespace.QName("","ReturnStructure").equals(reader.getName())){
        nillableValue = reader.getAttributeValue("","nil");
      if ("true".equals(nillableValue) || "1".equals(nillableValue)){
}  // End of if for expected property start element
        // A start element we are not expecting indicates an invalid parameter was passed
        throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message