[SWS-410] AxiomSoapMessage does not work fine in Spring-WS with CastorMarshaller Created: 06/Aug/08  Updated: 04/May/12  Resolved: 22/Sep/08

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 1.5.4
Fix Version/s: 1.5.5

Type: Bug Priority: Critical
Reporter: Aristide Tohoun Assignee: Arjen Poutsma
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Spring-WS 1.5.4, Axiom 1.2.7, Castor 1.2

Attachments: Text File digit-client-servlet.xml.txt     Zip Archive echo-castor.zip     Text File myEndpoint.java     XML File mySeverSideContextConfiguration.xml    


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...

Comment by Arjen Poutsma [ 20/Aug/08 ]

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?

Comment by Aristide Tohoun [ 20/Aug/08 ]

Here is my application context configuration.

Comment by Aristide Tohoun [ 20/Aug/08 ]

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 name="/ws.eq" class="digit.controller.WebServiceController">
<property name="webServiceClient" ref="webServiceClient"/>

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

<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"/>


Comment by Arjen Poutsma [ 28/Aug/08 ]

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

Comment by Aristide Tohoun [ 29/Aug/08 ]

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...

Comment by Aristide Tohoun [ 29/Aug/08 ]

My server side context

Comment by Aristide Tohoun [ 29/Aug/08 ]

My endpoint class

Comment by Arjen Poutsma [ 22/Sep/08 ]

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

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Sun May 26 13:14:39 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.