Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8543

CXF SOAP 1.1 problem while 1.2 works

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.4.3
    • Invalid
    • None
    • None
    • Unknown

    Description

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

       

      Attachments

        1. IciSystemService.wsdl
          34 kB
          Harri Pesonen

        Activity

          People

            ffang Freeman Yue Fang
            Fuerte Harri Pesonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: