當前位置:首頁 » 網頁前端 » web返回
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

web返回

發布時間: 2022-02-06 13:59:57

⑴ webservice怎麼返回數據

如果你不會webservice 那隨便新建一個 web服務裡面自帶的方法 返回值string 這個就是返回值了

如果你不會調用 如果是c#就直接添加引用 如果是服務的話 直接構造httppost就行了.

⑵ Javaweb返回給Android客戶端json中文字元亂碼

JavaWeb的各種中文亂碼終極解決方法:一、Servlet輸出亂碼1. 用servlet.getOutStream位元組流輸出中文,假設要輸出的是String str ="測試中文"。1.1 若是本地伺服器與本地客戶端這種就不用說了,直接可以out.write(str.getBytes())可以輸出沒有問題。因為伺服器中用str.getBytes()是採用默認本地的編碼,比如GBK。而瀏覽器也解析時也用本地默認編碼,兩者是統一的,所以沒有問題。1.1 若伺服器輸出時用了, out.write(str.getBytes("utf-8"))。而本地默認編碼是GBK時(比例在中國),那麼用瀏覽器打開時就會亂碼。因為伺服器發送過來的是utf-8的1010數據,而客戶端瀏覽器用了gbk來解碼,兩者編碼不統一,肯定是亂碼。當然,你也可以自己將客戶端瀏覽器的編碼手工調用下(IE菜單是:查詢View->編碼encoding->utf-8),但是這種操作很爛,最好由伺服器輸出響應頭告訴,瀏覽器用哪種編碼來解碼。所以要在伺服器的servlet中,增加response.setHeader("content-type","text/html;charset=utf-8"),當然也可直接用簡單的response.setContentType("text/hmtl;charset=utf-8")。兩種的操作是一樣一樣的。2. 用servlet.getWirter字元流輸出中文,假設要輸出的是String str ="測試中文亂碼"。2.1 若寫成out.print(str)輸出時,客戶端瀏覽器顯示的將全是多個?????的字元,代表在編碼表中肯定就找不到相應的字元來顯示。原因是:servlet.getWriter()得到的字元輸出流,默認對字元的輸出是採用ISO-8859-1,而ISO-8859-1肯定是不支持中文的。所以肯定要首先要做的第一件事:是要將伺服器對象輸出字元能支持中文的。其次伺服器向客戶端寫回的響應頭要告訴客戶端是用了哪種編碼表進行編碼的。而實現這兩個需求,只需要response.setContentType("text/hmtl;charset=utf-8")。就搞定了。特別注意:response.setContentType("text/html;charset=utf-8")要放在PrintOut out = response.getWriter()代碼的前面,否則只是有告訴客戶端用什麼碼表編碼的功能,而伺服器端還是用ISO-8859-1編碼了。再特別提示下:在同一Servlet中的doGet或doPost方法中,不能既用response.getOutputStream又用response.getWriter,因為這兩種response的響應輸出位元組流與字元流是沖突的,只能用其一。二、Servlet文件下載,中文亂碼情況。關鍵是下載時響應頭 content-disposition中attachment;filename=文件名。這個文件名filename不能是含有中文字元串的,要用URLEncoding編碼進行編碼,才能進行進行http的傳輸。三、Servlet的response增加addCookie,cookie中value的中文碼問題解決方法。若想將cookie中存放中文的值,必須用Base64編碼後,發給客戶瀏覽器端進入存儲。而下次客戶端瀏覽訪問是帶回來的cookie中的值,是經過Base64編碼的,所以需要用Base64解碼即可。 Base64編碼主要是解決將特殊字元進行重新編碼,編碼成a-b、A-B、0-9、+與/,字元52,10個數字與一個+,一個/ 共64個字元。它的原理是將原來3個位元組的內容編碼成4個位元組。主要是取位元組的6位後,在前面補00組成一個新的位元組。所以這樣原來的3個位元組共24,被編碼成4個位元組32位了。四、獲取請求參數亂碼GET方式的亂碼:如CN,直接用request.getParameter得到的字元串strCN將會亂碼,這也是因為GET方式是用http的url傳過來的默認用iso-8859-1編碼的,所以首先得到的strCn要再用iso-8859-1編碼得到原文後,再進行用utf-8(看具體頁面的charset是什麼utf-8或gbk)進行解碼即可。new String(strCn.getBytes(「ISO-8859-1」),「UTF-8」);Javaweb返回給Android客戶端json中文字元亂碼

