0
我在形成SOAP請求時遇到了問題。如何在Soap請求中設置標題Java
在那個請求中,我應該在頭部分中添加用戶名,密碼和一些其他信息,而不是有效載荷的一部分。
低於WSDL
<wsdl:message name="InputUploadCustomerDocument_Headers">
<wsdl:part name="DocumentType" element="tns:DocumentType"/>
<wsdl:part name="FileName" element="tns:FileName"/>
<wsdl:part name="Password" element="tns:Password"/>
<wsdl:part name="PinNo" element="tns:PinNo"/>
<wsdl:part name="UserName" element="tns:UserName"/>
</wsdl:message>
<wsdl:message name="ReturnUploadCustomerDocument">
<wsdl:part name="parameters" element="tns:ReturnUploadCustomerDocument"/>
</wsdl:message>
<wsdl:operation name="UploadCustomerDocument">
<soap:operation soapAction="http://tempuri.org/ISend/UploadCustomerDocument" style="document"/>
<wsdl:input name="InputUploadCustomerDocument">
<soap:header message="tns:InputUploadCustomerDocument_Headers" part="DocumentType" use="literal"/>
<soap:header message="tns:InputUploadCustomerDocument_Headers" part="FileName" use="literal"/>
<soap:header message="tns:InputUploadCustomerDocument_Headers" part="Password" use="literal"/>
<soap:header message="tns:InputUploadCustomerDocument_Headers" part="PinNo" use="literal"/>
<soap:header message="tns:InputUploadCustomerDocument_Headers" part="UserName" use="literal"/>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="ReturnUploadCustomerDocument">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
的條目和InputUploadCustomerDocument Java文件下面,文件沒有用戶名,密碼和其他領域,我需要做reuqest
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"fileData"
})
@XmlRootElement(name = "InputUploadCustomerDocument")
public class InputUploadCustomerDocument {
@XmlElement(name = "FileData", required = true)
protected byte[] fileData;
/**
* Gets the value of the fileData property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getFileData() {
return fileData;
}
/**
* Sets the value of the fileData property.
*
* @param value
* allowed object is
* byte[]
*/
public void setFileData(byte[] value) {
this.fileData = value;
}
之前設置這些參數
}
這是我需要調用
0功能有人可以幫助我如何設置這些標題?