We have Axis2 POJO services that are currently consumed by a C# client and we're adding a Java client. Generating equivalent stubs is turning out to be somewhat difficult.
We generate the classes using the .NET wsdl tool which has an option to share types between multiple services.
http://mymachine/appname/services/Service1?wsdl
http://mymachine/appname/services/Service2?wsdl
...ect
For the C# client we use the wsdl tool included with Visual Studio and life is wonderful
wsdl /n:MyPackage /out:ourservice-webservice.cs /sharetypes "http://mymachine/appname/services/Service1?wsdl" "http://mymachine/appname/services/Service2?wsdl"
Now we're trying to add a Java client and I'm running into an issue using the code generated from wsdl2java
wsdl2java -uri http://mymachine/appname/services/Service1?wsdl -uw -or -o src -p MyPackage
wsdl2java -uri http://mymachine/appname/services/Service2?wsdl -uw -or -o src -p MyPackage
This seemed to work until I tried to use a call from Service1 and one from Service2 that both use the type MyTransaction.
Right now the generated stubs show it as Service1Stub.MyTransaction and Service2Stub.MyTransaction which are of course different types.
This is a problem as we have to move objects back and forth across the two services. I assume there's an easy fix I'm missing?