Tôi có một vấn đề mà tôi tin là liên quan đến không gian tên. WSDL có thể được tải về từ đây: http://promostandards.org/content/wsdl/Order%20Shipment%20NotificationService/1.0.0/OSN-1-0-0.zipruby savon và wsdl namespacing
Khi yêu cầu được tạo ra nó trông như thế này:
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.promostandards.org/WSDL/OrderShipmentNotificationService/1.0.0/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<tns:GetOrderShipmentNotificationRequest>
<tns:wsVersion>1.0.0</tns:wsVersion>
<tns:id>myusername</tns:id>
<tns:password>mypassword</tns:password>
<tns:queryType>3</tns:queryType>
<tns:shipmentDateTimeStamp>2017-07-19</tns:shipmentDateTimeStamp>
</tns:GetOrderShipmentNotificationRequest>
</soapenv:Body>
</soapenv:Envelope>
Điều này dẫn đến một lỗi xà phòng.
Khi soapUI xây dựng theo yêu cầu sử dụng WSDL cùng nó trông như thế này
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.promostandards.org/WSDL/OrderShipmentNotificationService/1.0.0/" xmlns:shar="http://www.promostandards.org/WSDL/OrderShipmentNotificationService/1.0.0/SharedObjects/">
<soapenv:Header/>
<soapenv:Body>
<ns:GetOrderShipmentNotificationRequest>
<shar:wsVersion>1.0.0</shar:wsVersion>
<shar:id>myusername</shar:id>
<shar:password>mypassword</shar:password>
<ns:queryType>3</ns:queryType>
<ns:shipmentDateTimeStamp>2017-07-19</ns:shipmentDateTimeStamp>
</ns:GetOrderShipmentNotificationRequest>
</soapenv:Body>
</soapenv:Envelope>
Bạn có thể thấy rằng soapUI đã đặt tên người dùng và mật khẩu bên trong "shar" namespace. Tôi nhận thấy rằng điều này không được liệt kê trực tiếp trong WSDL hoặc trong bất kỳ tệp XSD nào được WSDL tải trực tiếp. Nó được tải một cái gì đó như WSDL => XSD file => XSD tập tin có chứa không gian tên shar. đó có thể là vấn đề? Làm thế nào tôi có thể thêm không gian tên cho chỉ 3 của các phím? Tôi đang sử dụng savon 2.11.1 và nori 2.6.0