我正在使用JbossWS在Java中开发Web服务。
WS非常简单。像这样:
@WebService(targetNamespace="http://www.huawei.com/schema/syncorder/v1-0/", name="SyncOrderRelationExt")
public interface ISyncOrderRelation {
@WebMethod
public int SyncOrderRelationExt(String SPID, String productID, String serviceID);
实施
@WebService(portName="SyncOrderRelationExtHttpPort", serviceName="SyncOrderRelationExt", targetNamespace="http://www.huawei.com/schema/syncorder/v1-0/")
public class SyncOrderRelation implements ISyncOrderRelation
{
public int SyncOrderRelationExt(String SPID, String productID, String serviceID)
{
return 0;
}
}
一切似乎都运行正常..但是现在从.NET proyect调用这个WS,我必须做这样的事情:
SyncOrderRelationExt syncNTS = new SyncOrderRelationExt();
var params= new SyncOrderRelationExt1()
{
arg1 = "a",
arg2 = "b",
arg3 = "c",
};
var res = syncNTS.CallSyncOrderRelationExt(params);
int x = res.@return;
购买我想以这种方式调用WS(要求):
SyncOrderRelationExt sync = new SyncOrderRelationExt();
int res2 = sync.CallSyncOrderRelationExt("a", "b", "c");
有没有办法在Java中更改定义以使客户端调用不同?
非常感谢你。