/\ I don't think that It should be closed. The referenced solution didn't answer the question
I created a Spring-WS based project following the official spring.io tutorial, and I built the following xsd file:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://localhost:8080/integ/wsdl/IInterfaceERP" targetNamespace="http://localhost:8080/integ/wsdl/IInterfaceERP" elementFormDefault="qualified">
<xs:element name="ImportERPRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="bFirstLoad" type="xs:boolean"></xs:element>
<xs:element name="iNumofEntries" type="xs:integer"></xs:element>
<xs:element name="sView" type="xs:string"></xs:element>
<xs:element name="iTransactionId" type="xs:integer"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ImportERPResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="xml" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
It is simple: The client send the "ImportERPRequest" values and it will receive a XML string as response.
The response is being created like this (as it should by Spring-WS):
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:ImportERPResponse
xmlns:ns2="http://localhost:8080/integ/wsdl/IInterfaceERP">
<ns2:sXml><SAAF><vehicle><Entry><vehicleId>20886<</ns2:sXml>
</ns2:ImportERPResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But, I would like to know if its possible to return the raw XML outside of "SOAP-ENV:Envelope", just like the old known XML:
<?xml version="1.0" encoding="UTF-8"?>
<SAAF>
<vehicle>
<Entry>
<vehicleId>20886</vehicleId>
</Entry>
</vehicle>
</SAAF>
If it is not, is any other Spring solution that I can use to achieve this?
I really would like to return the entire <SAAF>
inside of "SOAP-ENV:Body", but the consumer specification asks a WSDL url and it should return a raw xml as I provided above.