Hi,
I am new to Spring-WS.
First I ran the sample Echo example on my tomcat. It is running successfully.
Now I have creating my own webservices: I started as follows:
1. Created response xml and created corresponding xsd using some tool.
2. Created EndPointClass, service interface and its class.
3. Then I put entries in web.xml and spring-ws-servlet.xml.
but now when I am hitting the URL to generate the WSDL I am getting the following error:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'customer' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Cannot resolve reference to bean 'schema' while setting bean property 'schema'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'schema' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: xsd 'class path resource [WEB-INF/customer.xsd]' does not exit
org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1245)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1010)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:472)
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
Here is my spring-ws-servlet.xml
ThanksCode:<bean id="customer" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <description> This bean definition represents a WSDL definition that is generated at runtime. It can be retrieved by going to /ciaservices/customer.wsdl (i.e. the bean name corresponds to the filename). </description> <property name="schema" ref="schema"/> <property name="portTypeName" value="Customer"/> <property name="locationUri" value="http://localhost:8080/ciaservices/customer"/> </bean> <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema"> <description> This bean definition contains the XSD schema. </description> <property name="xsd" value="/WEB-INF/customer.xsd"/> </bean> <bean id="customerService" class="com.cia.ws.customer.services.CustomerProfileServiceImpl"> <description> This bean is our "business" service. </description> </bean> <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping"> <property name="mappings"> <props> <prop key="{http://cia.com/customer/customersegments}CustomerProfileRequest">customerEndpoint</prop> </props> </property> <property name="interceptors"> <bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/> </property> </bean> <bean id="validatingInterceptor" class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"> <description> This interceptor validates both incoming and outgoing message contents according to the 'customer.xsd' XML Schema file. </description> <property name="xsdSchema" ref="schema"/> <property name="validateRequest" value="false"/> <property name="validateResponse" value="true"/> </bean>![]()


Reply With Quote
ositiveInteger">