users@jaxb.java.net

Re: Generated Source uses wrong namespace issue....

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 17 Dec 2003 16:00:09 -0800

> I think the real issue is in the MessageImpl.serializeBody(....
>
> context.startElement("http://test.com/MyTest", "Envelope");
>
> Notice the namespace...This is what would be expected from looking at
> the schema, however there is a problem since when you look at
> EnvelopeImpl it is expecting the namespace
> "http://schemas.xmlsoap.org/soap/envelope/" ....so how can it
> deserialize it properly??

I'm not sure what you see as the problem. The EnvelopeImpl is in the
SOAP namespace and I think it's got the correct namespace.

> I guess based on the way you generate source you would have needed to
> generate a separate source file for Envelope in com.mytest.schema.test
> package with the namespace "http://test.com/MyTest" ....That is what I
> would have expected to see.

Because of the way your local Envelope element is defined in your schema,
it's not necessary to generate a separate class for it. People usually
don't like to see unnecessary classes, so that's why we don't generate
them.


Anyway, trust me, the schema you send me should work correctly. Just go
ahead and write some code, see if it actually produces the correct
output or not.

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net