Yeh, it is a typo making this mistake. Nothing wrong with Jibx. Thank you.
Rice
On 4/30/06, Dennis Sosnoski <dms@...> wrote:
>
> Just as an added note, I tried recreating the problem using:
>
> <structure name=3D"wrapper">
> <structure field=3D"name" usage=3D"required" type=3D"simple.Name"/>
> </structure>
>
> where simple.Name has a <mapping> with extensions. Works fine for me, so
> I suspect there's something else going on in your case.
>
> - Dennis
>
> Dennis Sosnoski wrote:
>
> > Hi Rice,
> >
> > I don't see anything wrong with this, offhand. The nested <structure>
> > construct is kind of ugly from the code generation standpoint, but as
> > far as I know should work. Can you add a bug report in Jira and supply
> > the code to reproduce the problem?
> >
> > - Dennis
> >
> > Rice Yeh wrote:
> >
> >> Hi all,
> >>
> >> I am mapping the XPDL 1.0 document, in which there is an element
> >> DataField with the following xsd
> >> <xsd:element name=3D"DataField">
> >> <xsd:complexType>
> >> <xsd:sequence>
> >> <xsd:element ref=3D"xpdl:DataType"/>
> >> <xsd:element ref=3D"xpdl:InitialValue"
> minOccurs=3D"0"/>
> >> <xsd:element ref=3D"xpdl:Length" minOccurs=3D"0"/>
> >> <xsd:element ref=3D"xpdl:Description" minOccurs=3D=
"0"/>
> >> <xsd:element ref=3D"xpdl:ExtendedAttributes"
> >> minOccurs=3D"0"/>
> >> </xsd:sequence>
> >> <xsd:attribute name=3D"Id" type=3D"xsd:NMTOKEN"
> >> use=3D"required"/>
> >> <xsd:attribute name=3D"Name" type=3D"xsd:string"/>
> >> <xsd:attribute name=3D"IsArray" default=3D"FALSE">
> >> <xsd:simpleType>
> >> <xsd:restriction base=3D"xsd:NMTOKEN">
> >> <xsd:enumeration value=3D"TRUE"/>
> >> <xsd:enumeration value=3D"FALSE"/>
> >> </xsd:restriction>
> >> </xsd:simpleType>
> >> </xsd:attribute>
> >> </xsd:complexType>
> >> </xsd:element>
> >> <xsd:element name=3D"DataType">
> >> <xsd:complexType>
> >> <xsd:group ref=3D"xpdl:DataTypes"/>
> >> </xsd:complexType>
> >> </xsd:element>
> >> <xsd:group name=3D"DataTypes">
> >> <xsd:choice>
> >> <xsd:element ref=3D"xpdl:BasicType"/>
> >> <xsd:element ref=3D"xpdl:DeclaredType"/>
> >> <xsd:element ref=3D"xpdl:SchemaType"/>
> >> <xsd:element ref=3D"xpdl:ExternalReference"/>
> >> <xsd:element ref=3D"xpdl:RecordType"/>
> >> <xsd:element ref=3D"xpdl:UnionType"/>
> >> <xsd:element ref=3D"xpdl:EnumerationType"/>
> >> <xsd:element ref=3D"xpdl:ArrayType"/>
> >> <xsd:element ref=3D"xpdl:ListType"/>
> >> </xsd:choice>
> >> </xsd:group> The following are 2 example elements
> >> <DataField Id=3D"Partial_Ship_Status" IsArray=3D"FALSE">
> >> <DataType>
> >> <DeclaredType Id=3D"Business_Example_Typ2"/>
> >> </DataType>
> >> <InitialValue>OK</InitialValue>
> >> <Description>possible values are: "OK" and
> >> "NOT_OK"</Description>
> >> </DataField>
> >> <DataField Id=3D"No_Of_Stocked_Items" IsArray=3D"FALSE">
> >> <DataType>
> >> <BasicType Type=3D"INTEGER"/>
> >> </DataType>
> >> <InitialValue>0</InitialValue>
> >> <Description>The number of the stocked items of the
> >> product that customer ordered</Description>
> >> </DataField>
> >> Here is my binding
> >> <mapping name=3D"DataField"
> >> class=3D"xs.workflow.xpdl10.DataField">
> >> <namespace uri=3D" http://www.wfmc.org/2002/XPDL1.0"
> >> default=3D"elements" />
> >> <structure name=3D"DataType">
> >> <structure field=3D"dataType" usage=3D"required"
> >> type=3D"xs.workflow.xpdl10.DataType" />
> >> </structure>
> >> <value name=3D"InitialValue" field=3D"initialValue"
> >> usage=3D"optional" />
> >> <value name=3D"Length" field=3D"length" usage=3D"optional"=
/>
> >> <value name=3D"Description" field=3D"description"
> >> usage=3D"optional" />
> >> <collection name=3D"ExtendedAttributes"
> >> field=3D"extendedAttributes"
> >> usage=3D"optional"
> >> item-type=3D"xs.workflow.xpdl10.ExtendedAttribute" />
> >> <value name=3D"Id" field=3D"id" usage=3D"required"
> >> style=3D"attribute" />
> >> <value name=3D"Name" field=3D"name" usage=3D"optional"
> >> style=3D"attribute" />
> >> <value name=3D"IsArray" field=3D"isArray" usage=3D"optiona=
l"
> >> style=3D"attribute" />
> >> </mapping>
> >> <mapping class=3D"xs.workflow.xpdl10.DataType"
> >> abstract=3D"true">
> >> <namespace uri=3D" http://www.wfmc.org/2002/XPDL1.0"
> >> default=3D"elements" />
> >> </mapping>
> >> <mapping name=3D"DeclaredType" class=3D"
> >> xs.workflow.xpdl10.DeclaredType"
> >> extends=3D"xs.workflow.xpdl10.DataType">
> >> <namespace uri=3D"http://www.wfmc.org/2002/XPDL1.0 "
> >> default=3D"elements" />
> >> <value ident=3D"ref" name=3D"Id" field=3D"id" usage=3D"req=
uired"
> >> style=3D"attribute" />
> >> </mapping>
> >> <mapping name=3D"EnumerationType"
> >> class=3D"xs.workflow.xpdl10.EnumerationType"
> >> extends=3D"xs.workflow.xpdl10.DataType">
> >> <namespace uri=3D" http://www.wfmc.org/2002/XPDL1.0"
> >> default=3D"elements" />
> >> <collection field=3D"enumerationValueList">
> >> <structure map-as=3D"
> >> xs.workflow.xpdl10.EnumerationValue"></structure>
> >> </collection>
> >> </mapping> ....
> >> , which has the structure (just with
> >> field=3D"dataType") nested in another structure (just with
> >> name=3D"DataField").
> >> I cannot find similar structure-nested-structure structure on
> >> JiBX's help documents, but I cannot find other
> >> solution for xsd. I can successly compile the mapping but I have
> >> a run time error seen below. The JiBX I use is
> >> version 1.0.1.
> >> as.util.ParseException: No unmarshaller defined for class
> >> at index 17
> >> at
> >> xs.workflow.xpdl10.PackageTransformer.transform(PackageTransformer.jav=
a
> :40)
> >>
> >> at xs.workflow.xpdl10.PackageTransformer
> >> .<init>(PackageTransformer.java:30)
> >> at
> >> xs.workflow.WorkflowBuilder.getPackage(WorkflowBuilder.java:66)
> >> at
> >> xs.workflow.xpdl10.PackageTransformerTest.testCase1(
> PackageTransformerTest.java:42)
> >>
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> >> Source)
> >> at java.lang.reflect.Method.invoke(Unknown Source)
> >> at junit.framework.TestCase.runTest(TestCase.java:154)
> >> at junit.framework.TestCase.runBare(TestCase.java:127)
> >> at junit.framework.TestResult$1.protect (TestResult.java:106)
> >> at junit.framework.TestResult.runProtected(TestResult.java:124=
)
> >> at junit.framework.TestResult.run(TestResult.java:109)
> >> at junit.framework.TestCase.run(TestCase.java:118)
> >> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >> at junit.framework.TestSuite.run(TestSuite.java:203)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> RemoteTestRunner.java
> >> :478)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> RemoteTestRunner.java:344)
> >>
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> RemoteTestRunner.java:196)
> >>
> >> Caused by: org.jibx.runtime.JiBXException: No unmarshaller
> >> defined for class at index 17
> >> at
> >> org.jibx.runtime.impl.UnmarshallingContext.getUnmarshaller(
> UnmarshallingContext.java:2425)
> >>
> >> at
> >>
> xs.workflow.xpdl10.JiBX_C__projects_XS_workflow_src_java_xs_workflow_xpdl=
10_bindingDataType_access.unmarshal
> >> ()
> >> at
> >>
> xs.workflow.xpdl10.DataField.JiBX_C__projects_XS_workflow_src_java_xs_wor=
kflow_xpdl10_binding_unmarshal_1_2
> (DataField.java)
> >>
> >> at
> >>
> xs.workflow.xpdl10.JiBX_C__projects_XS_workflow_src_java_xs_workflow_xpdl=
10_bindingDataField_access.unmarshal
> >> ()
> >> at
> >>
> xs.workflow.xpdl10.JiBX_MungeAdapter.JiBX_C__projects_XS_workflow_src_jav=
a_xs_workflow_xpdl10_binding_unmarshal_1_16
> ()
> >>
> >> at
> >>
> xs.workflow.xpdl10.Package.JiBX_C__projects_XS_workflow_src_java_xs_workf=
low_xpdl10_binding_unmarshal_1_0
> >> (Package.java)
> >> at
> >>
> xs.workflow.xpdl10.JiBX_C__projects_XS_workflow_src_java_xs_workflow_xpdl=
10_bindingPackage_access.unmarshal
> ()
> >>
> >> at
> >> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(
> UnmarshallingContext.java
> >> :2569)
> >> at
> >> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(
> UnmarshallingContext.java:2729)
> >>
> >> at
> >> xs.workflow.xpdl10.PackageTransformer.transform(PackageTransformer.jav=
a
> :37)
> >>
> >> ... 18 more
> >>
> >>
> >> Any solution?
> >> Regards,
> >> Rice
> >>
> >>
> >
> >
> >
> >
> > -------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services,
> security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> > _______________________________________________
> > jibx-users mailing list
> > jibx-users@...
> > https://lists.sourceforge.net/lists/listinfo/jibx-users
> >
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim=
o
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> jibx-users mailing list
> jibx-users@...
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
|