如何通過bash腳本發佈以下肥皂信封。bash腳本中的肥皂信封
在PHP中,我會使用cURL後,但不知道如何翻譯成bash?
<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<n:Request xmlns:n="http://www.****.com/iprs/soap" env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" env:mustUnderstand="true">UserMod</n:Request>
</env:Header>
<env:Body>
<n:RequestUserMod xmlns:n="http://www.****.com/iprs/soap">
<n:UserID>****</n:UserID>
<n:UserData >
<n:SystemName>****</n:SystemName>
<n:AdminState>enabled</n:AdminState>
<n:CategoryTypeID>****</n:CategoryTypeID>
<n:Permissions>****</n:Permissions>
<n:BillingProgID>****</n:BillingProgID>
<n:DefaultGroupID>****</n:DefaultGroupID>
<n:PrimarySiteID>****</n:PrimarySiteID>
<n:SecondarySiteID>****</n:SecondarySiteID>
<n:ContactInfo></n:ContactInfo>
<n:Password>****</n:Password>
</n:UserData>
</n:RequestUserMod>
</env:Body>
</env:Envelope>
如果可能的話我也想檢測的響應,這應該是:
HTTP/1.1 200 OK
Content-Type:application/soap+xml; charset="utf-8"
Content-Length:509
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Header>
<n:Response xmlns:n="http://www.*****.com/iprs/soap" env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" env:mustUnderstand="true">UserMod</n:Response>
</env:Header>
<env:Body>
<n:ResponseUserMod xmlns:n="http://www.*****.com/iprs/soap">
<n:StatusReport>
<n:Code>ok</n:Code>
<n:SubCode>0</n:SubCode>
</n:StatusReport>
</n:ResponseUserMod>
</env:Body>
</env:Envelope>
對於初學者,您需要一個可以執行HTTP的命令行工具。嘗試「wget」。 http://www.gnu.org/software/wget/ – EJK