Hi,
While i am deploying the sample of Spring-Axis2 integration example in tomcat server i am getting this error. I followed the tutorial which is given by apache(http://axis.apache.org/axis2/java/core/docs/spring.html).
ERROR: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: ServiceClass or ServiceObjectSupplier implmentation Object could not be found.
Please help me to solve this issue.
This is the project structure.
Appreciate your response.Code:SpringWebServiceApp |--SpringWebServiceApp.aar |--META-INF | | | |--MANIFEST.MF | |--services.xml |--WEB-INF | |--lib | | |--axiom-api-1.2.10.jar | | |--axiom-dom-1.2.10.jar | | |--axiom-impl-1.2.10.jar | | |--axis2-spring-1.5.1.jar | | |--spring-context-1.0.jar | | |--spring-full-1.0.1.jar | |--classes | | |--MyBean.class | | |--MyBeanImpl.class | | |--SpringAwareService.class | |--applicationContext.xml | |--web.xml File Contents: 1). services.xml <?xml version="1.0" encoding="UTF-8"?> <service name="SpringAwareService"> <description> simple spring example </description> <parameter name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter> <parameter name="SpringBeanName">springAwareService</parameter> <operation name="emerge"> <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/> </operation> </service> 2). MyBean.java /** Interface for Spring aware Bean */ public interface MyBean { String emerge(); } 3). MyBeanImpl.java /** Spring wired implementation */ public class MyBeanImpl implements MyBean { String str = null; // spring 'injects' this value public void setVal(String s) { str = s; } // web service gets this value public String emerge() { return str; } } 4). SpringAwareService.java import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; public class SpringAwareService { private MyBean myBean = null; //spring 'injects' this implementation public void setMyBean(MyBean myBean) { this.myBean = myBean; } // The web service public OMElement getValue(OMElement ignore) { OMFactory factory= OMAbstractFactory.getOMFactory(); OMNamespace payloadNs= factory.createOMNamespace( "http://springExample.org/example1", "example1"); OMElement payload = factory.createOMElement("string", payloadNs); OMText response = factory.createOMText(this.myBean.emerge()); payload.addChild(response); return payload; } } 5). applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- Axis2 Web Service, but to Spring, its just another bean that has dependencies --> <bean id="springAwareService" class="SpringAwareService"> <property name="myBean" ref="myBean"/> </bean> <!-- just another bean / interface with a wired implementation, that's injected by Spring into the Web Service --> <bean id="myBean" class="MyBeanImpl"> <property name="val" value="Spring, emerge thyself" /> </bean> </beans> 6). web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>SpringWebServiceApp</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> </web-app>
Thanks
Bharath


Reply With Quote
