1
我正在與.Net Web服務交互。根據服務描述,服務器需要base64Binary類型。如何在Scala中將字節數組放入XML中
這是如何我試圖建立SOAP分組:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
</soap:Header>
<soap:Body>
<uploadFile xmlns="http://localhost/">
<FileDetails>
<ReferenceNumber>123</ReferenceNumber>
<FileName>testfile</FileName>
<FullFilePath>file</FullFilePath>
<FileType>1</FileType>
<FileContents>{request.getContent().array()}</FileContents>
</FileDetails>
</uploadFile>
</soap:Body>
</soap:Envelope>
在request.getContent().array()
上面的代碼段我是從在PhoneGap的開發的移動應用程序接收的HTTP請求。
服務器響應FileContents無效。有任何想法嗎?
這真是愚蠢的我(在我的防守 - 這是星期五;-)。感謝您的解決方案。你是救生員,特拉維斯。 – Jack 2012-03-19 07:45:55