2017-03-29 15 views
0

私はSOAPサービスを呼び出す必要があります。私の古典的なASPページから、Webサービスが別の側で書かれたデータベースにデータを送信する必要があります。よく形成されていない:私はこのクエリWCF Webserviceを従来のaspに統合

<% 
    cboYear = FixString(Request.Form("cboYear")) 

    'For j=1 to 12 
     execute("EndDay = Request.Form(""Days" & 1 & """)") 
     execute("EndMonth = Request.Form(""Months" & 1 & """)") 
     execute("EndYear = Request.Form(""Years" & 1 & """)") 
     execute("EndTime = Request.Form(""Times" & 0 & """)") 



     SendDate = trim(EndDay) & "/" & EndMonth & "/" & EndYear 
    'Response.Write "<br>START<hr>" 

    Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP") 
    oXmlHTTP.Open "POST", "https://bmwservicesuating.bmwcrinhm.in:7446/DMSI/PragmasysService.svc?wsdl",true 

    oXmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8" 

     oXmlHTTP.setRequestHeader "SOAPAction", "http://tempuri.org/Pragmasyshh/UpdateCancellationDate" 

    SOAPRequest = _ 
     "<?xml version=""1.0"" encoding=""utf-8""?>" &_ 


     "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">" &_ 


    "<soapenv:Header/>" &_ 

    "<soapenv:Body>" &_ 

     "<tem:UpdateCancellationDate>" &_ 



      "<tem:IP>" &_ 

      "<Year>" & valueyear &"</Year>" &_ 

      " <Month>" & value & "</Month>" &_ 



     "           <CancellationDate>" & my value & "</CancellationDate>" &_ 

     " </tem:IP>" &_ 

    " </tem:UpdateCancellationDate>" &_ 

    " </soapenv:Body>" &_ 

"</soapenv:Envelope> "&_ 
    "</xml>" 





    oXmlHTTP.send SOAPRequest  
    Response.Write oXmlHTTP.responseText 

    'Response.Write "<br>END<hr>" 

     'Next 
%> 

に私のコードと、エラーを入れていたコードが、HTMLのその与える誤差を書いていたいただきました!間違ったことで、私は XML解析エラーのエラーを取得していますなぜ私を導いてください。 場所:アプリケーションのURL 行番号248、列26: -------------------------^

+0

SOAPエンベロープの最後に '' ''は必要ありません。 – Lankymart

答えて

0

あなたが宣言

<?xml version="1.0" encoding="utf-8"?> 

は、解析エラーが発生します終わり

</xml> 

を置く実際にはそうではありません添付終了タグが必要であることを前提としているので、それはしません開始タグを見つけることができる

<xml> 

これを削除して解析エラーを修正します。

関連する問題