Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 71633 invoked from network); 2 Sep 2004 21:22:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Sep 2004 21:22:15 -0000 Received: (qmail 28138 invoked by uid 500); 2 Sep 2004 21:22:09 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 28122 invoked by uid 500); 2 Sep 2004 21:22:08 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 28113 invoked by uid 99); 2 Sep 2004 21:22:08 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [171.68.10.86] (HELO sj-iport-4.cisco.com) (171.68.10.86) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Sep 2004 14:22:06 -0700 X-BrightmailFiltered: true Received: from shsrinivw2k (dhcp-171-71-17-227.cisco.com [171.71.17.227]) by sj-core-3.cisco.com (8.12.10/8.12.6) with ESMTP id i82LKJQH009818; Thu, 2 Sep 2004 14:20:19 -0700 (PDT) Reply-To: From: "Shobha Srinivasan \(shsriniv\)" To: Cc: Subject: wsdl2java and substitution group Date: Thu, 2 Sep 2004 14:20:19 -0700 Message-ID: <001c01c49132$a66621c0$79c647ab@amer.cisco.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001D_01C490F7.FA0749C0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4939.300 Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_001D_01C490F7.FA0749C0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hello, Sorry to be posting this issue on the axis-dev list, but we are in a critical stage of a project where based on when the support for substitutionGroup is available from axis, we may have to redesign our schema. This is regarding the bug 26703 (axis_1.1 does not support substitutionGroup feature). I am hitting this issue and would like to know as to which release of Axis would address this issue and when is the release planned? The specific issue that we are hitting is described at the end of the mail. Thanks in advance for your reply. Regards Shobha I am facing an issue with wsdl2java when I use substitution groups in the schema. I am using Axis 1.1 with Tomcat 5.0. Has anyone faced similar issues with substitution groups using Axis wsdl2java? It seems like to make it work, one would have to modify the generated code. I run the following wsdl2java command on PartyOperation.wsdl. (PartyOperation.wsdl and associated xsd files are included at the end of the mail) java org.apache.axis.wsdl.WSDL2Java -O -1 -s -S true -d Session -Nhttp://www.examples.com/nm2/definitions=samples.party -Nhttp://www.examples.com/nm1=samples.party.nm1types -Nhttp://www.examples.com/nm2=samples.party.nm2types samples\party\PartyOperation.wsdl Excerpts from generated Java files: nm2types/PartyInfo.java ------------------------ public class PartyInfo implements java.io.Serializable { private samples.party.nm2types.PartyType[] party; .... } nm2types/PartyType.java ------------------------ public class PartyType extends samples.party.nm1types.PartyType implements java.io.Serializable { public PartyType() {} ... } nm1types/PartyType.java ------------------------ public class PartyType implements java.io.Serializable { private samples.party.nm1types.Name name; public PartyType() {} public samples.party.nm1types.Name getName() { return name; } public void setName(samples.party.nm1types.Name name) { this.name = name; } } The issue is that samples.party.nm2types.PartyType.java class extends from samples.party.nm1types.PartyType and has no "getName" method. The samples.party.nm1types.PartyType class has getName method, but returns samples.party.nm1types.Name. Another issue is that element "CustomerParty" in nm1/PartyInfo.xsd does not get reflected in the Java code in nm1types/*.java. Thanks and Regards Shobha ============================= PartyOperation.wsdl ==================================== > > > > ======================================================================== ========== ================ PartyInfo.xsd (in NameSpace 1) ========================================== ======================================================================== ========== ================ PartyInfo.xsd (in NameSpace 2) ========================================== ======================================================================== ========== ------=_NextPart_000_001D_01C490F7.FA0749C0 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Message
Hello,
 
Sorry=20 to be posting this issue on the axis-dev list,=20 but we are in a critical stage of a project where based on when the = support=20 for substitutionGroup is available from axis, we may have to redesign = our=20 schema.
 
This is regarding the bug 26703 = (axis_1.1=20 does not support substitutionGroup feature). I am hitting this = issue and=20 would like to know as to which release of Axis would address this issue = and when=20 is the release planned?
 
The specific issue that we are = hitting is=20 described at the end of the mail.
 
Thanks in advance for your=20 reply.
 
Regards
Shobha
 
I am facing an issue with wsdl2java = when I use=20 substitution groups in the schema. I am = using Axis 1.1 with Tomcat 5.0.
Has anyone faced similar issues = with=20 substitution groups using Axis wsdl2java? It=20 seems like to make it work, one would have to modify the generated=20 code.
 
