[Design of JBoss ESB] - Re: Webservice - SOAP - JAXB Introductions
by Sylvia Isler
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
18 years, 7 months
[Design of JCA on JBoss] - Re: JCA AOP-MC Integration
by vickyk
I am not sure what is going wrong now , I have noticed that the earlier dependencies which were present at http://repository.jboss.com/maven2/org/jboss/ are no longer available .
I used to have jboss-aop-mc-int and jboss-kernel from the above location .
I tried to modify the dependencies to
http://repository.jboss.com/maven2/jboss/jboss-kernel and
http://repository.jboss.com/maven2/jboss-aop-mc-int but have not been able to get it working .
I get land up on following exception
| -------------------------------------------------------------------------------
| Test set: org.jboss.test.jca.notx.test.NoTxUnitTestCase
| -------------------------------------------------------------------------------
| Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.201 sec <<< FAILURE!
| org.jboss.test.jca.notx.test.NoTxUnitTestCase Time elapsed: 1,186,940,713.14 sec <<< ERROR!
| java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
| at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
| at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
| at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:120)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
| at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.setUp(MicrocontainerTestDelegate.java:69)
| at org.jboss.test.AbstractTestSetup.setUp(AbstractTestSetup.java:63)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
| Caused by: java.lang.NoSuchMethodError: org.jboss.joinpoint.plugins.BasicJoinpointFactory.<init>(Lorg/jboss/reflect/spi/ClassInfo;Lorg/jboss/repository/spi/MetaDataContext;)V
| at org.jboss.aop.microcontainer.integration.AOPJoinpointFactory.<init>(AOPJoinpointFactory.java:55)
| at org.jboss.aop.microcontainer.integration.AOPJoinpointFactoryBuilder.createJoinpointFactory(AOPJoinpointFactoryBuilder.java:39)
| at org.jboss.aop.microcontainer.integration.AOPJoinpointFactoryBuilder.createJoinpointFactory(AOPJoinpointFactoryBuilder.java:44)
| at org.jboss.classadapter.plugins.BasicClassAdapter.getJoinpointFactory(BasicClassAdapter.java:69)
| at org.jboss.beans.info.plugins.AbstractBeanInfo.getJoinpointFactory(AbstractBeanInfo.java:171)
| at org.jboss.kernel.plugins.config.Configurator.findConstructor(Configurator.java:211)
| at org.jboss.kernel.plugins.config.Configurator.getConstructorJoinPoint(Configurator.java:195)
| at org.jboss.kernel.plugins.config.Configurator.instantiate(Configurator.java:93)
| at org.jboss.kernel.plugins.config.Configurator.instantiateAndConfigure(Configurator.java:69)
| at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:159)
| at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:118)
| at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
| ... 23 more
| ... 23 more
|
|
Can anyone point this dependency ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073395#4073395
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073395
18 years, 7 months
[Design of JBoss ESB] - Re: Webservice - SOAP - JAXB Introductions
by Sylvia Isler
Thanks for the response and the very useful debugging suggestions. I ended up getting the UnitPrice class implementation below to work in example to work in JAXB-proper.
without the @XmlTransient tag on getValue() I observed an illegal annotations error indicating that the attribute value and the method getValue() are somehow duplicating eachother as far as JAXB is concerned.
Now, I am wondering whether XmlRootElement and XmlTransient are necessary annotations in JaxbIntros to make this sort of example work?
@XmlRootElement(name="UnitPrice")
| public class UnitPrice {
|
| @XmlAttribute private double value;
| UnitPrice(double value){
| this.value=value;
| }
| UnitPrice()
| {
|
| }
|
| @XmlTransient
| public double getValue()
| {
| return this.value;
| }
| public void setValue(double v){
| this.value = v;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073200#4073200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073200
18 years, 8 months