Harri Pesonen created CXF-8543:
----------------------------------

             Summary: CXF SOAP 1.1 problem while 1.2 works
                 Key: CXF-8543
                 URL: https://issues.apache.org/jira/browse/CXF-8543
             Project: CXF
          Issue Type: Bug
    Affects Versions: 3.4.3
            Reporter: Harri Pesonen
         Attachments: IciSystemService.wsdl

I have a C# SOAP Service, and I generated CXF client (and server) from WSDL.
Problem is that SOAP 1.1 port does not work in certain cases, while SOAP 1.2 
port seems to work always (but the C# service did not support SOAP 1.2 
originally, because SOAPAction is given differently).

The error is:

org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element 
(uri:"urn:IciSystemInterface", local:"response"). Expected elements are 
<\{urn:IciSystemInterface}message>,<\{urn:IciSystemInterface}productName>,<\{urn:IciSystemInterface}iciVersion>,<\{urn:IciSystemInterface}productVersion>,<\{urn:IciSystemInterface}iciMessageGroups>
 org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element 
(uri:"urn:IciSystemInterface", local:"response"). Expected elements are 
<\{urn:IciSystemInterface}message>,<\{urn:IciSystemInterface}productName>,<\{urn:IciSystemInterface}iciVersion>,<\{urn:IciSystemInterface}productVersion>,<\{urn:IciSystemInterface}iciMessageGroups>
  at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:931)

SOAP 1.1 payload is:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
 <soap:Body>
 <exchangeProductInformationResponse xmlns="urn:IciSystemInterface">
 <response>
 <message xsi:nil="true"/>
 <productName>WicomOII</productName>
 <iciMessageGroups>
 <item>IciGroupUser</item>
 <item>IciGroupTelephony</item>
 <item>IciGroupMessaging</item>
 <item>IciGroupChat</item>
 <item>IciGroupActionRouting</item>
 <item>IciGroupMonitoring</item>
 </iciMessageGroups>
 <productVersion>999.999.999.999</productVersion>
 <iciVersion>3.01</iciVersion>
 </response>
 </exchangeProductInformationResponse>
 </soap:Body>
</soap:Envelope>

So there is extra <response> mode before <message>, <productName> etc, and it 
fails on that. It does not expect to have <response>. Similar payload works 
fine in SOAP 1.2 case:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
 <soap:Body>
 <exchangeProductInformationResponse xmlns="urn:IciSystemInterface">
 <response>
 <message xsi:nil="true"/>
 <productName>WicomOII</productName>
 <iciMessageGroups>
 <item>IciGroupUser</item>
 <item>IciGroupTelephony</item>
 <item>IciGroupMessaging</item>
 <item>IciGroupChat</item>
 <item>IciGroupActionRouting</item>
 <item>IciGroupMonitoring</item>
 </iciMessageGroups>
 <productVersion>999.999.999.999</productVersion>
 <iciVersion>3.01</iciVersion>
 </response>
 </exchangeProductInformationResponse>
 </soap:Body>
</soap:Envelope>

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to