-
May 21st, 2008, 06:25 AM
#1
Null response Soap Body with Axiom and SPRING-WS 1.5.2
Hello,
I have a problem with the migration from SPRING-WS 1.5 to v1.5.2
The Soap reponse contains an empty soap body.
I am using
AXIOM
<bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoap MessageFactory">
<property name="payloadCaching" value="false" />
<property name="soapVersion"><!-- If removed, by default Soap 1.1 -->
<util:constant static-field="org.springframework.ws.soap.SoapVersion.SOA P_11" />
</property>
</bean>
with JIBX.
I did some tests and the response is correctly marshalled into the response soap body stream but it's as if the stream is never used.
I obtain
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body/>
</soapenv:Envelope>
Thanks
-
May 21st, 2008, 06:09 PM
#2
What kind of Marshaller are you using? I have just been able to reproduce this using a CastorMarshaller, but I haven't tried other kinds of Marshallers.
Arjen - it looks to me like NonCachingPayload.DelegatingStreamWriter.writeEndD ocument() never gets called at least when marshalling with Castor. It looks like Castor by default does not fire an endDocument SAX event (or close or flush for that matter). But if you call setMarshalAsDocument(true) on a castor marshaller it does call endDocument. I just now worked around this with Castor by creating a simple subclass of CastorMarshaller like this below:
<code>
public class MyCastorMarshaller extends CastorMarshaller {
protected void customizeMarshaller(Marshaller marshaller) {
super.customizeMarshaller(marshaller);
marshaller.setMarshalAsDocument(true);
}
}
</code>
I'm not sure if all the other Marshallers call endDocument or not.
Arjen - I'll go ahead and raise a Jira issue for this.
-
May 21st, 2008, 06:17 PM
#3
-
May 22nd, 2008, 03:01 AM
#4
Hello
i use jibx marshaller
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules