Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java soap信封头中的重要值_Java_Web Services_Soap_Wsdl - Fatal编程技术网

Java soap信封头中的重要值

Java soap信封头中的重要值,java,web-services,soap,wsdl,Java,Web Services,Soap,Wsdl,有人能给我解释一下为什么web服务的开发人员有时会在消息头中存储重要的变量吗 例如: <wsdl:message name="PSIMCmtplPaymentResponse"> <wsdl:part name="parameters" element="tns:PSIMCmtplPaymentResponse"/> /wsdl:message> <wsdl:message name="PSIMCmtplPaymentResponse_Headers">

有人能给我解释一下为什么web服务的开发人员有时会在消息头中存储重要的变量吗

例如:

<wsdl:message name="PSIMCmtplPaymentResponse">
<wsdl:part name="parameters" element="tns:PSIMCmtplPaymentResponse"/>
/wsdl:message>
<wsdl:message name="PSIMCmtplPaymentResponse_Headers">
<wsdl:part name="code" element="tns:code"/>
<wsdl:part name="message" element="tns:message"/>
<wsdl:part name="result" element="tns:result"/>
</wsdl:message>
而不是smth,如:

PSIMCmtplPaymentResponse response = service.cmtplPayment(request);
String paymentResult = response.getResult()
除了支付请求外,还可以同时调用对web服务的一些其他请求,而且我担心当方法

getMessageContext("In") 
调用时,可能会遇到来自完全不同的查询的值

我这样问是因为这不是我第一次遇到这样的不便。这是一种普遍接受的协议或惯例吗?或者这只是web服务开发人员的个人偏好

getMessageContext("In")