[
https://issues.apache.org/jira/browse/CXF-8543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353904#comment-17353904
]
Harri Pesonen commented on CXF-8543:
------------------------------------
I figured out how to fix WSDL.
https://www.wsdl-analyzer.com/service/service/119160007?version=2
I changed
{code}
[SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)] //
SoapAction
{code}
to
{code}
[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)] //
SoapAction
{code}
which only removed
{code}
style="rpc"
{code}
from WDSL bindings. The generated XML is exactly same. So "rpc/literal" is same
as "document/literal wrapped".
https://www.ibm.com/docs/en/zvse/6.2?topic=syntax-literal-vs-encoded-rpc-vs-document-style
Now CXF is happy and everything seems to work.
> 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
> Assignee: Freeman Yue Fang
> Priority: Major
> 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:
> {code}
> 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)
> {code}
> SOAP 1.1 payload is:
> {code}
> <?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>
> {code}
> 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:
> {code}
> <?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>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)