⑶ 被iptable禁的IP訪問web返回什麼狀態碼

被iptables禁止訪問的請求走不到web伺服器上
所以沒有返回的狀態碼
如果禁用使用的是REJECT,則客戶端可以收到REST響應
如果禁用使用的是DROP,則客戶端什麼都收不到,最後超時

⑷ Javaweb返回給Android客戶端json中文字元亂碼

JavaWeb的各種中文亂碼終極解決方法:
一、Servlet輸出亂碼
1.
用servlet.getOutStream位元組流輸出中文,假設要輸出的是String
str
="測試中文"。
1.1
若是本地伺服器與本地客戶端這種就不用說了,直接可以out.write(str.getBytes())可以輸出沒有問題。因為伺服器中用str.getBytes()是採用默認本地的編碼,比如GBK。而瀏覽器也解析時也用本地默認編碼,兩者是統一的,所以沒有問題。
1.1
若伺服器輸出時用了,
out.write(str.getBytes("utf-8"))。而本地默認編碼是GBK時(比例在中國),那麼用瀏覽器打開時就會亂碼。因為伺服器發送過來的是utf-8的1010數據,而客戶端瀏覽器用了gbk來解碼,兩者編碼不統一,肯定是亂碼。當然,你也可以自己將客戶端瀏覽器的編碼手工調用下(IE菜單是:查詢View->編碼encoding->utf-8),但是這種操作很爛,最好由伺服器輸出響應頭告訴,瀏覽器用哪種編碼來解碼。所以要在伺服器的servlet中,增加response.setHeader("content-type","text/html;charset=utf-8"),當然也可直接用簡單的response.setContentType("text/hmtl;charset=utf-8")。兩種的操作是一樣一樣的。
2.
用servlet.getWirter字元流輸出中文,假設要輸出的是String
str
="測試中文亂碼"。
2.1
若寫成out.print(str)輸出時,客戶端瀏覽器顯示的將全是多個?????的字元,代表在編碼表中肯定就找不到相應的字元來顯示。原因是:servlet.getWriter()得到的字元輸出流,默認對字元的輸出是採用ISO-8859-1,而ISO-8859-1肯定是不支持中文的。所以肯定要首先要做的第一件事:是要將伺服器對象輸出字元能支持中文的。其次伺服器向客戶端寫回的響應頭要告訴客戶端是用了哪種編碼表進行編碼的。而實現這兩個需求,只需要response.setContentType("text/hmtl;charset=utf-8")。就搞定了。特別注意:response.setContentType("text/html;charset=utf-8")要放在PrintOut
out
=
response.getWriter()代碼的前面,否則只是有告訴客戶端用什麼碼表編碼的功能,而伺服器端還是用ISO-8859-1編碼了。再特別提示下:在同一Servlet中的doGet或doPost方法中,不能既用response.getOutputStream又用response.getWriter,因為這兩種response的響應輸出位元組流與字元流是沖突的,只能用其一。
二、Servlet文件下載,中文亂碼情況。
關鍵是下載時響應頭
content-disposition中attachment;filename=文件名。這個文件名filename不能是含有中文字元串的,要用URLEncoding編碼進行編碼,才能進行進行http的傳輸。
三、Servlet的response增加addCookie,cookie中value的中文碼問題解決方法。若想將cookie中存放中文的值,必須用Base64編碼後,發給客戶瀏覽器端進入存儲。而下次客戶端瀏覽訪問是帶回來的cookie中的值,是經過Base64編碼的,所以需要用Base64解碼即可。
Base64編碼主要是解決將特殊字元進行重新編碼,編碼成a-b、A-B、0-9、+與/,字元52,10個數字與一個+,一個/
共64個字元。它的原理是將原來3個位元組的內容編碼成4個位元組。主要是取位元組的6位後,在前面補00組成一個新的位元組。所以這樣原來的3個位元組共24,被編碼成4個位元組32位了。
四、獲取請求參數亂碼
GET方式的亂碼:
如<a
href=」/demo5/servlet/RD2?name=中國」>CN</a>,直接用request.getParameter得到的字元串strCN將會亂碼,這也是因為GET方式是用http的url傳過來的默認用iso-8859-1編碼的,所以首先得到的strCn要再用iso-8859-1編碼得到原文後,再進行用utf-8(看具體頁面的charset是什麼utf-8或gbk)進行解碼即可。new
String(strCn.getBytes(「ISO-8859-1」),「UTF-8」);

