Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.1, 1.2 Beta, 1.4
-
None
-
Any J2EE Server
Description
Error Summary:
Anonymous types are named in the SymbolTable with the ANON_TOKEN prefix (">"). This causes a problem for the makeTypeElement method invoked by writeType.
Initial Diagnostic:
There seems to be a contradiction here, makeTypeElement doesn't allow anonymous types outside of a containing element, whereas writeType invokes makeTypeElement specifying "null" as the containing element.
makeTypeElement code snippet:
// Can't have an anonymous type outside of a containing element
if (anonymous && (containingElement == null))
writeType code snippet:
if (!makeTypeElement(type, qName, null))
{ return null; }How to reproduce the error:
Use WSDL2Java to create client and server-side bindings (with skeleton) from the attached files.
Compile the javas and deploy the jar to your application server (JBoss in my case).
Deploy the Web Service using the deploy.wsdd
Try to obtain the WSDL from the deployed service. The following error results:
Fault - makeTypeElement() was told to create a type "
{urn:anontype}>AnonRequest", with no containing element
AxisFault
faultCode:
Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type "
>AnonRequest", with no containing element
faultActor:
faultNode:
faultDetail:
Workaround:
Make sure types are named (note that this is not always a possible solution, for example for third-party WSDLs, hence Priority=Major).
See Related Issues: