- This topic has 5 replies, 3 voices, and was last updated 17 years, 4 months ago by Brian Fernandes.
-
AuthorPosts
-
Jacques SingyMemberI created a WSDL which uses a xsd:import to import xml elements used in the message definition. When I generate the web service, everything works fine; the xmlbeans classes get generated. But when I try to run it, I get an error. The TypeSystemHolder class cannot be found. I also cannot find that class in my eclipse project.
StackTrace:java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.sFE934BA144B00089F8D27916441B3B44.TypeSystemHolder at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769) at org.xsd.efficientforms.BackgroundCheckDocument.<clinit>(BackgroundCheckDocument.java:20) at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917) at java.lang.reflect.Field.getFieldAccessor(Field.java:898) at java.lang.reflect.Field.get(Field.java:357) at org.apache.xmlbeans.XmlBeans.typeForClass(XmlBeans.java:844) at org.codehaus.xfire.xmlbeans.XmlBeansType.<init>(XmlBeansType.java:73) at org.codehaus.xfire.xmlbeans.XmlBeansTypeCreator.createXmlBeanType(XmlBeansTypeCreator.java:66) at org.codehaus.xfire.xmlbeans.XmlBeansTypeCreator.createType(XmlBeansTypeCreator.java:56) at org.codehaus.xfire.aegis.AegisBindingProvider.getSuggestedName(AegisBindingProvider.java:255) at org.codehaus.xfire.service.binding.DefaultServiceConfiguration.getInParameterName(DefaultServiceConfiguration.java:162) at org.codehaus.xfire.service.binding.ObjectServiceFactory.getInParameterName(ObjectServiceFactory.java:1063) at org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:817) at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:761) at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:444) at org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:176) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320) at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:107) at org.codehaus.xfire.spring.XFireConfigLoader.loadContext(XFireConfigLoader.java:41) at org.codehaus.xfire.transport.http.XFireConfigurableServlet.loadConfig(XFireConfigurableServlet.java:86) at org.codehaus.xfire.transport.http.XFireConfigurableServlet.createXFire(XFireConfigurableServlet.java:54) at org.codehaus.xfire.transport.http.XFireServlet.init(XFireServlet.java:45)
wsdl:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="efficientforms" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.example.org/efficientforms/" xmlns:tns="http://www.example.org/efficientforms/" xmlns:eff="http://www.xsd.org/efficientforms/"> <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:import namespace="http://www.xsd.org/efficientforms/" schemaLocation="efficientforms.xsd"> </xsd:import> </xsd:schema> </wsdl:types> <wsdl:message name="BackGroundCheck"> <wsdl:part name="parameters" element="eff:BackgroundCheck"></wsdl:part> </wsdl:message> <wsdl:message name="BackGroundCheckResponse"> <wsdl:part name="parameters" element="eff:BackgroundCheckResponse"> </wsdl:part> </wsdl:message> <wsdl:portType name="BackGroundCheck"> <wsdl:operation name="BackGroundCheck"> <wsdl:input message="tns:BackGroundCheck"></wsdl:input> <wsdl:output message="tns:BackGroundCheckResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="BackGroundCheckHttpBinding" type="tns:BackGroundCheck"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="BackGroundCheck"> <soap:operation soapAction="http://www.example.org/efficientforms/BackGroundCheck" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="BackGroundCheckService"> <wsdl:port name="BackGroundCheckService" binding="tns:BackGroundCheckHttpBinding"> <soap:address location="http://localhost:8081/SFEfficientFoms/services/BackGroundCheckService" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
xml schema
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns:tns="http://www.example.org/efficientforms/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.xsd.org/efficientforms/"> <element name="BackgroundCheck"> <complexType> <sequence> <element name="FirstName" type="string" maxOccurs="1" minOccurs="1"> </element> <element name="LastName" type="string" maxOccurs="1" minOccurs="1"> </element> </sequence> </complexType> </element> <element name="BackgroundCheckResponse"> <complexType> <sequence> <element name="ResponseCode" type="nonNegativeInteger" minOccurs="1" maxOccurs="1"> </element> <element name="ResponseDescription" type="string" minOccurs="0" maxOccurs="1"> </element> </sequence> </complexType> </element> </schema>
Riyad KallaMemberI’m sorry for the delay in responding, this got lost on my TODO list.
Can you double-check your project build path and make sure you have included the XML Beans library in your build path? Also can you check the deployed location to make sure the XML Beans JARs are getting deployed? That seems to be the issue.
Jacques SingyMemberI believe that the schemaorg_apache_xmlbeans.system.sFE934BA144B00089F8D27916441B3B44.TypeSystemHolder class is a class generated by the xmlbeans compiler. When I use scomp against my wsdl, this class gets generated. But when I use the MyEclipse plugin to generate a webservice from a wsdl (with the xmlbeans bindings option), it seems to generate all the classes except the classes in schemaorg_apache_xmlbeans.
Riyad KallaMemberI will make a note to follow up with our WS team about this.
In the mean time is a viable workaround (temporary) to use the JAXB bindings?
Jacques SingyMemberWhat I do is generate the xmlbeans classes with the xmlbeans compiler (scomp) and delete the classes generated by MyEclipse and everything works fine.
Brian FernandesModeratorI managed to replicate and track this error down. I think you also need the XSB files generated by scomp which the ME generator does not generate?
I’ve file a bug report about this and we’ll try to get this fixed for the next release. Thanks for helping us track it down.
-
AuthorPosts