본문 바로가기

개발

asp에서 soap 호출(닷넷 웹서비스-asmx) 후 return XML 원형보기


<%
Response.Charset ="EUC-KR"


Set oSoap = Server.CreateObject("MSSOAP.SoapClient30")
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument.4.0")

oSoap.ClientProperty("ServerHTTPRequest") = True
call oSoap.mssoapinit("http://주소/페이지.asmx?WSDL")

xmlDoc.DocumentElement = oSoap.MSGTEST("C100").Context
Response.Write xmlDoc.XML&"<br />"

Set root = xmlDoc.documentElement
For i = 0 To (root.childNodes.length - 1)
  Response.Write root.childNodes.Item(i).childNodes.Item(0).Text
Next

Set oSoap = Nothing
Set xmlDoc = Nothing

if err <> 0 then

response.write err.description &"<br />"

else
response.write  "성공<br />"
end if


%>