dbush1973
03-20-2010, 01:35 PM
I am an ASP Programmer at work and was transfered to Data Integrations when another employee was let go. I had to take over their job since I am the only one that had some clue over SQL. However, my XML knowledge is very limited.
What I need is some help on a file that I have to create to pull data from a remote web service (database) and bring to ours. We are trying to create a partnership with this other company and have to get an interface (that works) in order for them to allow us to create this bond between databases. What I have already is on our servers and when I click refresh the screen turns white (I was told that if no errors appear then the sending part is correct), however I can not get any return values.
I have right now:
<%
Server.ScriptTimeout=14400
const URL = "xxxxxx" 'This is were the URL goes that I have
const Username = "xxxxxx"
const Password = "xxxxxx"
const ServerName = "xxxxxx"
const Database = "xxxxxx"
const Platform = "SQL"
const YardiPropertyID = "xxxxxx"
const InterfaceEntity = "xxxxxx"
POST /YSI.NET_600614/Source/Interfaces/WebServices/ItfILSGuestCard20.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "xxxxxx" ' this is were the URL goes that I have
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UnitAvailability_Login xmlns="http://12.105.42.214/8223thirdDEV/webservices/itfilsguestcard20.asmx">
DIM xml
xml = "<request>"
xml = xml & "<UserName>" & Username &"</UserName>"
xml = xml & "<Password>" & Password & "</Password>"
xml = xml & "<ServerName>" & ServerName & "</ServerName>"
xml = xml & "<Database>" & Database & "</Database>"
xml = xml & "<Platform>" & Platform & "</Platform>"
xml = xml & "<YardiPropertyID>" & YardiPropertyID & "</YardiPropertyID>"
xml = xml & "<InterfaceEntity>" & InterfaceEntity & "</InterfaceEntity>"
</UnitAvailability_Login>
</soap:Body>
</soap:Envelope>
xml = xml & "</command>"
xml = xml & "</request>"
postData = Server.HTMLEncode(xml)
Set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url
xmlhttp.setRequestHeader "Host",Host
xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
xmlhttp.setRequestHeader "Content-Type","text/xml"
xmlhttp.setRequestHeader "Content-Length",len(postData)
xmlhttp.send (postData)
%>
The guidlines the other company gave us (the company that is providing a web service to their database) gave us sample request and responses. They are SOAP examples (which I don't know the difference between SOAP and XML) it reads:
' REQUEST
POST / YSI.NET_600614/Source/Interfaces/WebServices/ItfILSGuestCard20.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Lenght: length
SOAPAction:
"http://tempurl.org/YSI.Interfaces.WebServices/ItfILSguestCard20/UnitAvailability_Login"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UnitAvailability_Login xmlns="http://www.xxxxx.org.......">
<UserName>string</UserName>
<Password>string</Password>
<ServerName>string</ServerName
<Databasae>string</Databasae>
<Platform>string</Platform>
<ID>string</ID>
<InterfaceEntity>string</InterfaceEntity>
</UnitAvailability_Login>
</soap:Body>
</soap:Envelope>
And the code for the response is:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://schemas.xmlsoap.org/soap/envelope/">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UnitAvailability_LoginResponse xmls="http://xxxxxxxxxxx.org/">
<UnitAvailability_LoginResult>xml</UnitAvailability_LoginResult>
</UnitAvailability_LoginResponse?
</soap:Body>
</soap:Envelope>
Can anyone help me with this xml and what I should do? This is suppose to be XML DOM and asp, however, I don't think XML DOM vs. Regular XML is a big deal. As long as we can access their database......
Thanks in advanced
daveofgv
What I need is some help on a file that I have to create to pull data from a remote web service (database) and bring to ours. We are trying to create a partnership with this other company and have to get an interface (that works) in order for them to allow us to create this bond between databases. What I have already is on our servers and when I click refresh the screen turns white (I was told that if no errors appear then the sending part is correct), however I can not get any return values.
I have right now:
<%
Server.ScriptTimeout=14400
const URL = "xxxxxx" 'This is were the URL goes that I have
const Username = "xxxxxx"
const Password = "xxxxxx"
const ServerName = "xxxxxx"
const Database = "xxxxxx"
const Platform = "SQL"
const YardiPropertyID = "xxxxxx"
const InterfaceEntity = "xxxxxx"
POST /YSI.NET_600614/Source/Interfaces/WebServices/ItfILSGuestCard20.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "xxxxxx" ' this is were the URL goes that I have
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UnitAvailability_Login xmlns="http://12.105.42.214/8223thirdDEV/webservices/itfilsguestcard20.asmx">
DIM xml
xml = "<request>"
xml = xml & "<UserName>" & Username &"</UserName>"
xml = xml & "<Password>" & Password & "</Password>"
xml = xml & "<ServerName>" & ServerName & "</ServerName>"
xml = xml & "<Database>" & Database & "</Database>"
xml = xml & "<Platform>" & Platform & "</Platform>"
xml = xml & "<YardiPropertyID>" & YardiPropertyID & "</YardiPropertyID>"
xml = xml & "<InterfaceEntity>" & InterfaceEntity & "</InterfaceEntity>"
</UnitAvailability_Login>
</soap:Body>
</soap:Envelope>
xml = xml & "</command>"
xml = xml & "</request>"
postData = Server.HTMLEncode(xml)
Set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url
xmlhttp.setRequestHeader "Host",Host
xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
xmlhttp.setRequestHeader "Content-Type","text/xml"
xmlhttp.setRequestHeader "Content-Length",len(postData)
xmlhttp.send (postData)
%>
The guidlines the other company gave us (the company that is providing a web service to their database) gave us sample request and responses. They are SOAP examples (which I don't know the difference between SOAP and XML) it reads:
' REQUEST
POST / YSI.NET_600614/Source/Interfaces/WebServices/ItfILSGuestCard20.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Lenght: length
SOAPAction:
"http://tempurl.org/YSI.Interfaces.WebServices/ItfILSguestCard20/UnitAvailability_Login"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UnitAvailability_Login xmlns="http://www.xxxxx.org.......">
<UserName>string</UserName>
<Password>string</Password>
<ServerName>string</ServerName
<Databasae>string</Databasae>
<Platform>string</Platform>
<ID>string</ID>
<InterfaceEntity>string</InterfaceEntity>
</UnitAvailability_Login>
</soap:Body>
</soap:Envelope>
And the code for the response is:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://schemas.xmlsoap.org/soap/envelope/">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UnitAvailability_LoginResponse xmls="http://xxxxxxxxxxx.org/">
<UnitAvailability_LoginResult>xml</UnitAvailability_LoginResult>
</UnitAvailability_LoginResponse?
</soap:Body>
</soap:Envelope>
Can anyone help me with this xml and what I should do? This is suppose to be XML DOM and asp, however, I don't think XML DOM vs. Regular XML is a big deal. As long as we can access their database......
Thanks in advanced
daveofgv