我在我的解決方案中有一個服務引用,該引用設置爲Java Web服務,但我沒有訪問其代碼。Java webservice返回錯誤時,C#客戶端使用
每次我把這個Web服務,我發現了以下錯誤:
Java class com.thomson.ecom.service.bean.product.Material doesn't support necessary mechanism for marshalling/unmarshalling. Adapter error. element text content may not contain START_ELEMENT; nested exception is com.thomson.mis.xml.TypeSupportException: Java class com.thomson.ecom.service.bean.product.Material doesn't support necessary mechanism for marshalling/unmarshalling. Adapter error. element text content may not contain START_ELEMENT
我的代碼:
using(var ws = new WebServiceX.ServiceCliente())
{
var obj = new ProductInformation
{
ProductId = "TEST"
};
ws.EndPoint.Address = new EndpointAddres("http://myurl.com");
var ret = ws.MyMethod(obj);
}
我已經嘗試過與一個Web引用,但我得到了同樣的錯誤。難道我做錯了什麼?