axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Doolittle (JIRA)" <>
Subject [jira] Created: (AXIS2-1138) Generated client code does not handle attribute namespaces correclty.
Date Mon, 11 Sep 2006 17:59:23 GMT
Generated client code does not handle attribute namespaces correclty.

                 Key: AXIS2-1138
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
         Environment: Java 1.4.2, Tomcat 4, Axis 2 nightly build from 09/05/2006
            Reporter: Todd Doolittle

I am using the WSDL listed below.  I generated a client.  This client is pointing to a non-java
service.  The service fails because it cannot find the "count" attribute for the "lookup"
element.  This is because the Axis 2 client namespace qualified the attribute.  

I contacted the service provider and they indicated that Axis 2 should not be namespace qualifying
the attribute.  The <xsd:schema> element in the WSDL specified elementFormDefault="required"
but it does not specify the attributeFormDefault.  In the abscense of the attributeFormDefault
the default value in "unqualified".  

I believe this means that the stub code generated by Axis 2 should not be namespace qualifying
the attributes.

Here is the envelope the Axis 2 stub created.  Notice the "count" attribute in the lookup
element is namespace qualified...
<?xml version='1.0' encoding='UTF-8'?>
  <soapenv:Header />
    <ns1:lookup xmlns:ns1="" ns1:count="1">

Here is the WSDL.  Notice that the <xsd:schema> element doesn't specifiy the attributeDefaultFormat
which means it defaults to "unqualified"...

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<wsdl:definitions xmlns:wsdl=""
  name="POC" targetNamespace=""
    <xsd:schema elementFormDefault="qualified"
      <xsd:element name="lookup">
            <xsd:element maxOccurs="unbounded" minOccurs="0"
              name="upc" nillable="true" type="xsd:string" />
          <xsd:attribute name="count" type="xsd:int"
            use="required" />
      <xsd:element name="GetinfoResponse">
            <xsd:element name="items" nillable="true">
                  <xsd:element maxOccurs="unbounded"
                    minOccurs="0" name="item" nillable="true">
                        <xsd:element name="ksn"
                          nillable="true" type="xsd:int" />
                        <xsd:element name="upc"
                          nillable="true" type="xsd:string" />
                          name="maintdt" nillable="true" type="xsd:date" />
                        <xsd:element name="dpt"
                          nillable="true" type="xsd:int" />
          <xsd:attribute name="count" type="xsd:int"
            use="required" />
  <wsdl:message name="GetinfoIn">
    <wsdl:part element="fjs:lookup" name="parameters" />
  <wsdl:message name="GetinfoOut">
    <wsdl:part element="fjs:GetinfoResponse" name="parameters" />
  <wsdl:portType name="POCPortType">
    <wsdl:operation name="Getinfo">
      <wsdl:input message="fjs:GetinfoIn" name="lookup" />
      <wsdl:output message="fjs:GetinfoOut"
        name="GetinfoResponse" />
  <wsdl:binding name="POCBinding" type="fjs:POCPortType">
    <soap:binding transport="" />
    <wsdl:operation name="Getinfo">
      <soap:operation soapAction="getinfo" style="document" />
      <wsdl:input name="lookup">
        <soap:body use="literal" />
      <wsdl:output name="GetinfoResponse">
        <soap:body use="literal" />
  <wsdl:service name="POC">
    <wsdl:port binding="fjs:POCBinding" name="POCPortType">
      <soap:address location="http://localhost:8090/POC/POC" />

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message