I have a WSDL file from a customer and generated Java code from it with WSDL2Java.

There are some classes generated that contain a value of type BigInteger. One of them is described in the WSDL-file as follows:

           <xsd:complexType name="LifecycleStateDTO">
               <xsd:sequence>
                   <xsd:element name="stateCode" type="xsd:integer"/>
               </xsd:sequence>
           </xsd:complexType>

So xsd:integer seems to be mapped to BigInteger in java code. When I call a method, that returns this type (LifecycleStateDTO - directly or nested), i get an IllegalArgumentException. I traced the communication with Wireshark and saw that the server returned valid data, so the exception is thrown on client-side. Does the client not understand the xsd:integer to BigInteger mapping? Is there any way for me to enforce it?
I tried to change the java code manually, and replaced BigInteger with
int. With these changes made, everything works fine. But I don't like that solution, since the webservice interface (and so the WSDL file) is changed frequently, so I have to regenerate the java code from time to time. That would mean a lot of manual BigInteger->int conversion each time the interface changes. Is there maybe some way of telling WSDL2Java to generate int from xsd:integer?

I've been searching the web for solutions for hours now... can somebody please help me with that?



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

Reply via email to