users@jax-ws.java.net

Fall back

From: Baker, Brad \(Contr\) <"Baker,>
Date: Wed, 28 Mar 2007 01:06:21 -0400

Seeing I can't seem to get wsimport and wsgen to play nice I am trying
wscompile and wsdepoly. I get this with wsdeploy:

 

wsdeploy:

 [wsdeploy] error: class
com.ngms.chims.human.domain.ws.GetEntitiesRequestEntityType does not
have a public accessible empty constructor

 

Now wsdeploy is right, there is no empty constructor in the class
wscompile made but that is because the wsdl had this:

                    <element name="EntityType" nillable="true">

                        <annotation>

                            <documentation>EntityType - If null then ALL
Entities will be chosen in the date range.</documentation>

                        </annotation>

                        <simpleType>

                            <restriction base="string">

                                <enumeration value="Equipment"/>

                                <enumeration value="Event"/>

                                <enumeration value="Facility"/>

                                <enumeration value="Individual"/>

                                <enumeration value="Organization"/>

                            </restriction>

                        </simpleType>

                    </element>

 

So the following class was made:

// This class was generated by the JAXRPC SI, do not edit.

// Contents subject to change without notice.

// JAX-RPC Standard Implementation (1.1.3, build R2)

// Generated source version: 1.1.3

 

package com.ngms.chims.human.domain.ws;

 

 

import java.util.Map;

import java.util.HashMap;

 

public class GetEntitiesRequestEntityType {

    private java.lang.String value;

    private static java.util.Map valueMap = new HashMap();

    public static final java.lang.String _EquipmentString = "Equipment";

    public static final java.lang.String _EventString = "Event";

    public static final java.lang.String _FacilityString = "Facility";

    public static final java.lang.String _IndividualString =
"Individual";

    public static final java.lang.String _OrganizationString =
"Organization";

    

    public static final java.lang.String _Equipment = new
java.lang.String(_EquipmentString);

    public static final java.lang.String _Event = new
java.lang.String(_EventString);

    public static final java.lang.String _Facility = new
java.lang.String(_FacilityString);

    public static final java.lang.String _Individual = new
java.lang.String(_IndividualString);

    public static final java.lang.String _Organization = new
java.lang.String(_OrganizationString);

    

    public static final GetEntitiesRequestEntityType Equipment = new
GetEntitiesRequestEntityType(_Equipment);

    public static final GetEntitiesRequestEntityType Event = new
GetEntitiesRequestEntityType(_Event);

    public static final GetEntitiesRequestEntityType Facility = new
GetEntitiesRequestEntityType(_Facility);

    public static final GetEntitiesRequestEntityType Individual = new
GetEntitiesRequestEntityType(_Individual);

    public static final GetEntitiesRequestEntityType Organization = new
GetEntitiesRequestEntityType(_Organization);

    

    protected GetEntitiesRequestEntityType(java.lang.String value) {

        this.value = value;

        valueMap.put(this.toString(), this);

    }

    

    public java.lang.String getValue() {

        return value;

    }

    

    public static GetEntitiesRequestEntityType
fromValue(java.lang.String value)

        throws java.lang.IllegalStateException {

        if (Equipment.value.equals(value)) {

            return Equipment;

        } else if (Event.value.equals(value)) {

            return Event;

        } else if (Facility.value.equals(value)) {

            return Facility;

        } else if (Individual.value.equals(value)) {

            return Individual;

        } else if (Organization.value.equals(value)) {

            return Organization;

        }

        throw new java.lang.IllegalArgumentException();

    }

    

    public static GetEntitiesRequestEntityType
fromString(java.lang.String value)

        throws java.lang.IllegalStateException {

        GetEntitiesRequestEntityType ret =
(GetEntitiesRequestEntityType)valueMap.get(value);

        if (ret != null) {

            return ret;

        }

        if (value.equals(_EquipmentString)) {

            return Equipment;

        } else if (value.equals(_EventString)) {

            return Event;

        } else if (value.equals(_FacilityString)) {

            return Facility;

        } else if (value.equals(_IndividualString)) {

            return Individual;

        } else if (value.equals(_OrganizationString)) {

            return Organization;

        }

        throw new IllegalArgumentException();

    }

    

    public java.lang.String toString() {

        return value.toString();

    }

    

    private java.lang.Object readResolve()

        throws java.io.ObjectStreamException {

        return fromValue(getValue());

    }

    

    public boolean equals(java.lang.Object obj) {

        if (!(obj instanceof GetEntitiesRequestEntityType)) {

            return false;

        }

        return ((GetEntitiesRequestEntityType)obj).value.equals(value);

    }

    

    public int hashCode() {

        return value.hashCode();

    }

}

 

So why are wscompile and wsdeploy not working together?

Am I the only person making Web Services from a WSDL?

 

Brad