萨翁错误:wsdl'是一个未声明的命名空间

发布于 2024-11-26 02:19:25 字数 1041 浏览 0 评论 0原文

我正在得到 (soap:Server) 'wsdl' 是未声明的命名空间错误

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

在肥皂请求中生成以下肥皂正文

<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>

I am getting
(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

Following soap body is generated in soap request

<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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷离° 2024-12-03 02:19:25

尝试下面的代码。

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

它可能对你有帮助。

try below code.

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

It might help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文