cancel
Showing results for 
Search instead for 
Did you mean: 

Java to WSDL Enumeration

Former Member
0 Kudos

Hi,

I'm developing a web service from a java class using the ide:

SAP NetWeaver Developer Studio

Version: 7.0.10

Build id: 200610212349

For a DTO, I want to limit the value of a attribute to a enumeration of string values. I've created the next class for the enumeration, the JDK is 1.4.2:

package net.xxx.saews.dto;

public class RegulationType implements SaeDTO {

/**

*/

private static final long serialVersionUID = 1L;

private String value = null;

public static final String _O = "O";

public static final String _I = "I";

public static final String _G = "G";

public static final String _N = "N";

public static final RegulationType O = new RegulationType(_O);

public static final RegulationType I = new RegulationType(_I);

public static final RegulationType G = new RegulationType(_G);

public static final RegulationType N = new RegulationType(_N);

public static RegulationType fromValue(String value){

return RegulationType.O;

}

protected RegulationType(String value) {

this.value = value;

}

public String getValue() {

return this.value;

}

}

But in my WSDL, this is the WSDL mapping for the class:

<xs:complexType name="RegulationType">

u2212

<xs:complexContent>

u2212

<xs:extension base="tns:SaeDTO">

<xs:sequence/>

</xs:extension>

</xs:complexContent>

</xs:complexType>

Can I obtain a WSDL definition for a enumeration?

Something like:

<xs:simpleType>

<xs:enumeration value="O"/>

<xs:enumeration value="I"/>

. . .

</xs:restriction>

</xs:simpleType>

Thanks in advance.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

To my information enumeration types are not supported yet in Webservice definitions. You may want to check 7.1 for this feature (aka Composition Environment).

Regards,

Benny

Answers (0)