[英]How to handle custom objects in WebService with wsdl.exe
我有一個由該Java類定義的Java Web服務:
@WebService()
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class ModelSim {
/* ... */
public boolean CheckCondition(Condition condition) {
return condition.check(m_System, null);
}
}
我使用以下方法部署了Web服務:
ModelSim server = new ModelSim(m_Model);
Endpoint endpoint = Endpoint.publish("http://localhost:8181/uppaal", server);
CheckCondition(...)
接受一個Condition
對象,該對象對來自Condition
其他對象具有引用。
我部署了WebService,並使用wsdl.exe
生成了C#類
wsdl.exe
現在創建了一個代理,該代理可以使用也在代理中定義的對象調用CheckCondition
,但該對象為空:
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://WebService/")]
public abstract partial class condition {
}
我可以像在Java中一樣實現Condition
對象(做很多工作,所以我還沒做過),還是可以為Condition
對象自動生成C#代碼?
WSDL尚未在名稱旁邊提供有關Condition
對象的任何信息。 因此,也許我可以告訴Java使WSDL更明確?
感謝您的任何提示。
該死的,只是因為Java端的條件對象沒有字段。 所以對我有用。 也許我需要休息一下;)
問題可以結束。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.