.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_Authorization>
<User_ID>asd</User_ID>
<User_Password>asd</User_Password>
</Request_Authorization>
<Response_Authorization>
<Result>OK</Result>
<UserInfo>
<TarotUser>
<user_PID>2</user_PID>
<user_ID>asd</user_ID>
<user_Name>asd</user_Name>
<pwd>asd</pwd>
<email>[email protected]</email>
</TarotUser>
</UserInfo>
</Response_Authorization>
<Response_Authorization>
<Result>Fail</Result>
<Message>...</Message>
</Response_Authorization>
ȸ¿ø°¡ÀÔ
<Request_UserAdd>
<User_ID>Kenial</User_ID>
<User_Name>À̼ö°â</User_Name>
<User_Password>1234</User_Password>
<User_Email>[email protected]</User_Email>
</Request_UserAdd>
<Response_UserAdd>
<Result>OK</Result>
<UserInfo>
<TarotUser>
<user_PID>76</user_PID>
<user_ID>Kenial</user_ID>
<user_Name>À̼ö°â</user_Name>
<pwd>1234</pwd>
<email>[email protected]</email>
</TarotUser>
</UserInfo>
</Response_UserAdd>
ȸ¿øÁ¤º¸ º¯°æ
<Request_UserModify>
<User_ID>Kenial</User_ID>
<User_Name>À̼ö°â</User_Name>
<User_OldPassword>1234</User_OldPassword>
<User_NewPassword>4321</User_NewPassword>
<User_Email>[email protected]</User_Email>
</Request_UserModify>
<Response_UserModify>
<Result>OK</Result>
<UserInfo>
<TarotUser>
<user_PID>76</user_PID>
<user_ID>Kenial</user_ID>
<user_Name>À̼ö°â</user_Name>
<pwd>4321</pwd>
<email>[email protected]</email>
</TarotUser>
</UserInfo>
</Response_UserModify>
Ä«µåÁ¤º¸ ¿¶÷
<Request_GetCards>
<Card_Codes>m02;m01</Card_Codes>
</Request_GetCards>
<Response_Cards>
<Result>OK</Result>
<TarotCardList>
<TarotCard>
<Card_Name_Kr>¿©¼º ´ë»çÁ¦</Card_Name_Kr>
<Card_Name_En>The High Priestess</Card_Name_En>
<Contents>ÀÌ Ä«µå´Â....</Contents>
<Meaning>ÁöÇý, °ÇÀüÇÑ ÆÇ´Ü·Â, ¹«ÀÇ½Ä ¼ÓÀÇ ±ú´ÞÀ½, ½Åºñ½º·¯¿ò, ÀϹÝÀû
ÀÎ »ó½Ä, Æò¿Â°ú ħÂø, °´°üÀûÀΠŸ´ç¼º, »óȲÀÇ ÆÇ´Ü, ÅëÂû·Â, ²Þ°ú »ó»ó·ÂÀÇ ¿µÇâ·ÂÀ» ¹ÞÀ½, ´õ
¿í ³ÐÀº ½Çü¸¦ ÆľÇÇÔ, Á÷°ü, Áö½Ä, Áö°¢, ÀÎÁö, ÀÚ±â ÀÇÁ¸, ¹«Ç¥Á¤ÇÑ, °¨µ¿À» ½±°Ô µå·¯³»Áö ¾Ê
´Â, Á¤½ÅÀûÀÌ°í °ü³äÀûÀÎ ´ëÀÎ °ü°è</Meaning>
<Keyword>¼ø¼ö, Áö¼º</Keyword>
<Card_ImageFilename>m02.jpg</Card_ImageFilename>
</TarotCard>
<TarotCard>
<Card_Name_Kr>¸¶¹ý»ç</Card_Name_Kr>
<Card_Name_En>The Magician</Card_Name_En>
<Contents>Ÿ·Î Ä«µåÀÇ...</Contents>
<Meaning>µ¶Ã¢¼º, âÁ¶¼º, »ó»ó·Â, ÀÚ±â ÀÇÁ¸, ÀÚ¹ßÀûÀÎ Çൿ, ÀÚ±â È®½Å
, ¹ß¸íÀÇ ÀçÁÖ, Á¤±³ÇÔ, À¶Å뼺, ź·Â¼º, À¯¿¬¼º, ´É¼ö ´É¶õÇÔ, ÀÚ±â ÅëÁ¦, ÀÚÁ¦½É, ±Ø±â½É, Àçºü
¸¥ ¼ÕÀçÁÖ, Ã¥·«, ¼ÓÀÓ¼ö¸¦ ºÎ¸± ¼ö ÀÖÀ½</Meaning>
<Keyword>âÁ¶, ½ÃÃÊ</Keyword>
<Card_ImageFilename>m01.jpg</Card_ImageFilename>
</TarotCard>
</TarotCardList>
</Response_Cards>
Ä«µå Á¡ ¾ÆÄ«ÀÌºê ¸ñ·Ï °¡Á®¿À±â
<Request_ArchiveList>
<User_ID>asd</User_ID>
</Request_ArchiveList>
<Response_ArchiveList>
<Result>OK</Result>
<ArchiveList>
<TarotArchive>
<Archive_PID>1</Archive_PID>
<User_PID>2</User_PID>
<Question_Text>testquestion</Question_Text>
<Question_Date>2003-11-11T21:57:09.0000000+09:00</Question_Date>
<A_Card_Code_1>m01</A_Card_Code_1>
<A_Card_Code_2>m01</A_Card_Code_2>
<A_Card_Code_3>m01</A_Card_Code_3>
<A_Card_Code_4>m01</A_Card_Code_4>
<A_Card_Code_5>m01</A_Card_Code_5>
<A_Card_Code_6>m01</A_Card_Code_6>
<A_Card_Code_7>m01</A_Card_Code_7>
<A_Card_Code_8>m01</A_Card_Code_8>
<A_Card_Code_9>m01</A_Card_Code_9>
<A_Card_Code_10>m01</A_Card_Code_10>
</TarotArchive>
<TarotArchive>
<Archive_PID>2</Archive_PID>
<User_PID>2</User_PID>
<Question_Text>asd</Question_Text>
<Question_Date>2003-11-11T22:12:33.0000000+09:00</Question_Date>
<A_Card_Code_1 />
<A_Card_Code_2 />
<A_Card_Code_3 />
<A_Card_Code_4 />
<A_Card_Code_5 />
<A_Card_Code_6 />
<A_Card_Code_7 />
<A_Card_Code_8 />
<A_Card_Code_9 />
<A_Card_Code_10 />
</TarotArchive>
</ArchiveList>
</Response_ArchiveList>
Ä«µå Á¡ ¾ÆÄ«ÀÌºê °¡Á®¿À±â
<Request_ArchiveInfo>
<Archive_PID>23</Archive_PID>
</Request_ArchiveInfo>
Response_ArchiveInfo>
<Result>OK</Result>
<ArchiveInfo>
<TarotArchive>
<Archive_PID>13</Archive_PID>
<User_PID>2</User_PID>
<Question_Text>testquestion</Question_Text>
<Question_Date>2003-11-11T22:18:39.0000000+09:00</Question_Date>
<A_Card_Code_1>m01</A_Card_Code_1>
<A_Card_Code_2>m01</A_Card_Code_2>
<A_Card_Code_3>m01</A_Card_Code_3>
<A_Card_Code_4>m01</A_Card_Code_4>
<A_Card_Code_5>m01</A_Card_Code_5>
<A_Card_Code_6>m01</A_Card_Code_6>
<A_Card_Code_7>m01</A_Card_Code_7>
<A_Card_Code_8>m01</A_Card_Code_8>
<A_Card_Code_9>m01</A_Card_Code_9>
<A_Card_Code_10>m01</A_Card_Code_10>
</TarotArchive>
</ArchiveInfo>
</Response_ArchiveInfo>
À̸ÞÀÏ ¹ß¼Û
<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 ÇÑ±Û ÆäÀÌÁö
ÇÁ·Î±×·¡¹ÖºÐ·ù