在我的一个应用程序中,我想向Object
WCF 服务发送一个。这Object
绑定了三个数据。我不知道怎么寄。
我努力了
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapObject map = new SoapObject(NAMESPACE, "New Role");
map.addProperty("RoleID", "ROLEAAAA0001");
map.addProperty("RoleName", "MOB_Gunaseelan");
map.addProperty("ActionBy", "Gunaseelan");
request.addSoapObject(map);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE transport = new HttpTransportSE(URL);
try {
transport.call(SOAP_ACTION, envelope);
} catch (Exception e) {
e.printStackTrace();
}
SoapFault fault = (SoapFault) envelope.bodyIn;
System.out.println("Fault : " + fault.toString());
这边走。在这里,我想将RoleID
, RoleName
,绑定ActionBy
为一个对象。在 WCF 服务中,我的同事将此对象转换为他的舒适对象,然后将其提取。所以我想绑定。有可能吗朋友。如果可能的话,请指导我。
提前致谢。