I have solved one of the problems (i.e. arrays being generated in the "throws" clause) by adding a "-w" to the wsdl2java command line options.

I have attached an example of a broken source file with an invalid constructor super call because the superclass is java.lang.Object! I think the problem is caused when an element extends a simple type with an attribute. Is that what you mean by an "anonymous complex type"?

The following XSD reflects the attached broken code:

    <xsd:complexType name="t_Warning">
        <xsd:sequence>
...
            <xsd:element name="Description">
                <xsd:complexType>
                    <xsd:simpleContent>
                        <xsd:extension base="t_ErrorDescription">
                            <xsd:attribute name="LanguageCode" type="t_Language" use="required"/>
                        </xsd:extension>
                    </xsd:simpleContent>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="Source" type="t_ErrorSource"/>
        </xsd:sequence>
    </xsd:complexType>

...
    <xsd:simpleType name="t_ErrorDescription">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="10000"/>
        </xsd:restriction>
    </xsd:simpleType>
...
    <xsd:simpleType name="t_Language">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="40"/>
        </xsd:restriction>
    </xsd:simpleType>

This XSD generate code fine with Axis 1.2 but I haven't thoroughly tested a client...

Regards,
Terry


Franz Fehringer wrote:
Hello,

Out of curiosity:
Your WSDL contains multiple portTypes.
Is this supported with AXIS1JAVA?
Btw i work also with PegsTour (Singular Interface pertaining to PT version 2.12.2), but i use the C++ implementation of Axis.
This one definitely cannot cope with multiple portTypes (i think even for Axis2 this is a TODO yet, not quite sure however).
Furthermore Axis1 (both Java and C++) has problems with anonymous complexTypes (this is much improved in AXISCPP nightly), so i am slightly surprised to hear that you could successfully use Axis1 1.2

Greetings

Franz


Cantrell, Andrew schrieb:

OK – have attached a version that I think complies with your suggestions however we are still getting compile errors

 

Regards

 

Andrew

 


From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]

Okay ... just for starters, your import statement is in error.

You are trying to import a schema definition (PegsTour.xsd) using <wsdl:import>. <wsdl:import> may be used only to import WSDL descriptions, not schemas. Axis 1.2 was lax and permitted you to do this, but Axis 1.4 is more strict.

You must add a <wsdl:types> section to the document, define a schema, and use <xsd:import> or <xsd:include> to import/include the schema. You use <xsd:import> to import a schema in a different namespace, and you use <xsd:include> to include multiple schema files that define the same namespace.

Next, the PegsTour.xsd schema references a ton of components that are not defined in the schema file. My guess is that they are defined in all the other schema files that you supplied, but you don't <xsd:include> them into the schema. Therefore, you can't reference them. You must add an <xsd:include> statement for each of the other schema files. I haven't looked at the other schema files, but if any of them reference components described in other schema files, you must also add <xsd:include> statements to those schemas.

Regards,
Anne

On 1/29/07, Cantrell, Andrew <[EMAIL PROTECTED]> wrote:

Please post the WSDL.
 
On 1/29/07, Terry Mueller 
<[EMAIL PROTECTED]> wrote:
> I have tested WSDL2Java with our WSDL using Axis 1.2 without any
> problems. When I upgrade to Axis 1.4 (drop in new jars), the same
 
> command generates code with compile errors. There are three basic
> compilation problems: (1) in some constructors of simple types there is
> call to super(foo,bar) that doesn't exist (2) the "throws" clauses
 
> declaration contains an array and (3) the class in the "throws" clause
> does not extend 
java.lang.Exception.
 
> I was having a play with Lisa test tool from 
http://www.itko.com/ which
> uses Axis 1.4 so I can't upgrade to Axis 2 yet.
 
 
> Any ideas?
 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
[EMAIL PROTECTED]
> For additional commands, e-mail: 
[EMAIL PROTECTED]
 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]
 
 
 

 

--

Regards,
Terry


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


/**
 * T_WarningDescription.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.pegstour.client;

public class T_WarningDescription  implements java.io.Serializable, 
org.apache.axis.encoding.SimpleType {
    private java.lang.String languageCode;  // attribute

    public T_WarningDescription() {
    }

    // Simple Types must have a String constructor
    public T_WarningDescription(java.lang.String _value) {
        super(_value);
    }


    /**
     * Gets the languageCode value for this T_WarningDescription.
     * 
     * @return languageCode
     */
    public java.lang.String getLanguageCode() {
        return languageCode;
    }


    /**
     * Sets the languageCode value for this T_WarningDescription.
     * 
     * @param languageCode
     */
    public void setLanguageCode(java.lang.String languageCode) {
        this.languageCode = languageCode;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof T_WarningDescription)) return false;
        T_WarningDescription other = (T_WarningDescription) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) && 
            ((this.languageCode==null && other.getLanguageCode()==null) || 
             (this.languageCode!=null &&
              this.languageCode.equals(other.getLanguageCode())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getLanguageCode() != null) {
            _hashCode += getLanguageCode().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(T_WarningDescription.class, 
true);

    static {
        typeDesc.setXmlType(new 
javax.xml.namespace.QName("http://www.pegs-pegstour.com/API/XMLSchema/1.0.1";, 
">t_Warning>Description"));
        org.apache.axis.description.AttributeDesc attrField = new 
org.apache.axis.description.AttributeDesc();
        attrField.setFieldName("languageCode");
        attrField.setXmlName(new javax.xml.namespace.QName("", "LanguageCode"));
        attrField.setXmlType(new 
javax.xml.namespace.QName("http://www.pegs-pegstour.com/API/XMLSchema/1.0.1";, 
"t_Language"));
        typeDesc.addFieldDesc(attrField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to