19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/ragoon/xml.rb', line 19
def self.template(options)
<<"XML"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:base_services="http://wsdl.cybozu.co.jp/base/2008">
<SOAP-ENV:Header>
<Action SOAP-ENV:mustUnderstand="1"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">
#{ACTION_PLACEHOLDER}
</Action>
<Security xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"
SOAP-ENV:mustUnderstand="1"
xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
<UsernameToken wsu:Id="id">
<Username>#{options[:username]}</Username>
<Password>#{options[:password]}</Password>
</UsernameToken>
</Security>
<Timestamp SOAP-ENV:mustUnderstand="1" Id="id"
xmlns="http://schemas.xmlsoap.org/ws/2002/07/utility">
<Created>#{Time.now.iso8601}</Created>
<Expires>#{(Time.now + 60 * 60 * 24).iso8601}</Expires>
</Timestamp>
<Locale>jp</Locale>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
#{BODY_PLACEHOLDER}
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
end
|