My Oracle Support Banner

JAX-WS Naming Issue with @webmethod Using WRAPPED Convention (Doc ID 988792.1)

Last updated on OCTOBER 09, 2020

Applies to:

Oracle WebLogic Server - Version 10.3 and later
Information in this document applies to any platform.


The issue occurs when webmethod is of the following format:
       public xxxxxResponse xxxxx(MyTestRequest message)

For example:
       public TestResponse test(MyTestRequest message)

After creating the JAX-WS webservice, the following exception is thrown, upon deployment of this webservice:

Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://<hostname_examples>.org}testResponse". Use and @XmlType.namespace to assign different names to them. this problem is related to the following location:
at examples.webservices.simple.TestResponse
at private <package_examples>.webservices.simple.TestResponse examples.webservices.simple.jaxws.TestResponse._return
at <package_examples>.webservices.simple.jaxws.TestResponse this problem is related to the following location:
at <package_examples>.webservices.simple.jaxws.TestResponse
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(
at com.sun.xml.bind.v2.ContextFactory.createContext(
at com.sun.xml.bind.api.JAXBRIContext.newInstance(
Truncated. see log file for complete stacktrace


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.