Announcement Announcement Module
Collapse
No announcement yet.
regading generation of WSDL from schema Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • regading generation of WSDL from schema

    Hi ,i am trying to generate WSDL from XSD in net beans and tomcat server and i am getting following error

    root cause

    java.lang.NoClassDefFoundError: Could not initialize class org.springframework.ws.wsdl.wsdl11.provider.Inlini ngXsdSchemaTypesProvider
    org.springframework.ws.wsdl.wsdl11.DefaultWsdl11De finition.<init>(DefaultWsdl11Definition.java:56)
    sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
    org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:83)
    org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:61)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:911)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:873)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:514)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
    java.security.AccessController.doPrivileged(Native Method)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:455)
    org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
    org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
    org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:413)
    org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:735)
    org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:369)
    org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:3 32)
    org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:266 )
    org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:236)
    org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
    javax.servlet.GenericServlet.init(GenericServlet.j ava:211)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.apache.catalina.security.SecurityUtil$1.run(Se curityUtil.java:239)
    java.security.AccessController.doPrivileged(Native Method)
    javax.security.auth.Subject.doAsPrivileged(Subject .java:517)
    org.apache.catalina.security.SecurityUtil.execute( SecurityUtil.java:268)
    org.apache.catalina.security.SecurityUtil.doAsPriv ilege(SecurityUtil.java:157)
    org.apache.catalina.security.SecurityUtil.doAsPriv ilege(SecurityUtil.java:110)
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
    java.lang.Thread.run(Thread.java:619)









    my xsd is


    <?xml version="1.0" encoding="UTF-8"?>

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.netbeans.org/schema/HolidayRequest"
    xmlns:tns="http://xml.netbeans.org/schema/HolidayRequest"
    elementFormDefault="qualified">
    <xsd:element name="HolidayRequest">

    <xsd:complexType>
    <xsd:all>
    <xsd:element name="Holiday" type="tns:HolidayType"/>
    <xsd:element name="Employee" type="tns:EmployeeType"/>
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="HolidayType">
    <xsd:sequence>
    <xsd:element name="StartDate" type="xsd:date"/>
    <xsd:element name="EndDate" type="xsd:date"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="EmployeeType">
    <xsd:sequence>
    <xsd:element name="Number" type="xsd:integer"/>
    <xsd:element name="FirstName" type="xsd:string"/>
    <xsd:element name="LastName" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>


    and

    in dispatcher-servlet .xml i am making this entry'
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.springframework.org/schema/p"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.5.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.5.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

    <bean class="org.springframework.web.servlet.mvc.support .ControllerClassNameHandlerMapping"/>

    <!--
    Most controllers will use the ControllerClassNameHandlerMapping above, but
    for the index controller we are using ParameterizableViewController, so we must
    define an explicit mapping for it.
    -->
    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="index.htm">indexController</prop>
    </props>
    </property>
    </bean>

    <bean id="viewResolver"
    class="org.springframework.web.servlet.view.Intern alResourceViewResolver"
    prefix="/WEB-INF/jsp/"
    p:suffix=".jsp" />

    <!--
    The index controller.
    -->
    <bean name="indexController"
    class="org.springframework.web.servlet.mvc.Paramet erizableViewController"
    p:viewName="index" />
    <bean id="humanResource" class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition">
    <property name="schema" ref="schema"/>
    <property name="portTypeName" value="HumanResource"/>
    <property name="locationUri" value="/holidayService/"/>
    <property name="targetNamespace" value="http://mycompany.com/hr/definitions"/>


    </bean>

    <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
    <property name="xsd" value="/HolidayRequest.xsd"/>

    </bean>



    </beans>


    please help me as i am totally new to spring

    thanks in advance
Working...
X