=
I run the following wsdl2java command = on=20 PartyOperation.wsdl. (PartyOperation.wsdl and associated xsd files are = included=20 at the end of the mail)
 
java org.apache.axis.wsdl.WSDL2Java -O = -1 -s -S=20 true -d Session = -Nhttp://www.examples.com/nm2/definitions=3Dsamples.party=20 -Nhttp://www.examples.com/nm1=3Dsamples.party.nm1types=20 -Nhttp://www.examples.com/nm2=3Dsamples.party.nm2types=20 samples\party\PartyOperation.wsdl
 
Excerpts from generated Java = files:
 
nm2types/PartyInfo.java
------------------------
public = class=20 PartyInfo  implements java.io.Serializable =
{
   =20 private samples.party.nm2types.PartyType[] party;
   =20 ....
}
 
nm2types/PartyType.java 
------------------------
p= ublic=20 class PartyType  extends samples.party.nm1types.PartyType  = implements=20 java.io.Serializable
{
    public PartyType()=20 {}
    ...
}
 
nm1types/PartyType.java
------------------------
public = class=20 PartyType  implements = java.io.Serializable
{
   =20 private samples.party.nm1types.Name name;
 
    public PartyType()=20 {}
 
    public=20 samples.party.nm1types.Name getName() { return name; = }
   =20
    public void setName(samples.party.nm1types.Name = name) {=20 this.name =3D name; }
}
 
The issue is that=20 samples.party.nm2types.PartyType.java class extends from=20 samples.party.nm1types.PartyType and has no "getName" method. The=20 samples.party.nm1types.PartyType class has getName method, but returns=20 samples.party.nm1types.Name.
 
