Class: WSDL::Request::RPCWrapper Private
- Inherits:
-
Object
- Object
- WSDL::Request::RPCWrapper
- Defined in:
- lib/wsdl/request/rpc_wrapper.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wraps request body nodes in an RPC operation element for RPC/literal style.
Per SOAP 1.1 §7.1 and WS-I Basic Profile §4.7.10, an RPC/literal request
wraps its body parts in an element named after the operation, qualified
with the namespace from soap:body/@namespace.
Instance Method Summary collapse
-
#initialize(operation_name:, namespace_uri:) ⇒ RPCWrapper
constructor
private
A new instance of RPCWrapper.
-
#wrap(document) ⇒ Request::Envelope
private
Wraps the document's body nodes in an RPC wrapper element.
Constructor Details
#initialize(operation_name:, namespace_uri:) ⇒ RPCWrapper
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RPCWrapper.
15 16 17 18 |
# File 'lib/wsdl/request/rpc_wrapper.rb', line 15 def initialize(operation_name:, namespace_uri:) @operation_name = operation_name @namespace_uri = namespace_uri end |
Instance Method Details
#wrap(document) ⇒ Request::Envelope
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Wraps the document's body nodes in an RPC wrapper element.
Returns the document unchanged if wrapping is not needed (empty body or already wrapped).
27 28 29 30 31 32 |
# File 'lib/wsdl/request/rpc_wrapper.rb', line 27 def wrap(document) return document if document.body.empty? return document if already_wrapped?(document.body) build_wrapped_document(document) end |