-1

Trying to call a SAP SOAP Web Service from a generated sudzc app shows errors I don't know:

SudzCExamples[5192:f803] <?xml version="1.0" encoding="utf-8"?><soap:Envelope     
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:sap-
com:document:sap:soap:functions:mc-style"><soap:Body><ZComUrlGetrecords>
<IYear>2012</IYear></ZComUrlGetrecords></soap:Body></soap:Envelope>


SudzCExamples[5192:f803] <soap-env:Envelope xmlns:soap-
env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header></soap-env:Header><soap-
env:Body><soap-env:Fault><faultcode>soap-env:Server</faultcode><faultstring 
xml:lang="en">CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 
'IYear'</faultstring><detail><ns:SystemFault   
xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">  
<Host>undefined</Host><Component>APPL</Component><ChainedException>
<Exception_Name>CX_SOAP_CORE</Exception_Name><Exception_Text>CX_ST_MATCH_ELEMENT:XSLT 
exception.System expected element 'IYear'</Exception_Text></ChainedException>
<ChainedException><Exception_Name>CX_SXMLP</Exception_Name><Exception_Text>XSLT 
exception</Exception_Text></ChainedException><ChainedException>
<Exception_Name>CX_ST_MATCH_ELEMENT</Exception_Name><Exception_Text>System expected 
element 'IYear': Main Program:/1BCDWB/WSS825E06E4DEC40F9171D| 
Program:/1BCDWB/WSS825E06E4DEC40F9171D| Line: 18| Valid:X</Exception_Text>
</ChainedException></ns:SystemFault></detail></soap-env:Fault></soap-env:Body></soap-
env:Envelope>

2012-03-11 20:09:30.631 SudzCExamples[5192:f803] soap-env:Server CX_ST_MATCH_ELEMENT:XSLT 
exception.System expected element 'IYear'
(null)

The strange thing is that it seems as if the request has the IYear element. Can someone tell me where to search the problem?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
user1099480
  • 187
  • 1
  • 4
  • 11
  • No ideas regarding this problem? – user1099480 Mar 19 '12 at 19:55
  • In your context, `CX_ST_MATCH_ELEMENT` is produced by an XML transformation of a SAP Web Service generated on a SAP ABAP server. You can see in the response that the element `IYear` was expected at some position but was not found. It can be an XML namespace issue too (e.g. `IYear` of namespace "1" is different from `IYear` of namespace "2"). Check the WSDL of the Web Service to make sure what is the XML structure expected by the Web Service. – Sandra Rossi Jul 01 '23 at 19:44

1 Answers1

3

I ran into this same problem yesterday and discovered the solution after some experimentation. First thing I did was use my SoapUI client to make the request successfully. SoapUI comes with a free trial and even if you do not use the free trial you can still use it to make accesses to the web service without registering it. I used the xml from the successful request I made to compare against the request that SudzC was making. They differ in several ways, and the way that SudzC forms the request is not sufficient.

My suggestion to you is to compare the two requests and change SudzC's request to match the SoapUI request. You can do this by editing the Soap source code that SudzC gives to you, this source code is found particularly in the Soap.m file in the createEnvelope function.

Also, if your requests have an empty header SudzC does not include the header part of the request. Hard code in an empty header after the namespace portion of the envelope. Doing all this fixed this exact issue for me.