Hi,

  when restricting a simpleType like shown below ...

   <simpleType name="CustomerNumber">
    <restriction base="xsd:string">
      <maxLength value="12"/>
    </restriction>
   </simpleType>

 ... wsdl2java seems to generate a new type for every simple type. At the end of
the day it is still a String and the implementation doesn't change in respect to
the restriction. Is there anyway I can get rid of generating new types for these
kinds of restrictions. I mean without building own classes for the generation
process?

  As I am restricting all types this yields to a massive amount of types and to
ugly code. I'd like to write client code like that:

  Address a = new Address();
  a.setStreet("SomeStreet");
  a.setZip("90210");
  ...

  ReadCustomerDataRequest req = new ReadCustomerDataRequest();
  req.setCustomerNumber("4711");
  req.setAddress(a);

  But instead I need to write:

  Address a = new Address();
**a.setStreet(new Street("SomeStreet"));
**a.setZip(new Zip("90210"));
  ...

  ReadCustomerDataRequest req = new ReadCustomerDataRequest();
**req.setCustomerNumber(new CustomerNumber("4711"));
  req.setAddress(a);

  See my point?

Cheers,
Mariano



Reply via email to