⑸ webservice返回html怎麼處理

好像是解析xml的jar包問題,javax.xml.parsers.SAXParser.parse方法應該不使用jdk自帶的xml解析jar包,如果是使用jdk1.4+tomcat5.0的話,通常在jre和tomcat里加入一個endorsed目錄,即(如jdk1.4.2\jre\lib\endorsed)和tomcat(如$Tomcat_home$\common\endorsed)。裡面放上專用的xml解析jar包,如xmlsec.jar和xml-api.jar。如果是jdk1.5+tomcat5.5的話應該就不存在這個問題了。

⑹ excel導入網頁數據時,web未返回任何數據

Excel導入外部數據-新建WEB查詢
解決方案:
通過在EXCEL中設置相關屬性來達到要求。
1、點--菜單--視圖--工具欄--外部數據,調出外部數據的工具條,點「數據區域屬性」。
2、在新窗口中,在「數據區域中的行數需刷新而更改的方式」中選擇:
建議:
a.為新數據插入單元格,並刪除沒有使用的單元格;
b.為新數據插入整行,清除沒有使用的單元格。

⑺ .net webservice 返回dateset java如何讀取

java 訪問.net webservice返回的數據集

1. 概述

很多正在開發或者打算開發XML Web Services的程序員都問過這樣的一個問題:"我的WebService返回的結果是一個DataSet類型的對象,但如果我的客戶端不是用.NET寫的(因而沒有內建的DataSet類型),那該如何調用這個WebService並訪問DataSet中的數據呢?"。

對於這個問題,首先應該說的是:1)在多種語言共存的編程環境下,是不適合使用類似DataSet這種只屬於特定語言的數據類型的。不管是在XMLWebServices還是CORBA的環境中,都應該盡量使用簡單數據類型以及簡單數據類型的數組。2)應當很謹慎的決定是否需要通過WebService來返回大量數據。由於網路傳輸的開銷既包括HTTP連接建立的時間,也包括傳送數據的時間,因此需要在減少訪問伺服器次數和減少網路傳輸量之間尋找一個合適的平衡。如非必須,則不適合通過WebService傳送含有幾十條或者幾百條數據的數據表。

然後,就問題本身而言,.NET WebServices返回的DataSet類型是可以直接被其他非.NET的客戶端解析的,因為即便是DataSet類型的返回值,也會被表達成XML格式再進行傳輸。下面的例子就是一個返回類型為DataSet的WebMethod,及其被調用後返回的XML格式數據:

表1. 返回類型為DataSet的Web Method
[WebMethod]
public DataSet GetPersonData()
{
DataTable table=new DataTable("Person");
table.Columns.Add("Name");
table.Columns.Add("Gender");
table.Rows.Add(new string[2]{"Alice","Female"});
table.Rows.Add(new string[2]{"Bob","Male"});
table.Rows.Add(new string[2]{"Chris","Male"});

DataSet dataset=new DataSet("PersonTable");
dataset.Tables.Add(table);
return dataset;
}

