users@jaxb.java.net

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

From: Campana Jr., Salvatore J <sal.campana_at_hp.com>
Date: Wed, 17 Dec 2003 14:42:21 -0500

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 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.

Does this make sense?







-----Original Message-----
From: Kohsuke Kawaguchi [mailto:Kohsuke.Kawaguchi_at_Sun.COM]
Sent: Wednesday, December 17, 2003 1:27 PM
To: users_at_jaxb.dev.java.net
Subject: Re: Generated Source uses wrong namespace issue....


I noticed envelope.xsd defines the "Envelope" element by itself.

Your EnvelopeElement interface is apparently generated from this
definition as its package name and its javadoc suggests.

And if you look at the javadoc of the Message type you defined,

> /**
> *
> * @return
> * possible object is
> * {_at_link com.mytest.schema.soap.Envelope}
> */
> com.mytest.schema.soap.Envelope getEnvelope();

It says you should use Envelope. I know this is bit confusing, but as
long as you use Envelope and not EnvelopeElement, things should fine.

You can delete the element declaration of "Envelope" from the SOAP
schema to avoid this confusion.


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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net