You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Reda Kolli <re...@mitratech.com> on 2004/01/19 21:33:12 UTC

Problems using a restricted simple type

Hello,

    However I declare and use a simple type with restictions, I get the 
following error when the schema is parsed:

    LocSAXException: Unable to derive package name from an empty 
namespace URI. Use the schemaBindings to specify a package name.

Sincerely,
Reda.



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Problems using a restricted simple type

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Reda Kolli wrote:

>    However I declare and use a simple type with restictions, I get the 
> following error when the schema is parsed:
> 
>    LocSAXException: Unable to derive package name from an empty 
> namespace URI. Use the schemaBindings to specify a package name.

This is not related to using simple types. The problem is simply, that JaxMe 
doesn't have a clue, in which package the generated sources should live. The 
default behaviour is to derive the package name from the target namespace 
(for example http://ws.apache.org/jaxme/test => org.apache.ws.jaxme.test). 
If there is no target namespace (as seems to be the case in your example), 
you need an explicit package specification. The explicit package 
specification may be on the command line (aka in the Ant build script) or in 
  the JAXB schema bindings, as in:

     <xs:schema ...>
       <xs:annotation><xs:appinfo>
         <jaxb:schemaBindings>
           <jaxb:package name="com.mitratech.xml"/>
         </xs:schemaBindings>

The command line specification takes precedence.

I can imagine that you did specify a package name on the command line, but 
not in the schema. If so, please let us know, because that would be a bug.


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org