如何使用ruby savon客户端发送Soap自定义消息

时间:2013-09-16 15:21:57

标签: ruby soap

我需要在Ruby中发送消息请求。此消息在SoapUI中工作,请参见下面的示例:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

    <soapenv:Body><auth:callAuth xmlns:auth="http://auth.org"><auth:StringInput><?xml version="1.0" encoding="UTF-8" ?><ns0:TestService  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://xml.netbeans.org/schema/TestService" xsi:schemaLocation="http://xml.netbeans.org/schema/TestService AuthReqType.xsd http://xml.netbeans.org/schema/TestService HeaderType.xsd http://xml.netbeans.org/schema/TestService AuthResType.xsd http://xml.netbeans.org/schema/TestService TestService.xsd"><ns0:Header><ns0:Version>3.4.2</ns0:Version><ns0:SrcApp>Test</ns0:SrcApp><ns0:TargetApp>AppName</ns0:TargetApp><ns0:SrcMsgId>00000001198469411500</ns0:SrcMsgId><ns0:TranTimeStamp>20130329104502</ns0:TranTimeStamp></ns0:Header><ns0:Body><ns0:AuthReq><ns0:MsgType>0200</ns0:MsgType><ns0:RvslCde>00</ns0:RvslCde></ns0:AuthReq></ns0:Body></ns0:TestService>  ]]></auth:StringInput></auth:callAuth></soapenv:Body>

0 个答案:

没有答案