cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP-CALL using classic ASP

Former Member
0 Kudos

Hi y'all - you're my last hope!

I'm using classic ASP to connect to a SAP-Webservice (no, I can't use .net). The connection seems to work so far, but I keep getting an error from the webservice, that an expected element was not found.

The Code I'm using to generate the SOAP-Call:

SoapURL = "http://IP-Adress/path/"

SoapRequest.Open "POST",SoapURL, False

SoapRequest.setRequestHeader "Content-Type", "text/xml; charset=UTF-8"

SoapRequest.setRequestHeader "Authorization", "BASIC " & Base64Encode("username:password")

SoapRequest.setRequestHeader "SOAPAction", ""

sRequest = ""

sRequest = sRequest & ""

SoapRequest.Send sRequest

The Webservice keeps complaining that the element «PiCopyreference» is missing...

What am I missing???

Thanks in advance for your help...

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

the ICF (internet communication framework) on the abap side doesnt like ip address. instead use FQDN. may be this is causing the problem.

SoapURL = "http://IP-Adress/path/"

Former Member
0 Kudos

Thanks for the hint...

Unfortunately, I can't use a domain name, as the Server isn't public and thus not registered with any DNS-Service...

The Webservice does answer my SOAP-Call, though, so I don't think that this is causing the problem. My guess is, that I somehow try to send a malformed XML... I just can't figure out where the problem is...

Former Member
0 Kudos

Can you confirm , where the error is coming from.

Is your ASP application generating the error before sending request or it is hitting the SAP Server and then coming back?

Regards,

Piyush

Former Member
0 Kudos

The Problem was (which is my best guess) some invisible character that must've «sneaked» in my ASP-Code, when I copy/pasted the XML-Code.

I played around with different formattings of the XML I sent to SAP and all of a sudden, it worked (without any visible change to the document).

Thanks anyway for your help!