Class: XDS::ProvideAndRegisterDocumentSetBXop
Instance Attribute Summary
Attributes inherited from XdsRequest
#endpoint_uri, #header, #proxy_host, #proxy_port
Instance Method Summary
collapse
Methods inherited from XdsRequest
#to_soap
Constructor Details
Returns a new instance of ProvideAndRegisterDocumentSetBXop.
5
6
7
8
9
|
# File 'lib/xds/provide_and_register_document_set_b_xop.rb', line 5
def initialize(service_url,metadata,document)
super(service_url,"urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b")
@metadata = metadata
@document = document
end
|
Instance Method Details
#execute ⇒ Object
30
31
32
33
|
# File 'lib/xds/provide_and_register_document_set_b_xop.rb', line 30
def execute
post = super
XDS::ProvideAndRegisterDocumentSetBXopResponse.new(self,post)
end
|
#get_parts ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/xds/provide_and_register_document_set_b_xop.rb', line 35
def get_parts
body_part = XdsPart.new("body", to_soap)
body_part.char_set="UTF-8"
body_part.id = get_body_part_id
body_part.set_content_type(%{application/xop+xml; type="application/soap+xml"})
[body_part]
end
|
#to_soap_body(builder, attributes = {}) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/xds/provide_and_register_document_set_b_xop.rb', line 12
def to_soap_body(builder, attributes={})
@metadata.id = "urn:uid:#{UUID.new.generate}" unless @metadata.id
builder.soapenv(:Body, attributes) do
builder.xdsb(:ProvideAndRegisterDocumentSetRequest,"xmlns:lcm"=>"urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0",
"xmlns:rim"=>"urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0",
"xmlns:xdsb"=>"urn:ihe:iti:xds-b:2007") do
builder.lcm(:SubmitObjectsRequest) do
@metadata.to_soap(builder)
end
builder.xdsb(:Document, {"id"=>@metadata.id}, Base64.b64encode(@document) )
end
end
end
|