试图指定一个自定义的肥皂标题。不确定如何填充 SoapEnvelope.headerOut 属性。
到目前为止我的代码?
String soapAction = serviceNamespace + "/SearchCustomer";
SoapObject rpc = new SoapObject(serviceNamespace, "SearchCustomers");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.ENC;
rpc.addProperty("searchBy", searchBy);
rpc.addProperty("groupBy", Integer.toString(groupBy));
这是标题 WSDL 提取...
<soap:Header>
<MISHeader xmlns="http://NCBI/WS/CRM">
<applicationName>string</applicationName>
<userName>string</userName>
</MISHeader>
</soap:Header>