Skip to Content
0
Dec 18, 2007 at 10:25 PM

Error Calling Web Service - VersionMismatch Wrong SOAP Version

7661 Views

Hello,

I am attempting to create a web service from a function module, and to call this web service from outside of SAP.

I used the Web Service Creation Wizard to create a web service from BAPI_CURRENCY_GETLIST, and tested it using the Web Service Homepage button from transaction WSADMIN. Everything seems to work OK so far.

To test calling the web service, I copied the SOAP envelope from the web service homepage into a vbscript file:

Const HOST = "http://<server>.<domain>:<port>"

Const URL = "/sap/bc/srt/rfc/sap/ZWSD_Currency?sap-client=<nnn>"

' Create the HTTP object

Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

Dim Request

Request = "<?xml version=""1.0"" encoding=""UTF-8"" ?>" & _

" http://schemas.xmlsoap.org/soap/envelope"" xmlns:xsi="" http://www.w3.org/2001/XMLSchema"" xmlns:xs="" http://www.w3.org/2001/XMLSchema-instance"">" & _

"<SOAP-ENV:Header>" & _

" http://www.sap.com/webas/630/soap/features/session/"">" & _

"<enableSession>true</enableSession>" & _

"</sapsess:Session>" & _

"</SOAP-ENV:Header>" & _

"<SOAP-ENV:Body>" & _

"<ns1:CurrencyGetlist xmnls:ns1='urn:sap-com:document:sap:soap:functions:mc-style'>" & _

"<CurrencyList><item>" & _

"<CURRENCY></CURRENCY>" & _

"<CURRENCY_ISO></CURRENCY_ISO>" & _

"<ALT_CURR></ALT_CURR>" & _

"<VALID_TO></VALID_TO>" & _

"<LONG_TEXT></LONG_TEXT>" & _

"</item></CurrencyList>" & _

"</ns1:CurrencyGetlist>" & _

"</SOAP-ENV:Body>" & _

"</SOAP-ENV:Envelope>"

xmlhttp.open "POST", HOST & URL, False

xmlhttp.send (request)

MsgBox (xmlhttp.responseXML.xml)

When I execute the vbscript, the response is

http://schemas.xmlsoap.org/soap/envelop/">

<soap-env:Body>

<soap-env:Fault>

<faultcode>

soap-env:VersionMismatch

</faultcode>

<faultstring xml:lang="en">

Wrong SOAP Version

</faultstring>

</soap-env:Fault>

</soap-env:Body>

</soap-env:Envelope>

The system log (transaction SM21) contains the messages:

SOAP Runtime: SOAP Fault exception occurred in program CL_SOAP_MESSAGE===============CP in include CL_SOAP_ME SSAGE===============CM00X at position 34

SOAP Runtime: Exception message: Severe processing error; SOAP fault handling required

In the RFC trace (transaction SM59) I see

XRFC> INFO 14:25:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING <

XRFC> ROOT->IFSOAP_TRANSPORT_BINDING~RESPONSE() Try to create response <

XRFC> message <

XRFC> <

XRFC> INFO 14:25:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING <

XRFC> ROOT->IFSOAP_TRANSPORT_BINDING~RESPONSE() Response message <

XRFC> created <

XRFC> <

XRFC> INFO 14:25:10: SOAP Transport binding CL_SOAP_HTTP_TPBND_ROOT <

XRFC> ->IF_SOAP_TRANSPORT_BINDING~RECEIVE() Try to receive message <

XRFC> <

XRFC> 20071218 142510 00037640: SOAP Fault Exception caught: : Wrong <

XRFC> SOAP Version <

XRFC> <

XRFC>

XRFC> End of user trace

How can I tell what version(s) of SOAP the NetWeaver 2004 platform supports? Has anyone seen and resolved this error?

Thanks in advance,

Mark