Announcement Announcement Module
Collapse
No announcement yet.
No endpoinf found. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No endpoinf found.

    Hi all , i'm at my first WebService using Spring.
    And i'm really becaoming with 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:
    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>
    Endpoint Impl:
    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;
    	}
    	
    	
    	
    	
    }
    Interface:
    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);
    
    }
    Using the TCPmonitor in Eclipse this is the SOAP message:
    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>
    And this is the Exception in my client:
    Code:
    Exception in thread "main" org.springframework.ws.client.WebServiceTransportException: Not Found [404]
    	at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
    i think that the problem is on Server,


    If anyone have a tip ... please let me know..
    Is first time i'm stuck with Spring

    Thanks in advance for any suggestion.
    T.
    Last edited by toriton; Oct 30th, 2009, 05:31 AM.

  • #2
    There is no declaration of your endpoint nor is there anything (context:component-scan) to detect your endpoint.

    Comment


    • #3
      Thanks for reply.
      yes the context scan was missing.

      but seem that scan can't find the package:

      Code:
      <context:component-scan base-package="com.test"  />
      Exception:
      Code:
      java.io.FileNotFoundException: D:\jboss-5.1.0.GA\server\default\deploy\WBmanSubAPJB.war\WEB-INF\classes\com\test
      and the war have that hierarchy.
      com.test package contain all my classes endpoint or not.

      I tried with
      Code:
      <context:component-scan base-package="classes.com.test"  />
      and the exception is not thrown but again i get the endpoint not found error.

      Comment


      • #4
        That exception has passed this forum a couple of times, you might want to do a search. The first element is the correct one, not the last one in your post.

        Comment


        • #5
          I followed this example:
          http://www.springbyexample.org/examp...-services.html

          And i ahve the same problem. The tutorial make a simple web service and a client but i'm blocked still at same error.

          Code:
          45,908 WARN  [EndpointNotFound] No endpoint mapping found for [SaajSoapMes
          http://www.springbyexample.org/person/schema/beans}get-persons-request]
          I'm looking in all posts around on this forum about this problem but i don't get still a solution.

          Comment

          Working...
          X