0

(soap:Server) 'wsdl' is an undeclared namespace error を取得しています

response = client.request :submit_new_order do
    soap.body = {"CompanyID" => "EPIC03", "SalesOrderData" => {"SalesOrderDataSet" => {"OrderHed" => {"Company" => "EPIC03", "OrderNum" => "0", "CustNum" => "90", "CustomerCustID" => "VJCUST","TermsCode" => "15", "CurrencyCode" => "USD"}}}}    end

SOAP リクエストでは、次の SOAP 本体が生成されます

<env:Body><ins0:SubmitNewOrder><ins0:CompanyID>EPIC03</ins0:CompanyID><ins0:SalesOrderData><ins1:SalesOrderDataSet><wsdl:OrderHed><wsdl:TermsCode>15</wsdl:TermsCode><wsdl:CustNum>90</wsdl:CustNum><wsdl:OrderNum>0</wsdl:OrderNum><wsdl:CustomerCustID>VJCUST</wsdl:CustomerCustID><wsdl:Company>EPIC03</wsdl:Company><wsdl:CurrencyCode>USD</wsdl:CurrencyCode></wsdl:OrderHed></ins1:SalesOrderDataSet></ins0:SalesOrderData></ins0:SubmitNewOrder></env:Body>
4

1 に答える 1

0

以下のコードを試してください。

client.request(:submit_new_order) do |soap|
  client.http.headers['SOAPAction'] = "SOAPAction url goes here"
  soap.input = [  "SubmitNewOrder",   {"xmlns" => "namespace url goes here"}]
  soap.body = {"SalesOrderData"=>{"SalesOrderDataSet"=>{"OrderDtl"=>{"Co mpany"=>"EPIC03","OrderNum"=>0,"OrderLine"=>1,"PartNum"=>"00C1","CustNum"=>90,"SellingQuantity"=>1},"OrderHed"=>{"Company"=>"EPIC03","OrderNum"=>0,"CustNum"=>90,"CustomerCustID"=>"VJCUST","TermsCode"=>15,"CurrencyCode"=>"USD"}},:attributes! => {"SalesOrderDataSet" => { "xmlns" => "" } } },"CompanyID"=>"EPIC03"}
end

それはあなたを助けるかもしれません。

于 2011-07-26T09:30:57.160 に答える