在变量中传递XML以卷曲shell中的有效负载,从而产生错误"读取XMLStreamReader时出错。"

时间:2014-03-27 10:16:24

标签: xml web-services shell curl soap

读取XMLStreamReader时出错。执行以下shell脚本时

> #!/bin/sh
> 
> read -d '' delete_payload <<"EOF" 
><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:typ="http://someurl.com/vi/ma">    <soapenv:Header/>   
> <soapenv:Body>
>       <typ:DecommissionRequest>
>          <typ:Credentials>
>             <typ:Source></typ:Source>
>             <typ:Username></typ:Username>
>             <typ:Password></typ:Password>
>          </typ:Credentials>
>          <typ:PeerHmIP>Secondary_IP</typ:PeerHmIP>
>       </typ:DecommissionRequest>    </soapenv:Body> </soapenv:Envelope>
> EOF
> 
> 
> resp=$(curl -ks \
>                 -H "Content-Type: text/xml;charset=UTF-8" \
>                 -H "SOAPAction:Delete" \
>                 -d $delete_payload \
>                 https://serverip:8080/vi)
>echo "$resp"

OutPut

  

soap:客户端错误   读   XMLStreamReader的。

0 个答案:

没有答案