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

  • No endpoint mapping found for SaajSoapMessage

    Hello,
    I have got "No endpoint mapping found for SaajSoapMessage" when testing my spring-ws from SOAP-UI.
    I'm using EndPoint

    The project is located in: https://lifegoodwithria.googlecode.com/svn/trunk/WS

    My spring-ws-servlet.xml is
    ----------------------------------------------------------------------------------------------------------------------------
    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:context="http://www.springframework.org/schema/context"
    	xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:mvc="http://www.springframework.org/schema/mvc"
    	xsi:schemaLocation="
          http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schem...ng-context.xsd
          http://www.springframework.org/schema/mvc http://www.springframework.org/schem...ng-mvc-3.0.xsd
          http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd">
    
    	<context:annotation-config />
    	
    	<bean class="ws.PersonEndPoint">
    	</bean>
    	
    	
    	<bean id="schemaPerson" class="org.springframework.xml.xsd.SimpleXsdSchema">
    		<property name="xsd" value="/WEB-INF/schemas/person.xsd" />
    	</bean>
    	
    	<bean name="PersonService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
    		<property name="targetNamespace" value="http://muhasebat.gov.tr/services/personservice" />
    		<property name="schema" ref="schemaPerson"/>
    		<property name="portTypeName" value="PersonService" />
    		<property name="serviceName" value="PersonService" />
    		<property name="locationUri" value="/services/PersonService"/>
    		<property name="soapActions">
    			<map>
    				<entry key="GetPersonRequest" value="http://muhasebat.gov.tr/services/personservice/PersonService" />
    			</map>
    		</property>
    	</bean>
    
    
    	
    	<bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    		<property name="classesToBeBound">
    			<list>
    				<value>tr.gov.muhasebat.services.personservice.GetPersonRequest</value>
    				<value>tr.gov.muhasebat.services.personservice.GetPersonResponse</value>
    				<value>tr.gov.muhasebat.services.personservice.Person</value>
    			</list>
    		</property>
    	</bean>
    
    
    	<bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
    		<property name="marshaller" ref="jaxb2Marshaller" />
    		<property name="unmarshaller" ref="jaxb2Marshaller" />
    	</bean>
    	
    	
    
    	<bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
    		<property name="marshaller" ref="jaxb2Marshaller" />
    		<property name="unmarshaller" ref="jaxb2Marshaller" />
    	</bean>
    	
    	
    
    </beans>

    Endpoint is:
    ----------------------------------------------------------------------------------------------------------------------------
    Code:
    package ws;
    
    import org.springframework.ws.server.endpoint.annotation.Endpoint;
    import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
    
    import tr.gov.muhasebat.services.personservice.GetPersonRequest;
    import tr.gov.muhasebat.services.personservice.GetPersonResponse;
    import tr.gov.muhasebat.services.personservice.Person;
    
    
    @Endpoint
    public class PersonEndPoint{
    	public static final String PERSON_NAME_SPACE = "http://muhasebat.gov.tr/services/personservice";
    
    	@PayloadRoot(localPart ="GetPersonRequest",namespace=PERSON_NAME_SPACE)
    	public GetPersonResponse getPerson(GetPersonRequest request) {
    		GetPersonResponse resp = new GetPersonResponse();
    		String name = request.getName();
    		System.out.println("Method invoced at last " + name);
    		Person p = new Person();
    		p.setFirstName("AAA");p.setLastName("YYY");
    		resp.getPerson().add(p);
    		return resp;
    	}
    	 
    }
    person.xsd
    ----------------------------------------------------------------------------------------------------------------------------
    Code:
    <xsd:schema xmlns="http://muhasebat.gov.tr/services/personservice"
                targetNamespace="http://muhasebat.gov.tr/services/personservice"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    
        <xsd:element name="GetPersonRequest">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="name" type="xsd:string" />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        
        <xsd:element name="GetPersonResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="person" type="person" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    
        <xsd:complexType name="person">
            <xsd:sequence>
                <xsd:element name="id" type="xsd:int" />
                <xsd:element name="first-name" type="xsd:string" />
                <xsd:element name="last-name" type="xsd:string" />
            </xsd:sequence>
        </xsd:complexType>
    
    </xsd:schema>
    Thanks in advanced....
    Last edited by kor_oglu; Sep 27th, 2010, 02:52 AM. Reason: Missing [Code Tag]

  • #2
    Hi

    Please use [code] tags!

    The problem is that you have really two servlets:
    • DispatcherServlet (Spring MVC), configured with three XMLs
    • MessageDispatcherServlet (Spring WS), configured with /WEB-INF/spring/spring-ws-servlet.xml

    They both have parent, condfigured with /WEB-INF/spring-ws-servlet.xml.

    So spring-ws-servlet.xml is really used 3 times.

    First - get rid of contextConfigLocation in web.xml
    Second - in app-config.xml change:
    Code:
    	<context:component-scan base-package="ws" />
    to
    Code:
    	<context:component-scan base-package="ws.client" />
    so Dispatcher servlet won't pick up your endpoint - it should be picked up only by MessageDispatcherServlet

    Third - uncomment:
    Code:
    <bean class="ws.PersonEndPoint"></bean>
    in your spring-ws-servlet.xml, because this context isn't configured to scan components.

    I've checked your SVN code - it works

    regards
    Grzegorz Grzybek

    Comment


    • #3
      Best support

      First of all it works!

      Second; This is the best support that i have ever got.

      When i have so much confused with the problem, you gave me the light which i forget to look at.
      (web.xml: 2 servlets etc)

      thanks a lot again
      Last edited by kor_oglu; Sep 27th, 2010, 02:54 AM. Reason: English grammer

      Comment

      Working...
      X