Mike Edwards wrote:
Folks,

The real problem here is that the testcase for wsdl2java is cr*p. I'll raise a JIRA to track this.

Basically, the testcase runs the wsdl2java tool a number of times and produces some output. Nothing wrong with that, except that all that is being tested is that the tool code can be invoked without getting an exception.

There is *no* checking that what is produced by the tool makes any sense at all. And in fact, the code produced DOESN'T make any sense - try compiling it by hand.

So, this test needs changing and extending. There must be a test done on the output code itself - ideally there should be an "expected output" which is checked against the actual output.

I agree, I'd suggest the following:

- Unit tests of the wsdl2java logic that check the expected output (without compiling it or trying to use the generated code).

- Integration tests that compile the generated code.

- Integration tests that compile and use the generated code at runtime (start with wsdls on both ends of a wire, gen the java, compile, execute an end to end interaction).


One other point is that the generated code looks VERY poor - it's Java, but not as you'd write it. For an SDO used by a method, for example, instead of an import statement for the SDO class, followed by a variable declaration using the class, the full path to the class is used on every occasion it's referenced (YUK !!!!).

Agreed but needs to be done carefully, speaking after years of tooling development, I'd suggest to be very very careful when generating imports and ensure that they won't cause compile errors in conjunction with the user code available around the generated code. I'll be there to help test it after you turn the qualified references into imports. :)

This may require changes in:
- our WSDL2Java tool
- the Axis2 WSDL2Java that we use
- the SDO generator

 Worse, the test doesn't actually
generate these SDO classes - hence the code won't compile since they can't be found


That would be part of the integration test.

--
Jean-Sebastien

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

Reply via email to