You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2010/03/10 07:07:27 UTC

[jira] Commented: (AXIS2-4650) BAD WSDL generation from Java class

    [ https://issues.apache.org/jira/browse/AXIS2-4650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843447#action_12843447 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-4650:
-----------------------------------------------------

can you attach a complete sample class with shows the issue.

I tried with this but it works fine

public class Entity {

    public class EntityCompanyWithContactType {
        private EntityCompanyType entity;
        private int age;

        public EntityCompanyType getEntity() {
            return entity;
        }

        public void setEntity(EntityCompanyType entity) {
            this.entity = entity;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }
    }

    public int test(EntityCompanyWithContactType contactType){
        return 2;
    }
}

> BAD WSDL generation from Java class
> -----------------------------------
>
>                 Key: AXIS2-4650
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4650
>             Project: Axis2
>          Issue Type: Bug
>         Environment: OS: Debian GNU/Linux
> WSO2 WSAS v3.1.3
>            Reporter: Vitor Manuel Alves Rodrigues
>
> Hello everyone,
> I have this snippet from the WSDL:
> ...
> <xs:complexType name="EntityCompanyWithCountType">
>                 <xs:sequence>
>                     <xs:element minOccurs="0" name="count" nillable="true" type="xs:int" />
>                     <xs:element maxOccurs="unbounded" minOccurs="0" name="entity" nillable="true" />
>                 </xs:sequence>
> </xs:complexType>
> ...
> The correct would be this:
> <xs:complexType name="EntityCompanyWithCountType">
>                 <xs:sequence>
>                     <xs:element minOccurs="0" name="count" nillable="true" type="xs:int" />
>                     <xs:element maxOccurs="unbounded" minOccurs="0" name="entity" type="ax2329:EntityCompanyType" nillable="true" />
>                 </xs:sequence>
> </xs:complexType>
> I have this in Java:
> public class Entity {
> ...
> /*Inner class*/
>        public class EntityCompanyWithContactType {
>         private EntityCompanyType entity;
>         private DigitalAddress.DigitalAddressType[] digital_address;
>         private PhoneNumber.PhoneNumberType[] phone_number;
>         private PostalAddress.PostalAddressType[] postal_address;
>         private PostalAddress.PostalAddressPhoneNumberType[] postal_address__phone_number;
>             /**
>          * The default constructor.
>          */
>         public EntityCompanyWithContactType(){}
>         /**
>          * The constructor with all the input for one record.
>          * @param entity value;
>          * @param digital_address list value;
>          * @param phone_number list value;
>          * @param postal_address list value;
>          * @param postal_address__phone_number list value;
>          */
>         public EntityCompanyWithContactType(EntityCompanyType entity, DigitalAddress.DigitalAddressType[] digital_address, PhoneNumber.PhoneNumberType[] phone_number, PostalAddress.PostalAddressType[] postal_address, PostalAddress.PostalAddressPhoneNumberType[] postal_address__phone_number) { .. }
>  
> .....
> }
> I'm using "ant install" -> <echo> - install: build of AAR and deploy into WSAS. Also generates API documentation.</echo>
> My build.xml  :
> ..
> <target name="install"
>           depends="build-service,doc"
>           description="Installs the service package AAR into the Web service server repository.">
>     <echo message="Copying the created AAR files into the repository..."/>
>     <copy toDir="${repository.dir}/${services.dir}">
>       <fileset dir="${services.dir}">
>         <include name="**/*.aar"/>
>       </fileset>
>     </copy>
>   </target>
> ...
> What am i doing wrong? Help. :(
> For more info, please please contact me :)

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org