表2. 被格式化成XML的DataSet
<?xml version="1.0"encoding="utf-8"?>
<DataSetxmlns="http://tempuri.org/">
<xs:schema id="PersonTable" xmlns=""xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="PersonTable"msdata:IsDataSet="true" msdata:Locale="zh-CN">
<xs:complexType>
<xs:choicemaxOccurs="unbounded">
<xs:element name="Person">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string"minOccurs="0" />
<xs:element name="Gender" type="xs:string"minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgramxmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<PersonTable xmlns="">
<Person diffgr:id="Person1" msdata:rowOrder="0"diffgr:hasChanges="inserted">
<Name>Alice</Name>
<Gender>Female</Gender>
</Person>
<Person diffgr:id="Person2" msdata:rowOrder="1"diffgr:hasChanges="inserted">
<Name>Bob</Name>
<Gender>Male</Gender>
</Person>
<Person diffgr:id="Person3" msdata:rowOrder="2"diffgr:hasChanges="inserted">
<Name>Chris</Name>
<Gender>Male</Gender>
</Person>
</PersonTable>
</diffgr:diffgram>
</DataSet>

從上面的例子可以看出,直接使用DataSet作為返回類型,其結果是相當復雜的,其中不但包含了DataSet中的數據,還包括了數據更改的信息,以及DataSet的Schema。雖然有些工具能夠生成一個類似DataSet的客戶端類型,但無論是直接解析復雜的XML還是使用類似DataSet的類,都不夠直接不夠清晰。

解決這個問題的方案有兩種:

1)用簡單數據類型構造自定義類型,用每一個自定義類型對象封裝數據集中的一行,將自定義類型對象的數組(Array)返回客戶端;由於是用簡單數據類型定義,客戶端能夠完全不變的還原出自定義類型的定義;

2)用DataSet.WriteXML()方法將數據集中的數據提取成XML格式,並以字元串的形式返回給客戶端,再由客戶端解析XML字元串,還原出數據。由於使用WriteXML()的時候能夠過濾掉冗餘信息,返回的內容和圖表2中的內容相比大大簡化了。

2. 創建.NET Web Services,返回數據集合

藉助於Visual Studio.NET,只需編寫Web Method本身的代碼,即可非常快速的創建可以實用的WebServices:

表3. 用.NET實現的XML Web Services
[WebMethod]
public Person[] GetPersons()
{
Person Alice=newPerson("Alice","Female");
Person Bob=newPerson("Bob","Male");
Person Chris=newPerson("Chris","Female");
Person Dennis=newPerson("Dennis","Male");

return newPerson[]{Alice,Bob,Chris,Dennis};
}

[WebMethod]
public string GetPersonTable()
{
DataTabletable=new DataTable("Person");
table.Columns.Add("Name");
table.Columns.Add("Gender");
table.Rows.Add(new string[2]{"Alice","Female"});
table.Rows.Add(new string[2]{"Bob","Male"});
table.Rows.Add(new string[2]{"Chris","Female"});
table.Rows.Add(new string[2]{"Dennis","Male"});
table.Rows.Add(newstring[2]{"Eric","Male"});

DataSetdataset=new DataSet("PersonTable");
dataset.Tables.Add(table);

System.Text.StringBuilderstrbuilder=new System.Text.StringBuilder();
StringWriter writer=new StringWriter(strbuilder);
dataset.WriteXml(writer,System.Data.XmlWriteMode.IgnoreSchema);

returnstrbuilder.ToString();
}

在上面的代碼中,函數GetPersons()和GetPersonTable()分別對應於"1.概述"中所提到的兩種解決方案。其中,Person類型就是用於封裝數據集中一行數據的自定義的數據類型:

表4. 自定義類型Person
[Serializable]
public class Person
{
public Person()
{
}

public Person(stringname,string gender)
{
this.Name=name;
this.Gender=gender;
}

public string Name="";
public stringGender="";
}

⑻ webservice返回的xml怎麼解析

webservice返回的xml解析方法:

一般來說,調用webService通常需要幾個步驟,在調用之前,首先需要下載Soap的jar包。

1、參數設置:上面說到的幾個參數都要先設置,這主要依賴於要調用的web'Service的網址:

//命名空間

StringnameSpace="http://WebXml.com.cn/";

//調用的方法名稱

StringmethodName="getDetailInfoByTrainCode";

//EndPoint

StringendPoint="http//webservice.webxml.com.cn/WebServices/TrainTimeWebService.asmx";

//SOAPAction

StringsoapAction="http//WebXml.com.cn/getDetailInfoByTrainCode";

2、指定命名空間與調用方法名

//指定WebService的命名空間和調用的方法名

SoapObjectrpc=newSoapObject(nameSpace,methodName);

3、設置參數:

//設置需調用WebService介面需要傳入的兩個參數TrainCode、userId

rpc.addProperty("TrainCode",params[0]);

rpc.addProperty("UserID","");

4、生成調用WebService方法的SOAP請求信息

//生成調用WebService方法的SOAP請求信息,並指定SOAP的版本

=newSoapSerializationEnvelope(SoapEnvelope.VER12);

envelope.bodyOut=rpc;

5、調用WebService方法

try{

//調用WebService

transport.call(soapAction,envelope);

}catch(Exceptione){

e.printStackTrace();

}

6、解析WebService中的DataSet數據

SoapObjectsoap1=(SoapObject)object.getProperty("");

SoapObjectchilds=(SoapObject)soap1.getProperty(1);

SoapObjectsoap2=(SoapObject)childs.getProperty(0);

///

for(inti=0;i<soap2.getPropertyCount();i++){

SoapObjectsoap3=(SoapObject)soap2.getProperty(i);

///

Infoinfo=newInfo();

info.setStation(soap3.getProperty(0).toString());

info.setArriveTime(soap3.getProperty(1).toString());

info.setStartTime(soap3.getProperty(2).toString());

info.setKm(soap3.getProperty(3).toString());

Raininfo.add(info);

//result=soap3.getProperty(3).toString();

}

數據格式如下:

⑼ 求教Webservice能否返回Document類型

WebService 服務可以返回任何可序列化的對象.本文代碼給出返回基本數據類型及實體類結構示例和調用代碼示例.
WebService代碼如下:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
namespace StudentServer
{
/// <summary>
/// 本類實現WebService服務
/// 提供對各種數據類型的返回例子
/// 包括:
/// 基本數據類型(string,ini,bool,long,float等)
/// 類結構型(class),必須是可序列化的類
/// DataSet類型
/// </summary>
public class Demo : System.Web.Services.WebService
{
public Demo()
{
//CODEGEN: 該調用是 ASP.NET Web 服務設計器所必需的
InitializeComponent();
}
#region 組件設計器生成的代碼

//Web 服務設計器所必需的
private IContainer components = null;

/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void InitializeComponent()
{
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion
// WEB 服務示例
// HelloWorld() 示例服務返回字元串 Hello World
// 若要生成,請取消注釋下列行,然後保存並生成項目
// 若要測試此 Web 服務,請按 F5 鍵
/// <summary>
/// 字元串型
/// </summary>
/// <returns>Hello World</returns>
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
/// <summary>
/// 整型
/// </summary>
/// <returns>Int</returns>
[WebMethod]
public int GetInt()
{
return 1234;
}

/// <summary>
/// 布爾型
/// </summary>
/// <returns>Bool</returns>
[WebMethod]
public bool GetBool()
{
return true;
}
/// <summary>
/// 返回實體類
/// 必須是已序列化的類
/// </summary>
/// <returns>學生類</returns>
[WebMethod]
public Student GetStudent()
{
Student stu = new Student();
stu.Name = "張三";
stu.Age = 25;
stu.Sex = true;
return stu;
}
/// <summary>
/// 返回DataSet數據類型
/// </summary>
/// <returns>DataSet</returns>
[WebMethod]
public DataSet GetDataSet()
{
DataSet ds = new DataSet();
return ds;
}
}

//指示下面的類可序列化
/// <summary>
/// 學生基本信息類
/// </summary>
[Serializable]
public class Student
{
/// <summary>
/// 構造函數
/// </summary>
public Student()
{
}
private string name;
/// <summary>
/// 姓名
/// </summary>
public string Name
{
get
{
return name;
}
set
{
name=value;
}
}
private bool sex;
/// <summary>
/// 性別--布爾型變數真為女,假為男
/// </summary>
public bool Sex
{
get
{
return sex;
}
set
{
sex=value;
}
}
private int age;
/// <summary>
/// 年齡
/// </summary>
public int Age
{
get
{
return age;
}
set
{
age=value;
}
}
}
#endregion
}

調用WebService服務示例代碼如下:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using StudentClient.localhost;
namespace StudentClient
{

/// <summary>
/// 調用學生信息
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnStu_Click(object sender, System.EventArgs e)
{
//實例化服務類
Demo dm = new Demo();
//調用返回實體類服務方法
Student stu = dm.GetStudent();
txtName.Text = stu.Name;
txtSex.Text = (stu.Sex==false?"女":"男");
txtAge.Text = stu.Age.ToString();

}
/// <summary>
/// DataSet數據
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnDataSet_Click(object sender, System.EventArgs e)
{
//實例化服務類
Demo dm = new Demo();
txtOther.Text = dm.GetDataSet().Tables.Count.ToString();
}
/// <summary>
/// 返回字元串
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnHello_Click(object sender, System.EventArgs e)
{
//實例化服務類
Demo dm = new Demo();
txtOther.Text = dm.HelloWorld();
}
/// <summary>
/// 返回整型
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnInt_Click(object sender, System.EventArgs e)
{
//實例化服務類
Demo dm = new Demo();
txtOther.Text = dm.GetInt().ToString();
}
/// <summary>
/// 返回布爾型
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnBool_Click(object sender, System.EventArgs e)
{
//實例化服務類
Demo dm = new Demo();
txtOther.Text = dm.GetBool().ToString();
}
}
}
也可以用過 xmlinclude申明實體類
[XmlInclude(typeof(Student))] //一定要加上 xmlinclude這一句,實體類是可序列化的
[WebMethod]
這里是類方法

