Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-410

AxiomSoapMessage does not work fine in Spring-WS with CastorMarshaller

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.5
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Spring-WS 1.5.4, Axiom 1.2.7, Castor 1.2

      Description

      When i use AxiomSoapMessageFactory ( in order to benefit to STAX ), with CastorMarshaller in Spring-WS, i notice that the WebServiceMessage request is sent very well, but its response is not sent back. I receive nothing. But if i use SaajSoapMessageFactory instead of Axiom, every thing is fine.

      May be one has to modify the MessageContext given as parameter to the method : public final void invoke(MessageContext messageContext) in the AbstractMarshallingPayloadEndpoint class. Because of that if i look into the messageContext object at runtime, all of its request and response objects are SaajSoapMessage.

      But how to change this MessageContext ? or are there any solutions to work with Axiom or that is really a bug to be fixed ?

      Please give me an idea on this...

      1. mySeverSideContextConfiguration.xml
        4 kB
        Aristide Tohoun
      2. myEndpoint.java
        3 kB
        Aristide Tohoun
      3. digit-client-servlet.xml.txt
        1 kB
        Aristide Tohoun

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        The MessageContext does not have to be modified in order to use Axiom, it should work.

        I suspect it is a issue of configuration. Can you share your application context and attach it to this issue?

        Show
        arjen.poutsma Arjen Poutsma added a comment - The MessageContext does not have to be modified in order to use Axiom, it should work. I suspect it is a issue of configuration. Can you share your application context and attach it to this issue?
        Hide
        atohoun Aristide Tohoun added a comment -

        Here is my application context configuration.

        Show
        atohoun Aristide Tohoun added a comment - Here is my application context configuration.
        Hide
        atohoun Aristide Tohoun added a comment -

        My application context content is :

        <?xml version="1.0" encoding="UTF-8"?>
        <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

        <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename" value="messages"/>
        </bean>

        <bean name="/ws.eq" class="digit.controller.WebServiceController">
        <property name="webServiceClient" ref="webServiceClient"/>
        </bean>

        <bean id="webServiceClient" class="digit.ws.WebServiceClientImpl">
        <property name="messageFactory">
        <bean class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
        </bean>
        </property>
        <property name="marshaller" ref="marshaller" />
        <property name="unmarshaller" ref="marshaller" />
        <property name="defaultUri" value="http://localhost:8080/digitservice/services"/>
        </bean>

        <bean id="marshaller" class="digit.ws.MyCastorMarshaller"/>

        <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
        <property name="prefix" value="/WEB-INF/jsp/"/>
        <property name="suffix" value=".jsp"/>
        </bean>

        </beans>

        Show
        atohoun Aristide Tohoun added a comment - My application context content is : <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd "> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename" value="messages"/> </bean> <bean name="/ws.eq" class="digit.controller.WebServiceController"> <property name="webServiceClient" ref="webServiceClient"/> </bean> <bean id="webServiceClient" class="digit.ws.WebServiceClientImpl"> <property name="messageFactory"> <bean class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory"> </bean> </property> <property name="marshaller" ref="marshaller" /> <property name="unmarshaller" ref="marshaller" /> <property name="defaultUri" value="http://localhost:8080/digitservice/services"/> </bean> <bean id="marshaller" class="digit.ws.MyCastorMarshaller"/> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/jsp/"/> <property name="suffix" value=".jsp"/> </bean> </beans>
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Is this issue related to SWS-407 in any way? Is it a duplicate?

        Show
        arjen.poutsma Arjen Poutsma added a comment - Is this issue related to SWS-407 in any way? Is it a duplicate?
        Hide
        atohoun Aristide Tohoun added a comment -

        Yes this issue is related to the SWS-407 one. The above context configuration is my client side configuration.
        Check my server side configuration in attachment, and also my endpoint class. Please tell me what can be wrong within them...

        Show
        atohoun Aristide Tohoun added a comment - Yes this issue is related to the SWS-407 one. The above context configuration is my client side configuration. Check my server side configuration in attachment, and also my endpoint class. Please tell me what can be wrong within them...
        Hide
        atohoun Aristide Tohoun added a comment -

        My server side context

        Show
        atohoun Aristide Tohoun added a comment - My server side context
        Hide
        atohoun Aristide Tohoun added a comment -

        My endpoint class

        Show
        atohoun Aristide Tohoun added a comment - My endpoint class
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I've just tested the combination of castor and axiom, and it works fine for me. See the attached echo-castor project.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I've just tested the combination of castor and axiom, and it works fine for me. See the attached echo-castor project.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            atohoun Aristide Tohoun
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: