xml – SOAP :: Lite生成如何摆脱它?
发布时间:2020-12-16 07:48:59 所属栏目:百科 来源:网络整理
导读:这就是我认为相关的SOAP :: Lite代码 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' },valu
这就是我认为相关的SOAP :: Lite代码
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,),); 它正在生成这个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> 我无法弄清楚为什么< c-gensym9 />嵌套在< requestMessage>内但我不需要在那里.任何人都可以解释为什么它在那里?以及如何重写代码以便它不是?
看马云,没有gensym
$req3->requestMessage( ## SOAP::Data->new( ## this makes gensym SOAP::Data->new( ## no refref,no gensym name => 'item',); 另见http://perlmonks.com/?node_id=906383 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |