aspose file tools*
The moose likes Web Services and the fly likes WSDL2JAVA Namespace Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "WSDL2JAVA Namespace Issue" Watch "WSDL2JAVA Namespace Issue" New topic
Author

WSDL2JAVA Namespace Issue

M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
I generated Java code from the WSDL. I own the service and I wrote a test client and the soap which got generated was like this:


However my external client wants them like this:





Aren't the namespace for xyz the same in both scenarios? So, why my Java Service Implementation code doesn't fetch me the data? I get a null when I try to access abc through code.

>
M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
My service also likes:
>
M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
Found the answer. The schema needed to have elementFormDefault="qualified".

The error was with abc where if xmlns was used on xyz, abc used the same namespace and not in the other scenario.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: WSDL2JAVA Namespace Issue