I’m not sure whether you want to do a PUT or a POST - I assume a POST from what you say. Your code appears to do a PUT. Here’s a small example of an asp page that does a POST that may help. I would stress that I agree completely with Stuart Fyffe-Collins previous suggestion here that you should always use a documented API for such requests to Tamino. But if you really want to do a http post of your own, this code might help…
<%@ language="vbscript" %>
<%
xml="<?xml version='1.0' encoding='iso-8859-1' ?><Property Category='Buy' PropertyType='32-Room-
Apartment'><Address><State>NY</State><Zip>12108</Zip><City>Lake Pleasant</City>"
xml = xml & "<Street /></Address><Description><Text>Family Room; Fireplace; Lot Features: Swimming Pool</Text><Area>460</Area>"
xml = xml & "<NumberOfBedRooms>2</NumberOfBedRooms><NumberOfBathRooms>1</NumberOfBathRooms></Description>
<ContactPerson><Name>Glenn Carter</Name>"
xml = xml & "<Phone>1-361-842-3875</Phone><Email>Glenn.Carter@automailer.com
</Email></ContactPerson><ContactPerson><Name>Tommy Lee Jones</Name>"
xml = xml & "<Phone>1-800-642-3333</Phone><Email>Tommy-Lee-Jones@email.com
</Email></ContactPerson><Price>130000</Price></Property>"
dim myDocument
Set MyDocument = Server.CreateObject("MSXML2.DOMDocument")
myDocument.async = false
myDocument.loadXML(xml)
If myDocument.parseError.errorCode <> 0 Then
Response.Write( "XML Parse Error code: " &
myDocument.parseError.errorCode & ", reason: " &
myDocument.parseError.reason & " on line: " &
myDocument.parseError.line & "</br>")
Else
Response.Write ("<HTML>XML Parsed successfully</br>")
End If
set xmlHttp = CreateObject ("Microsoft.XMLHTTP")
xmlHttp.open "POST", "http://localhost/tamino/database/collection", false
xmlHttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded;"
xmlHttp.send( "_process=" & xml)
Response.Write (xmlHttp.responseXML.xml)
Response.write ("Done")
%>
HTH
[This message was edited by Bill Leeney on 26 Nov 2002 at 12:41.]
#API-Management#webMethods#Tamino