[SWS-904] Improve the experience to enable MTOM with JAXB Created: 08/Jul/15  Updated: 08/Jul/15  Resolved: 08/Jul/15

Status: Closed
Project: Spring Web Services
Component/s: Core, Documentation, Samples
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Mauro Molinari Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is superseded by SWS-905 Improve the experience to enable MTOM... Reopened


I had a very poor experience trying to enable MTOM attachment handling on a receiving endpoint expecting JAXB input parameters. Please let me write the whole story.

I have to receive web service requests as defined by the following contract: http://www.fatturapa.gov.it/export/fatturazione/sdi/ws/trasmissione/v1.0/TrasmissioneFatture_v1.1.wsdl
and the imported schema: http://www.fatturapa.gov.it/export/fatturazione/sdi/ws/trasmissione/v1.0/TrasmissioneTypes_v1.1.xsd

With the following configuration I could make it almost work:

<?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/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"
	<context:component-scan base-package="it.dcssrl.fatturapa.sdi" />
	<web-services:annotation-driven />
	<!-- Expose the TrasmissioneFatture web service - to receive incoming messages from 
		the SDI -->
	<web-services:static-wsdl id="TrasmissioneFatture"
		location="classpath:/wsdl/TrasmissioneFatture_v1.1.wsdl" />
	<bean id="TrasmissioneTypes_v1.1" class="org.springframework.xml.xsd.SimpleXsdSchema">
		<property name="xsd" value="classpath:/wsdl/TrasmissioneTypes_v1.1.xsd" />

public class TrasmissioneFattureEndpoint {
  public void ricevutaConsegna(@RequestPayload FileSdIType input) {
    // processing

where FileSdiType is a Java class generated by running the JAXB compiler XJC against the above XSD file. Please note that FileSdiType is annotated with @XmlType and not with XmlRootElement.
Contrary to what the reference documentation says, unmarshalling for {{FileSdType}

Comment by Mauro Molinari [ 08/Jul/15 ]

Please delete this issue: I hit the Enter key by error and I can't edit it any more!
I will open a new issue will the full description.

Comment by Arjen Poutsma [ 08/Jul/15 ]

Closed as requested

Comment by Mauro Molinari [ 08/Jul/15 ]

Thank you Arjen and sorry for my mistake

I opened SWS-905 with the whole description. Maybe you want to link this to it.

Generated at Tue Mar 20 17:29:20 UTC 2018 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.