Kald til webservice fejler
HejJeg har denne her kode som jeg forsøger at køre efter man har indtastet navn og telefonnummer på en landingpage:
<%
On Error Resume Next
Dim objXMLHTTP
objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0")
Dim strFunction
Dim strRequest
Dim strName
Dim strFirstName
Dim strLastname
Dim strTelephone
Dim strExtFields
Dim strStdFields
Dim CampaignID
Dim Page
Dim Name
Dim Telephone
Dim message
On Error Goto 0
On Error Resume Next
'Page = Request("Page")
'CampaignID = Request("CampaignID")
'Name = Request("Name")
'Telephone = Request("Phone")
Page = "Test af systemet"
CampaignID = "10"
Name = "Landingpage"
Telephone = "30486060"
'message = Request("message")
On Error Goto 0
On Error Resume Next
Dim builder
builder = New System.Text.StringBuilder
builder.Append("<?xml version=""1.0"" encoding=""utf-8""?>")
builder.Append("<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/"">")
builder.Append("<soap:Body>")
builder.Append("<InsertNewCustomer xmlns=""http://www.ivocall.dk/ivocallservice/"">")
builder.Append("<Login>brugernavn</Login>")
builder.Append("<Password>adgangskode</Password>")
builder.Append("<ClientID>1323</ClientID>")
builder.Append("<IDPassword>ag4hsitd324346dbpt23nsla</IDPassword>")
builder.Append("<CampaignID>10</CampaignID>")
builder.Append("<Name>Landingpage</Name>")
builder.Append("<Firstname></Firstname>")
builder.Append("<Lastname></Lastname>")
builder.Append("<Address></Address>")
builder.Append("<City></City>")
builder.Append("<ZipCode></ZipCode>")
builder.Append("<Telephone>30486060</Telephone>")
builder.Append("<Telephone2></Telephone2>")
builder.Append("<Telephone3></Telephone3>")
builder.Append("<Telephone4></Telephone4>")
builder.Append("<email></email>")
builder.Append("<ExtFields>landingpage=test</ExtFields>")
builder.Append("<StdFields></StdFields>")
builder.Append("<UserName></UserName>")
builder.Append("</InsertNewCustomer>")
builder.Append("</soap:Body>")
builder.Append("</soap:Envelope>")
strRequest = builder.ToString()
'builder.Append("<CampaignID>" & CampaignID & "</CampaignID>")
'builder.Append("<Name>" & Name & "</Name>")
'builder.Append("<Telephone>" & Telephone & "</Telephone>")
'builder.Append("<ExtFields>landingpage=" & Page & "</ExtFields>")
call objXMLHTTP.open("post", "" & "http://api.ivocall.dk/ivocallservice.asmx" & "", False)
call objXMLHTTP.setRequestHeader("Content-Type", "text/xml; charset=UTF-8")
call objXMLHTTP.setRequestHeader("Content-Length", Len(strRequest))
call objXMLHTTP.setRequestHeader("SOAPAction", "" & "http://www.ivocall.dk/ivocallservice/InsertNewCustomer" & "")
'send the request and capture the result
Call objXMLHTTP.send(strRequest)
Dim strResult
strResult = objXMLHTTP.responseText
'display the XML
Response.Write(strResult)
If Err.Number <> 0 Then
Response.Write (Err.Description)
else
Response.Write (" task done")
Response.End
End If
On Error Goto 0
%>
Men jeg bliver ved med at få fejlen:
Et objekt er obligatorisk
Er der nogen af jer som kan se om der skulle være en fejl i selve scriptet?