1.4x implementation was incorrect
1.6x implementation is correct 
here is the code
public class WSDL2Code {
    public static void main(String[] args) throws Exception {
        CommandLineOptionParser commandLineOptionParser = new 
CommandLineOptionParser(  args);
        if (isOptionsValid(commandLineOptionParser)){
            new CodeGenerationEngine(commandLineOptionParser).generate();

public CodeGenerationEngine(CommandLineOptionParser parser) throws 
CodeGenerationException {
        Map allOptions = parser.getAllOptions();
        try {
            configuration = new CodeGenConfiguration(allOptions);

public CodeGenConfiguration(Map<String,CommandLineOption> optionMap) {
        CodegenConfigLoader.loadConfig(this, optionMap);

public static void loadConfig(CodeGenConfiguration config, 
Map<String,CommandLineOption> optionMap) {
        String outputLocation = "."; //default output directory is the current 
working directory
        CommandLineOption commandLineOption = 
loadOption(WSDL2JavaConstants.OUTPUT_LOCATION_OPTION,
                                                         
WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG,
                                                         optionMap);


Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


From: alexander.wag...@wienit.at
To: java-user@axis.apache.org
Subject: Axis2 1.6.1 generic OMElement in Stub parameter
Date: Wed, 27 Jun 2012 11:38:11 +0000









Hello!
 
I have an issue regarding the generation of stub classes from my WSDL:
 
When calling WSDL2Java with Apache Axis2 1.6.0 (and above) the getter/setter 
methods in my stub class called “ZwsVkontGetAll” have the generic “OMElement” 
type. The “Char10” type, which it should have according to the
 WSDL, is not even generated.
Calling the same WSDL with Apache Axis2 1.4.1 the methods in the same stub have 
the correct “Char10” type, and the “Char10” class is also generated as well.
 
Here is the related part of the WSDL file. Please note that this WSDL was 
autogenerated from another tool, and has not been created manually:
 
<types>
          <xsd:schema attributeFormDefault="qualified"
                targetNamespace="urn:sap-com:document:sap:rfc:functions">
                <xsd:simpleType name="char10">
                     <xsd:restriction base="xsd:string">
                          <xsd:maxLength value="10" />
                     </xsd:restriction>
                </xsd:simpleType>
          </xsd:schema>
         

          <xsd:schema attributeFormDefault="qualified"
                
targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" 
xmlns:n0="urn:sap-com:document:sap:rfc:functions">
               

                <xsd:import namespace="urn:sap-com:document:sap:rfc:functions" 
/>
               

                <xsd:simpleType name="char10">
                     <xsd:restriction base="xsd:string">
                          <xsd:maxLength value="10" />
                     </xsd:restriction>
                </xsd:simpleType>
               

                <xsd:element name="ZwsVkontGetAll">
                     <xsd:complexType>
                          <xsd:sequence>
                               <xsd:element name="XtGpart" type="n0:char10" />
                          </xsd:sequence>
                     </xsd:complexType>
                </xsd:element>
               

          </xsd:schema>
     </types>
 
 
Why are the generated classes for the same WSDL with Axis2 1.4.1 different? 
Does Axis2 1.6.0 interpret these type definitions in a different way?
 
Another thing I’ve noticed:
When I set the both (!) the “--generate-all” and the “--server-side” parameters 
on, the “Char10” class is generated, and the stub class uses the right 
parameter type with Axis2 1.6.0 as well. Why is this the case?
 
 
Thanx for any info on this topic.

____________________________________________________________________________


WienIT EDV Dienstleistungsgesellschaft mbH & Co KG, A-1030 Wien, 
Thomas-Klestil-Platz 6,

FN 255974h, Handelsgericht Wien, DVR: 2109667, UID-Nr. ATU61260824

Persönlich haftender Gesellschafter:

WienIT EDV Dienstleistungsgesellschaft mbH, A-1030 Wien, Thomas-Klestil-Platz 6,

FN 255649f, Handelsgericht Wien, UID-Nr. ATU61296118


                                          

Reply via email to