users@jaxb.java.net

Re: JAXB problem with "com.xyz.ReadSomething nor any of its super class is known to this context."

From: schneidc <simon.work_at_gmx.de>
Date: Fri, 21 May 2010 07:42:50 -0700 (PDT)

Hello Wolfgang,

your tip sounded promissing unfortunately so far it didn't work.

What I did was, extracted several schemas from one huge WSDL into several
xsds. The namespaces of the types declared in each schema match the package
name of my domain objects.
Then I generated new classes from this WSDL, took "package-info.java" and
"ObjectFactory.java" out of each package and put it into the according
package of my domain objects (which reside in another project btw). Then I
deleted all the generated "domain" objects and kept only the package which
contains the proxies for the services methods. So far no errors in my
projects and all I did (except from changing the wsdl) was generating,
copying and deleting files what made me very confident.

But still... when calling the service I get a "not known to this context"
exception. Could somehow be the reason that the files are spread over two
different projects?

Simon

Wolfgang Laun-2 wrote:
>
> I'm not sure whether I really understand the problem and what works and
> what
> not. (One paragraph says that the hacked classes don't work, another one
> says "did [...] adjustments [...] and it worked.) But it does look like a
> package/namespaces misfit. Consider adding a package-info.java with an
> XmlSchema annotation to your own patched domain classes, according to:
>
> https://jaxb.dev.java.net/tutorial/section_6_2_3-Annotations-for-the-Schema-XmlSchema.html#Annotations%20for%20the%20Schema:%20XmlSchema
>
> -W
>

-- 
View this message in context: http://old.nabble.com/JAXB-problem-with-%22com.xyz.ReadSomething-nor-any-of-its-super-class-is-known-to-this-context.%22-tp28631676p28634767.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.