⑽ 如何讓WebServer返回指定XML內容

/*CheckLogin服務*/
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Configuration;
using System.Data;
using System.Data.sqlClient;
using mysql.SQL;
using myfunc.Common;

/// <summary>
/// CheckLogin 的摘要說明
/// </summary>
[WebService(Namespace = "")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class CheckLogin : System.Web.Services.WebService {
public CheckLogin () {
//如果使用設計的組件,請取消注釋以下行
//InitializeComponent();
}
//[WebMethod(Description = "Login", EnableSession = true)]
[WebMethod]
public checkuser Login(string sUserCode, string sPassword)
{
checkuser objcheckuser= new checkuser();
string sCheckLogin = ConfigurationManager.AppSettings["strCheckLogin"];
SqlShell objShell = new SqlShell();
SqlCommand objCommand = new SqlCommand(sCheckLogin);
objCommand.CommandType = CommandType.Text;
objCommand.Parameters.AddWithValue("@sUserCode", sUserCode);
objCommand.Parameters.AddWithValue("@sPassword", sPassword);
DataTable objDataTable = objShell.executeDataSet(ref objCommand).Tables[0];
objcheckuser.logined = (objDataTable.Rows.Count > 0);
if (objcheckuser.logined)
{
//帳號和密碼正確,反回帳號信息
DataRow objDataRow = objDataTable.Rows[0];
objcheckuser.userid = objDataRow["UserID"].ToString().Trim(); ;
objcheckuser.pass = objDataRow["Pass"].ToString().Trim();
objcheckuser.username = objDataRow["UserName"].ToString().Trim();
//檢查Allow欄位是否為空
if (objDataRow.IsNull("Allow")) { objcheckuser.allow = ""; }
else { objcheckuser.allow = objDataRow["Allow"].ToString().Trim(); }
menulist objmenulist = new menulist(objDataRow["UserID"].ToString().Trim());
objcheckuser.menuxml = objmenulist.buf;//返回菜單列表的XML字元串

}
return objcheckuser;
}
public class checkuser
{
public bool logined;
public string userid;
public string pass;
public string username;
public string allow;
public string menuxml;//返回菜單列表的XML字元串
}
}
/*CheckLogin服務結束*/