[jboss-dev-forums] [Design of JBoss ESB] - Re: Webservice - SOAP - JAXB Introductions
Sylvia Isler
do-not-reply at jboss.com
Sun Aug 12 19:05:27 EDT 2007
Okay, I got my simple Jaxb-Intros example to work by modifying the schema in the following fashion:
I changed the schema from the original:
<?xml version="1.0" encoding="UTF-8"?>
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
| <xs:element name="UnitPrice">
| <xs:complexType>
| <xs:attribute name="value" type="xs:double" use="required"/>
| </xs:complexType>
| </xs:element>
| </xs:schema>
to
<?xml version="1.0" encoding="UTF-8"?>
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
| <xs:element name="UnitPrice">
|
| <xs:complexType>
| <xs:sequence>
| <xs:element name="value" type="xs:decimal" maxOccurs="1" minOccurs="0"/>
| </xs:sequence>
| </xs:complexType>
|
| </xs:element>
|
| </xs:schema>
the XML file to be unmarshalled is now:
<?xml version="1.0" encoding="UTF-8"?>
| <UnitPrice xsi:noNamespaceSchemaLocation="C:\UnitPriceNew.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <value>40.0</value>
| </UnitPrice>
|
The working jaxb-intros config file now looks like this:
<?xml version = "1.0" encoding = "UTF-8"?>
| <jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros">
| <Class name="junit.prices.UnitPrice">
| <XmlType name = "UnitPrice"/>
| <Field name="value">
| <XmlElement name="value" />
| </Field>
| </Class>
| </jaxb-intros>
|
Again, thanks for your suggestions and thanks for Jaxb-intros.
Regards,
Sylvia
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073405#4073405
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073405
More information about the jboss-dev-forums
mailing list