Dưới đây là những gì tôi tin là SOAP liên quan :: đang LiteSOAP :: Lite Tạo <c-gensym ..> làm thế nào để loại bỏ nó?
my $req3 = SOAP::Lite->new(
readable => 1,
autotype => 0,
proxy => 'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor',
);
$req3->requestMessage(
\SOAP::Data->new(
name => 'item',
attr => { foo => '0' },
value => \SOAP::Data->new(
name => 'foo',
value => 1,
),
),
);
Nó tạo ra XML này
<?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>
Tôi không thể hiểu tại sao <c-gensym9 />
được lồng bên trong <requestMessage>
nhưng tôi không cần phải ở đó. Bất cứ ai có thể giải thích lý do tại sao nó có? và làm thế nào tôi có thể viết lại mã để nó không?
vâng tôi thấy bài đó ... tiếc là nó là liên kết được chết ... do đó, nó vô dụng. – xenoterracide
@JT đã cập nhật mã của tôi thành một ví dụ hoàn chỉnh – xenoterracide
Các liên kết trong bài viết đó có thể được tìm thấy tại: http://www.techrepublic.com/article/a-hands-on-tour-of-soaplite/1045078 và http: //web.archive.org/web/20070308122644/http://www.majordojo.com/archives/2003_04.html – Ether