Hi all , i'm at my first WebService using Spring.
And i'm really becaomingwith this:
10:20:08,983 WARN [EndpointNotFound] No endpoint mapping found for [SaajSoapMessage {http://www.test.com/schema}creditcheckRequest]
I'm using the latest version of spring-ws, and deploying my ".war" on Jboss 5.
This the spring-ws file:
Code:<?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:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <!-- <bean id="ManSubAPWSDL" class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">--> <!-- <constructor-arg value="/WEB-INF/ManageSubscriptionAP.wsdl" />--> <!-- </bean>--> <bean id="managesubscriptionAP" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" p:portTypeName="ManageSubscriptionAP" p:locationUri="/CREDITCHECKRequest/" p:targetNamespace="http://www.test.com/schema"> <property name="schema"> <bean class="org.springframework.xml.xsd.SimpleXsdSchema"> <property name="xsd" value="/WEB-INF/prova.xsd"/> </bean> </property> </bean> <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping" > </bean> <bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter"> <constructor-arg ref="marshaller"/> </bean> <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="classesToBeBound"> <list> <value>com.test.schema.CreditcheckRequest</value> <value>com.test.schema.CreditcheckResponse</value> </list> </property> <property name="schema" value="/WEB-INF/prova.xsd"></property> </bean> </beans>
the Web.xml:
Endpoint Impl:Code:<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>Manage Subscription Services</display-name> <!-- take especial notice of the name of this servlet --> <servlet> <servlet-name>spring-ws</servlet-name> <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> <init-param> <param-name>transformWsdlLocations</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring-ws</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app>
Interface:Code:package com.test.endpoint; import org.springframework.ws.server.endpoint.annotation.Endpoint; import org.springframework.ws.server.endpoint.annotation.PayloadRoot; import com.test.endpoint.marshalling.MarshallingCreditCheckService; import com.test.schema.CreditcheckRequest; import com.test.schema.CreditcheckResponse; @Endpoint public class ManageSubscriptionEndpoint implements MarshallingCreditCheckService{ public ManageSubscriptionEndpoint() { super(); } @PayloadRoot(localPart=CREDIT_CHECK_REQUEST,namespace=NAMESPACE) public CreditcheckResponse creditCheck(CreditcheckRequest request) { CreditcheckResponse resp = new CreditcheckResponse(); resp.setRESULT("00"); return resp; } }
Using the TCPmonitor in Eclipse this is the SOAP message:Code:package com.test.endpoint.marshalling; import com.test.schema.CreditcheckRequest; import com.test.schema.CreditcheckResponse; public interface MarshallingCreditCheckService { public final static String NAMESPACE = "http://www.test.com/schema"; public final static String CREDIT_CHECK_REQUEST = "creditcheckRequest"; /** * Gets person list. */ public CreditcheckResponse creditCheck(CreditcheckRequest request); }
And this is the Exception in my client:Code:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns2:creditcheckRequest xmlns:ns2="http://www.test.com/schema"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
i think that the problem is on Server,Code:Exception in thread "main" org.springframework.ws.client.WebServiceTransportException: Not Found [404] at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
If anyone have a tip ... please let me know..
Is first time i'm stuck with Spring
Thanks in advance for any suggestion.
T.


with this:
Reply With Quote