-
Trying to use cell data from worksheet to post data to API web service.
I'm trying to use cells on the worksheet to create the "Post" send to an api web service.
Example: below is hardcoded with the xml.
I want to use the cell data on a worksheet to create the xml.
for the
reader.Send s
part
Dim reader As New MSXML2.ServerXMLHTTP60
reader.setOption 2, (reader.getOption(2) - SXH_SERVER_CERT_IGNORE_CERT_DATE_INVALID)
Dim s As String
reader.Open "POST", "https://dr01.dev-sap.ger.com:44310/sap/commerce/esrprice?sap-client=220", False, "XXXXX", "xxxxxxger"
reader.setRequestHeader "Accept", "application/xml"
s = "<?xml version=""1.0""?>" & _
"<EsrpPriceRequest>" & _
"<QuoteNumber>0030017523</QuoteNumber>" & _
"<AccountNumber>0800000713</AccountNumber>" & _
"<Items>" & _
"<Item>3BA56</Item>" & _
"<Item>1A005</Item>" & _
"<Item>1AC47</Item>" & _
"<Item>6K305</Item>" & _
"</Items>" & _
"</EsrpPriceRequest>"
Debug.Print s
reader.Send s
Do Until reader.ReadyState = 4
DoEvents
Loop '
If reader.Status = 200 Then
MsgBox (reader.responseText)
Else
MsgBox "Unable to get data."
End If
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules