Class: Skala::PrimoAdapter::Search::RequestTransformation::SetupTarget

Inherits:
Transformator::Transformation::Step
  • Object
show all
Defined in:
lib/skala/primo_adapter/search/request_transformation/setup_target.rb

Instance Method Summary collapse

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/skala/primo_adapter/search/request_transformation/setup_target.rb', line 8

def call
  # create empty ox document
  self.target = Ox::Document.new(version: "1.0", encoding: "UTF-8")

  # populate target with soap request skeleton
  self.target << Ox.parse(
    <<-xml
      <env:Envelope
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:impl="http://primo.kobv.de/PrimoWebServices/services/searcher"
          xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:ins0="http://xml.apache.org/xml-soap">
        <env:Body>
          <impl:searchBrief><searchRequestStr></searchRequestStr></impl:searchBrief>
        </env:Body>
      </env:Envelope>
    xml
  )
end