Hi i am new to wcf and xmlhttp, i am using vb script to send the request. i am getting the following error "Cannot process the message because the content type 'text/xml; charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'."
Please find my code below,
g_XMLLink = "http://dev1.xxxxx.employer/employer/v02/Employer.svc"
Set xmlhttp = Nothing
Set xmldom = Nothing '
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
Set xmldom = CreateObject("Microsoft.XMLDOM")
completexml = "<CreateProspectRequest xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><Employer><PartyDisplayName>cbs1a test</PartyDisplayName><PreferredLanguageIdentifier xsi:nil='true' /><PartyIdentifier xsi:nil='true' /><PartyAddresses>" _
& "<PartyAddressStructure><BeginTimeStamp xsi:nil='true' /><CityName>portland</CityName><CountryCode>US</CountryCode><EndTimeStamp xsi:nil='true' /><FirstLineAddress>congress street</FirstLineAddress><PostalCode>04102</PostalCode><SecondJurisdictionCode>ME</SecondJurisdictionCode><SecondJurisdictionTypeCode>ST</SecondJurisdictionTypeCode>" _
& "<SecondLineAddress /><AddressIdentifier xsi:nil='true' /><PartyIdentifier xsi:nil='true' /><AddressUsageIdentifier>100000</AddressUsageIdentifier><SecondJurisdiction>20</SecondJurisdiction><ChangeTypeCode xsi:nil='true' /></PartyAddressStructure></PartyAddresses>" _
& "<PreferredLanguage>100</PreferredLanguage><ChangeTypeCode xsi:nil='true' /><PartyTypeIdentifier xsi:nil='true' /><EstablishedDate xsi:nil='true' /><OrganizationTypeIdentifier>100018</OrganizationTypeIdentifier><OrganizationNames><OrganizationNameStructure><NameEndTimestamp xsi:nil='true' />" _
& "<NameStartTimestamp xsi:nil='true' /><OrganizationPartyName>cbs1a test</OrganizationPartyName><NameTypeIdentifier>1</NameTypeIdentifier><PartyIdentifier xsi:nil='true' /><ChangeTypeCode xsi:nil='true' /></OrganizationNameStructure></OrganizationNames><ProspectReceivedDate xsi:nil='true' />" _
& "<RatingGroupIdentifier xsi:nil='true' /></Employer><AffiliationCode>UUS</AffiliationCode></CreateProspectRequest>"
xmlhttp.Open "POST", g_XMLLink, False
xmlhttp.setRequestHeader "ContentType", "text/xml; charset=utf-8"
xmlhttp.setRequestHeader "SoapAction", "http://xxxxx.com/Employer/Contracts/v2/Employer/CreateProspect"
xmldom.loadXML completexml
xmlhttp.send xmldom
MsgBox xmlhttp.responseText