0
Rubyを初めて使用しています。パラメータをWebメソッドに渡すのに問題があります。Rubyウェブサービス
factory = SOAP::WSDLDriverFactory.new('https://api.affili.net/V2.0/Logon.svc?wsdl')
driver = factory.create_rpc_driver
driver.Logon(...)
どのように必要なパラメータを渡すことができますか?私は配列を渡そうとしましたが、パラメータがゼロになっているので、パラメータのクラスを作成しようとしましたが、同じ問題が発生します。上のログの
WSDLは、私がログオン方法にのparamsを渡すことができますどのように
<xsd:complexType name="Logon">
<xsd:sequence>
<xsd:element minOccurs="0" name="Username" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="Password" nillable="true" type="xsd:string"/>
<xsd:element name="WebServiceType" type="tns:WebServiceTypes"/>
<xsd:element minOccurs="0" name="DeveloperSettings" nillable="true" type="tns:TokenDeveloperDetails"/>
<xsd:element minOccurs="0" name="ApplicationSettings" nillable="true" type="tns:TokenApplicationDetails"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Logon" nillable="true" type="tns:Logon"/>
のですか?
はあなたのログオン方法
factory = SOAP::WSDLDriverFactory.new('https://api.affili.net/V2.0/Logon.svc?wsdl')
driver = factory.create_rpc_driver
parameters = {
'Username' => 'your-username',
'Password' => 'your-password',
'WebServiceType' => 'your-webservicetype',
'DeveloperSettings' => 'your-settings',
'ApplicationSettings' => 'your-appsettings'
}
driver.Logon(parameters)
幸運にハッシュとして