Another issue is that element = "CustomerParty" in=20 nm1/PartyInfo.xsd does not get reflected in the Java code in=20 nm1types/*.java.
 
Thanks and = Regards
Shobha
 
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D PartyOperation.wsdl=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<?xml version=3D"1.0"=20 ?>
 
<definitions=20 name=3D"PartyFetcher"
        =     =20 targetNamespace=3D"http://www.examples.com/= nm2/definitions"
        &= nbsp;   =20 xmlns:tns=3D"http://www.examples.com/= nm2/definitions"
        &= nbsp;   =20 xmlns:typens=3D"http://www.examples.com/nm2"
=              = xmlns:xsd=3D"http://www.w3.org/1999/XMLSchem= a"
          &nb= sp; =20 xmlns:soap=3D"http://schemas.xmlsoap.org= /wsdl/soap/"
         = ;   =20 xmlns=3D"http://schemas.xmlsoap.org/wsdl= /">
 
  <import namespace=3D"http://www.examples.com/nm2"
=           =20 location=3D"./nm2/PartyInfo.xsd"/>
 
  <!-- message declns = -->
 =20 <message name=3D"GetPartyRequest">
    <part=20 name=3D"partyreq" type=3D"typens:PartyInfo"/>
 =20 </message>
 
  <message=20 name=3D"GetPartyResponse">
    <part = name=3D"partyres"=20 type=3D"typens:PartyInfo"/>
  </message>
 
  <!-- port type declns = -->
 =20 <portType name=3D"PartyOperation">
    = <operation=20 name=3D"PartyOperation">
      <input=20 message=3D"tns:GetPartyRequest"/>
      = <output=20 message=3D"tns:GetPartyResponse"/>
   =20 </operation>
  </portType>
 
  <!-- binding declns = -->
 =20 <binding name=3D"PartyOperationSOAPBinding"=20 type=3D"tns:PartyOperation">
    <soap:binding=20 style=3D"rpc"
         &n= bsp;       =20 transport=3D"http://schemas.xmlsoap.or= g/soap/http"/>
   =20 <operation = name=3D"PartyOperation">
     =20 <soap:operation = soapAction=3D""/>
     =20 <input>
        = <soap:body=20 use=3D"encoded"
         =          =20 namespace=3D"http://www.examples.com/= nm2/definitions"
        &= nbsp;         =20 encodingStyle=3D"http://schemas.xmlso= ap.org/soap/encoding/"/>
     =20 </input>
     =20 <output>
        = <soap:body=20 use=3D"encoded"
         =          =20 namespace=3D"http://www.examples.com/= nm2/definitions"
        &= nbsp;         =20 encodingStyle=3D"http://schemas.xmlso= ap.org/soap/encoding/"/>
     =20 </output>
    </operation>
 =20 </binding>
 
  <!-- service decln = -->
 =20 <service name=3D"PartyOperationService">
    = <port=20 name=3D"PartyOperation"=20 binding=3D"tns:PartyOperationSOAPBinding">
    =  =20 <soap:address location=3D"http://loca= lhost:8080/axis/services/PartyOperation"/>
   =20 </port>
  </service>
 
</definitions>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 PartyInfo.xsd (in NameSpace 1)=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<?xml = version=3D"1.0"=20 encoding=3D"utf-8"?>
<xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchem= a"=20 xmlns=3D"http://www.examples.com/nm1"=20 targetNamespace=3D"http://www.examples.com/nm1"=20 elementFormDefault=3D"qualified"=20 attributeFormDefault=3D"unqualified">
 
       =20 <xs:element name=3D"PartyInfo"=20 type=3D"PartyInfo">
       =20 </xs:element>
       =20 <xs:complexType=20 name=3D"PartyInfo">
  <xs:sequence>
  =  <xs:element=20 ref=3D"Party"=20 maxOccurs=3D"unbounded"/>
  </xs:sequence>
 = ;      =20 </xs:complexType>
 
       =20 <xs:element name=3D"Party"=20 type=3D"PartyType">
       =20 </xs:element>
 
 <xs:element = name=3D"CustomerParty"=20 type=3D"PartyType" substitutionGroup=3D"Party"=20 />
 
        = <xs:complexType=20 name=3D"PartyType">
  <xs:sequence>
  =  <xs:element=20 ref=3D"Name"/>
  </xs:sequence>
 </xs:co= mplexType>
 
 <xs:complexType=20 name=3D"Name">
  <xs:sequence>
   = ;<xs:element=20 ref=3D"FirstName" />
   <xs:element = ref=3D"LastName"=20 />
  </xs:sequence>
 </xs:complexType>= ;
 
 <xs:element=20 name=3D"Name" type=3D"Name" />
 
 <xs:simpleType=20 name=3D"FirstName">
  <xs:restriction = base=3D"xs:string"=20 />
 </xs:simpleType>
 
 <xs:element name=3D"FirstName" = type=3D"FirstName" />
 
 <xs:simpleType=20 name=3D"LastName">
  <xs:restriction = base=3D"xs:string"=20 />
 </xs:simpleType>
 
 <xs:element=20 name=3D"LastName" type=3D"LastName" = />
</xs:schema>
 
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=20 PartyInfo.xsd (in NameSpace 2)=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 
<?xml version=3D"1.0"=20 encoding=3D"utf-8"?>
 
<xs:schema targetNamespace=3D"http://www.examples.com/nm2"=20 elementFormDefault=3D"qualified" attributeFormDefault=3D"unqualified" = xmlns:nm2=3D"http://www.examples.com/nm2"=20 xmlns:nm1=3D"http://www.examples.com/nm1" = xmlns:xs=3D"http://www.w3.org/2001/XMLSchem= a">
 
 <xs:import namespace=3D"http://www.examples.com/nm1"=20 schemaLocation=3D"../nm1/PartyInfo.xsd"/>
 

 <xs:element name=3D"PartyInfo"=20 type=3D"nm2:PartyInfo"/>
 
 <xs:complexType=20 name=3D"PartyInfo">
  <xs:sequence>
  =  <xs:element=20 ref=3D"nm2:Party"=20 maxOccurs=3D"unbounded"/>
  </xs:sequence>
 = ;</xs:complexType>
 
 <xs:element name=3D"Party"=20 type=3D"nm2:PartyType">
 </xs:element>
 
 <xs:complexType=20 name=3D"PartyType">
  <xs:complexContent>
 =   <xs:extension=20 base=3D"nm1:PartyType"=20 />
  </xs:complexContent>
 </xs:complexT= ype>
 
 <xs:element name=3D"Name" type=3D"nm2:Name"=20 substitutionGroup=3D"nm1:Name"/>
 
 <xs:complexType=20 name=3D"Name">
  <xs:complexContent>
  = ; <xs:extension=20 base=3D"nm1:Name">
    <xs:sequence>
&= nbsp;    <xs:element=20 name=3D"MiddleName"=20 type=3D"xs:string"/>
    </xs:sequence>   </xs:extension>
  </xs:complexC= ontent>
 </xs:complexType>
</xs:schema>
 
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
 
------=_NextPart_000_001D_01C490F7.FA0749C0--