【发布时间】:2011-08-18 19:44:49
【问题描述】:
这是我的SOAP::Lite 代码
#!/usr/bin/perl
use 5.006;
use strict;
use warnings;
use SOAP::Lite +trace => [ 'debug' ];
my $req1 = SOAP::Lite->new(
readable => 1,
autotype => 0,
proxy => 'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor',
);
$req1->requestMessage(
\SOAP::Data->new(
name => 'item',
attr => { foo => '0' },
value => \SOAP::Data->new(
name => 'foo',
value => 1,
),
),
);
它生成这个 XML
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<requestMessage>
<c-gensym9>
<item foo="0">
<foo>1</foo>
</item>
</c-gensym9>
</requestMessage>
</soap:Body>
</soap:Envelope>
如何使用XML::Compile::SOAP 生成相同的东西(没有 gensym)?
【问题讨论】: