[
http://jira.codehaus.org/browse/JIBX-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116369
]
Andy Biewer commented on JIBX-137:
----------------------------------
You seem to be implying that we had the time to even think about these issues
while we were building this application from the ground up in 3 months. As it
were, the project was under very compressed timelines and, being what it is,
this is what happened. Albeit, not a good choice, but it is what it is.
And yes, I did get it to work, as I stated in my comment above. For example:
<mapping name="Org" class="orgLst.Org">
<namespace uri="prodDtlInqReq" default="elements"/>
<namespace uri="" prefix="xyz"/>
<value name="OrgID" set-method="setOrgID" get-method="getOrgID" ns=""/>
</mapping>
BTW, "they're" should be "their".
> binding compiler: xmlns="" not supported
> -----------------------------------------
>
> Key: JIBX-137
> URL: http://jira.codehaus.org/browse/JIBX-137
> Project: JiBX
> Issue Type: Bug
> Components: Generator Tools
> Affects Versions: JiBX 1.1
> Environment: Windows XP Pro, Java JDK 1.4.2
> Reporter: Andy Biewer
>
> Synopsis of the problem:
> globals.xsd:
> <xs:schema xmlns="globals" targetNamespace="globals"
> elementFormDefault="unqualified">
> <xs:simpleType name="idType">
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:schema>
> NOTE: The issue hinges on the elementFormDefault being set to unqualified.
> request.xsd:
> <xs:schema xmlns="request" targetNamespace="request" xmlns:g="globals"
> elementFormDefault="qualified">
> <xs:import namespace="globals" schemaLocation="globals.xsd"/>
> <xs:element name="req">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="id" type="g:idType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> request.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <req xmlns="request">
> <id xmlns="">123</id>
> </req>
> binding.xml
> <binding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="binding.xsd">
> <mapping name="req" class="...">
> <namespace uri="request" default="elements"/>
> <value name="id" field="id" ns=""/>
> </mapping>
> </binding>
> When I try running the binding compiler against this binding, I receive the
> following error:
> Running binding compiler version jibx_1_1
> Error running binding compiler
> *** Error during code generation - please enter a bug report for this error
> in Jira if the problem is not listed as fixed on the online status page ***
> org.jibx.runtime.JiBXException: Undefined or unusable namespace ""
> at
> org.jibx.binding.def.NameDefinition.fixNamespace(NameDefinition.java:143)
> at
> org.jibx.binding.def.BindingBuilder.unmarshalValue(BindingBuilder.java:553)
> at
> org.jibx.binding.def.BindingBuilder.unmarshalStructureChildren(BindingBuilder.java:848)
> at
> org.jibx.binding.def.BindingBuilder.unmarshalMapping(BindingBuilder.java:1651)
> at
> org.jibx.binding.def.BindingBuilder.unmarshalMappings(BindingBuilder.java:983)
> at
> org.jibx.binding.def.BindingBuilder.unmarshalBindingDefinition(BindingBuilder.java:1837)
> at org.jibx.binding.Utility.loadBinding(Utility.java:293)
> at org.jibx.binding.Utility.loadFileBinding(Utility.java:413)
> at org.jibx.binding.Compile.compile(Compile.java:296)
> at org.jibx.binding.Compile.main(Compile.java:385)
> I tried running xsd2jibx against the schema to see what code it would
> generate and it produced a binding.xml without the ns="" attribute. However,
> this would cause the sample.xml provided to generate an error when parsing
> since it JiBX thinks the <id> tag should be a part of the request namespace.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs