Creating XML message

D

Dudley

I submit data to an organisation which requires it to be sent by email
according to a TAG:DATA spec. I export the data from Access to a Word
document, and then paste this into an email. This works fine, but they are
now changing to XML submission. "The XML Gateway exchanges XML over HTTPS.
Requests are submitted via the HTTPS POST method, with a Content-Type of
text/xml." Can anyone advise whether I could create the message as a data
access page, or suggest a better approach?

Thanks for any help.

Dudley
 
B

Brendan Reynolds

Dudley said:
I submit data to an organisation which requires it to be sent by email
according to a TAG:DATA spec. I export the data from Access to a Word
document, and then paste this into an email. This works fine, but they are
now changing to XML submission. "The XML Gateway exchanges XML over
HTTPS.
Requests are submitted via the HTTPS POST method, with a Content-Type of
text/xml." Can anyone advise whether I could create the message as a data
access page, or suggest a better approach?

Thanks for any help.

Dudley


You can post using the MSXML object library. Here's an example. This example
doesn't send XML, but could be adapted to do so. You'll find documentation
on using the MSXML library at the following URL ...

http://msdn.microsoft.com/en-us/library/ms763742(VS.85).aspx

Public Function SendMessage(strSessionId As String, strBatchId As String,
strNumber As String, Optional strMessage As String) As String

Dim strPostData As String

'Dim objRequest As MSXML2.XMLHTTP
Dim objRequest As Object

strPostData = "session_id=" & strSessionId & "&batch_id=" & strBatchId &
"&to=" & strNumber '& "&" & strMessage
If Len(strMessage) > 0 Then
strPostData = strPostData & "&" & strMessage
End If

'Set objRequest = New MSXML2.XMLHTTP
Set objRequest = CreateObject("MSXML2.XMLHTTP")

With objRequest
.Open "POST", "target/url/goes/here", True
.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
.send (strPostData)
'SendMessage = .responseText
End With

End Function
 
D

Dudley

I am using Office 2000, and it looks to me as if I need to upgrade in order
to export to XML. Is this so, and to which version?

Thanks
Dudley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top