.Net Web Service Work Book | UserPreferences |
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://localhost"); System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse(); System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream()); Response.Write(reader.ReadToEnd());
¿ÀÈÄ 5:51 2004-05-06
string¿¡ Io.StreamÀ» ¿¬°áÇؼ, XmlWriter?·Î xml ³»çÇϱâ.
System.Text.StringBuilder strReturn = new System.Text.StringBuilder(); System.IO.StringWriter strWriter = new System.IO.StringWriter(strReturn); System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(strWriter); xWriter.WriteStartDocument(); xWriter.WriteStartElement("TestElement"); xWriter.WriteString("OK"); xWriter.WriteEndElement(); xWriter.WriteEndDocument(); strWriter.Close();
System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); strReturn = new string(ByteToHex(md5.ComputeHash((new System.Text.UnicodeEncoding()).GetBytes(strPassword))));
System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); strReturn = new string(ByteToHex(md5.ComputeHash(CharToByte("MD5".ToCharArray()))));
OleDbConnection conn = new OleDbConnection(ConfigurationSettings.AppSettings["DSNConnectionString"]); OleDbCommand comm = new OleDbCommand("Select * from tbTarot", conn); comm.CommandTimeout = 30; OleDbDataAdapter da = new OleDbDataAdapter(); da.SelectCommand = comm; DataSet ds = new DataSet(); da.Fill(ds, "tbTarot"); return ds.GetXml();
ÀÏ´Ü xml °ü·Ã ¾ÆƼŬÀ» Àо¸é¼ »ý°¢À» ÇØ º¸ÀÚ... ¿ÀÈÄ 11:33 2004-05-03
ÀÌ·± ´Ï¹Ì·Ñ ½à½à¹Ù.
.net¿¡¼ char°¡ 16ºñÆ® ¹®ÀÚ·Î Ãë±ÞµÇ´Â ¹Ù¶÷¿¡ byte <-> charÀÇ º¯È¯Àº ºÒ°¡´ÉÇØÁ³´Ù.
private byte[] CharToByte(char[] c) {
byte[] b = new byte[c.Length];
for(int i=0;i<c.Length;i++)
b[i] = (byte)c[i];
return b;
}
private char[] ByteToHex(byte[] b) {
char[] c = new char[b.Length*2];
for (int i = 0; i < b.Length; i++) {
int n = b[i];
c[i * 2] = hexDigits[n >> 4];
c[i * 2 + 1] = hexDigits[n & 0xF];
}
return c;
}
¿ÀÈÄ 2:36 2004-04-17
mdb <-> TarotService? <-> Tarot.mft.co.kr/pda <-> flash ui <-> client
ado.net webservice-func xml-message flash(activex)
·Î±×ÀÎ
<request_login>
<userinfo id="tempid" />
<password method="md5">temppwd</password>
</request_login>
<response_login result="fail" error="error_no_id">
<response_login result="fail" error="error_password">
<response_login result="fail" error="error_unknown">
<response_login result="ok" user_pid="12" />
out:user_pid
ȸ¿ø°¡ÀÔ
<request_userjoin>
<userinfo id="tempid" email="[email protected]" etc... />
<password method="md5">temppwd</password>
</request_userjoin>
out:
<response_userjoin result="ok"/>
<response_userjoin result="fail" error="error_exist_id"/>
<response_userjoin result="fail" error="error_unknown"/>
ȸ¿øÁ¤º¸ º¯°æ
<request_usermodify>
<userinfo id="tempid" email="[email protected]" etc... />
<password method="md5">temppwd</password>
<password_new method="md5">temppwd</password_new>
</request_usermodify>
<response_usermodify result="ok"/>
<response_usermodify result="fail" error="error_password"/>
<response_usermodify result="fail" error="error_unknown"/>
Ä«µåÁ¤º¸ ¿¶÷
<request_cardinfo card_pid="1" />
<response_cardinfo>
<cardinfo card_pid="1" card_code="m01" image_url="">
<keyword>ÀÌ Ä«µå´Â..</keyword>
<content>ÀÌ Ä«µå´Â..</content>
</cardinfo>
</response_cardinfo>
Ä«µå ¹Þ±â (seed °ªÀ» ÀÌ¿ëÇؼ ·£´ýÇÏ°Ô)
<request_tarot method="nordic" user_pid="" />
<response_tarot result="ok" method="nordic" archive_pid="2" card_count="10">
<cardinfo>..</cardinfo>
<cardinfo>..</cardinfo>
<cardinfo>..</cardinfo>
</response_tarot>
Ä«µå Á¡ ¾ÆÄ«ÀÌºê ¸ñ·Ï °¡Á®¿À±â
<request_tarot_archivelist user_pid="1" page="0">
<response_tarot_archivelist result="ok" user_pid="1" page="0">
<archive archive_pid="0" archive_title="" archive_date="2004/10/2 17:33:12" />
<archive archive_pid="1" archive_title="" archive_date="2004/10/2 18:33:12" />
</response_tarot_archivelist>
Ä«µå Á¡ ¾ÆÄ«ÀÌºê °¡Á®¿À±â
<request_tarot_archive archive_pid="1" />
<response_tarot_archive result="ok" method="nordic" card_count="10">
<archive archive_pid="0" archive_title="" archive_date="2004/10/2 17:33:12" />
<cardinfo>..</cardinfo>
<cardinfo>..</cardinfo>
</response_tarot_archive>
À̸ÞÀÏ ¹ß¼Û
<request_tarot_archive_mail archive_pid="" />
<response_tarot_archive_mail result="ok" />
<response_tarot_archive_mail result="fail" error="error_smtp"/>
<request_xxxx>
<response_xxxx>
<invalid_message />
¿ÀÀü 12:11 2004-04-10
msdn ÇÑ±Û ÆäÀÌÁö
ÇÁ·Î±×·¡¹ÖºÐ·ù