Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: WS-Adressing with sws:annotation-driven

  1. #1
    Join Date
    Feb 2005
    Posts
    13

    Default WS-Adressing with sws:annotation-driven

    Hello together,

    during upgrade from Spring-WS 1.5.9 to 2.0.0 I tried to change my well working XML-configuration to annotations using <sws:annotation-driven/>.

    Now only my webservice without WS-Adressing is running, but not the webservice with WS-Adressing.

    I get the following error message:

    WARN [EndpointNotFound.dispatch(238)] : No endpoint mapping found for [SaajSoapMessage {http://company.com/orderingsystem}SalesOrderStatusByPONumberQueryRequ est]

    I didnīt find any working examples with sws:annotation-driven and WS-Adressing. Does anybody has experience with that?

    Regards
    Sam

  2. #2
    Join Date
    Feb 2011
    Posts
    1

    Default

    Hello,

    I had the same problem as below:

    Quote Originally Posted by saemmy View Post
    WARN [EndpointNotFound.dispatch(238)] : No endpoint mapping found for [SaajSoapMessage {http://company.com/orderingsystem}SalesOrderStatusByPONumberQueryRequ est]
    Fixed it by adding :

    <bean class="org.springframework.ws.soap.addressing.serv er.AnnotationActionEndpointMapping" />

    in my spring context xml.

    It looks like the <sws:annotation-driven /> does not triggers the AnnotationActionEndpointMapping to load.

    Only the SoapActionAnnotationMethodEndpointMapping and PayloadRootAnnotationMethodEndpointMapping are loaded in the AnnotationDrivenBeanDefinitionParser.

    I will report a bug in JIRA (edit: SWS-691 - Annotation-driven tag does not support ws-addressing @Action) for this.

    Regards,
    Willem
    Last edited by willemvd; Feb 8th, 2011 at 05:52 AM. Reason: JIRA entry

  3. #3
    Join Date
    Jul 2006
    Posts
    11

    Default

    Hi all,

    I do have the same situation: migrating from 1.5.7 to 2.0.0.

    Everything was working perfectly good, then I added the @Endpoint to the endpoints and in the spring context removed all the mapping. Just have the <sws:annotation-driven /> and <sws:dynamic-wsdl />

    But then i get the error "No endpoint mapping found".

    They just work when i explicit set the bean for the Endpoint class and add in a mapping for PayloadRootQNameEndpointMapping.

    I have no idea why the classes annotated with @Endpoint are not being mapped as they should.

    the problem is that using the spring-ws 2.0 i have to add @Endpoint AND also map all the endpoints in a XMl file....

    Any tip?

    spring-ws-servlet.xml
    Code:
    <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:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:sws="http://www.springframework.org/schema/web-services"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
        http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd">
    
    
        <sws:annotation-driven />
    
    
    
    	<bean id="placeHodlerConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        	<property name="locations">
        		<list>
        			<value>classpath*:webservices.properties</value>
        		</list>
        	</property>
        </bean>
        <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping" />
    <sws:dynamic-wsdl id="someSystem" portTypeName="SomeSystemPortType" locationUri="${somesystem.ws.location.wsdl}">
            <sws:xsd location="${somesystem.ws.location.xsd}"/>
        </sws:dynamic-wsdl>
    
    </beans>

    web.xml
    Code:
    <!-- Spring WS -->
    	<servlet>
    	    <servlet-name>spring-ws</servlet-name>
    	    <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    	</servlet>
    	<servlet-mapping>
    	    <servlet-name>spring-ws</servlet-name>
    	    <url-pattern>/services/*</url-pattern>
    	</servlet-mapping>
        <!-- Spring WS -->

  4. #4
    Join Date
    Dec 2010
    Posts
    315

    Default

    Have you tried annotating your endpoint with @ResponsePayload and @RequestPayload like the following:

    Code:
    @PayloadRoot(localPart = REQUEST_LOCAL_NAME, namespace = NAMESPACE_URI)
     @ResponsePayload
     public SubscriptionResponse processSubscription( @RequestPayload SubscriptionRequest subscriptionRequest) {
    For more info see http://krams915.blogspot.com/2010/12...ing-3-mvc.html

  5. #5
    Join Date
    Jul 2006
    Posts
    11

    Default

    Sorry, forgot to attach the code... But yes, i did use those annotations also... But with no result....


    Well, for now i just downgrade back to Spring-WS 1.5.7.... Then I will try to start a project from scratch and see if it's work... Then try to put the old project into the new one...


    thanks!


    Quote Originally Posted by skram View Post
    Have you tried annotating your endpoint with @ResponsePayload and @RequestPayload like the following:

    Code:
    @PayloadRoot(localPart = REQUEST_LOCAL_NAME, namespace = NAMESPACE_URI)
     @ResponsePayload
     public SubscriptionResponse processSubscription( @RequestPayload SubscriptionRequest subscriptionRequest) {
    For more info see http://krams915.blogspot.com/2010/12...ing-3-mvc.html

  6. #6

    Default

    using the spring-ws 2.0 i have to add @Endpoint AND also map all the endpoints in a XMl file
    No it is "old school" .
    Just on line is enough tio detect them :

    Code:
    <context:component-scan 
      base-package="fr.yourCOmpany.endpoint,fr.yourCOmpany2.endpoint" />
    Need help on Spring WS ? Do you want to shift gears and build the architecture of your spring ws with half of the price that will be for your company ? I have worked on Spring Ws 1,5 year at full time and build around80 WS with full dao testing and integration tests with Soapui with Maven 2 on hudson

  7. #7
    Join Date
    Jul 2006
    Posts
    11

    Default

    Code:
    <context:component-scan 
      base-package="fr.yourCOmpany.endpoint,fr.yourCOmpany2.endpoint" />
    Thatīs the only thing i didnīt do... but shouldnīt all packages of my project be scanned by default? Or do i have to force the scan on a pre-defined package with this tag?

    Gonna try this one....

  8. #8

    Default

    shouldnīt all packages of my project be scanned by default?
    Keep dreaming And how can Spring know which packages is part of your project and not ?
    Need help on Spring WS ? Do you want to shift gears and build the architecture of your spring ws with half of the price that will be for your company ? I have worked on Spring Ws 1,5 year at full time and build around80 WS with full dao testing and integration tests with Soapui with Maven 2 on hudson

  9. #9
    Join Date
    Jul 2006
    Posts
    11

    Default

    Hmm, thought about that, but since the docs didnīt say anything about it...

  10. #10
    Join Date
    Jul 2006
    Posts
    11

    Default

    Ahhh, problem solved.
    It was missing the component-scan tag...

    thanks for the replies!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •