Hi
I have the code below to make a webservice call
use strict; use warnings; use SOAP::Lite 'trace', 'debug'; my $xmltest = <<EOF; <episodicProgrammePlaceholder xmlns="http://www.cnnmedia.com"> <titleID>SN_DELETE</titleID> <messageAction>Create</messageAction> <doNotUse>false</doNotUse> <programmeType>SN</programmeType> <programmeLabel>DELETE</programmeLabel> <subTypeCode>Primary</subTypeCode> <titles> <title> <titleName><![CDATA[DELETE]]></titleName> <titleLang>ENG</titleLang> <titleType>Primary Legal</titleType> </title> </titles> <synopses> <synopsis> <synopsisText>Set in the fictional town of Gulfhaven, Flor +ida (nicknamed "Cougar Town" since its high school teams are the Coug +ars), the series focuses on a recently divorced woman in her forties +facing the often humorous challenges, pitfalls, and rewards of life's + next chapter, along with her son, ex-husband, and wine-loving friend +s who together make up her dysfunctional, but supportive and caring e +xtended family.</synopsisText> <synopsisLang>ENG</synopsisLang> <synopsisType>Turner Internal</synopsisType> </synopsis> </synopses> <keywords> <keyword> <keywordID>Red Wine</keywordID> <keywordLang>ENG</keywordLang> <keywordRelevance>1</keywordRelevance> </keyword> </keywords> <genres> <genre>Comedy</genre> </genres> <participations></participations> <studios></studios> <compliances> <compliance> <complianceCode>OFCOM</complianceCode> <complianceName>OFCOM</complianceName> <doNotUse>false</doNotUse> </compliance> </compliances> </episodicProgrammePlaceholder> EOF my $soap = SOAP::Lite -> service('http://user:password@lonsmam-is1:5555/ws/tb +selXenWebService:XenTxWS?WSDL') -> outputxml(1); $soap->serializer->register_ns('http://www.cnnmedia.com', 'cnn' ); $soap -> processEpisodicProgramme(SOAP::Data->type( 'xml' => $xmltest +));
It produces the following envelope element
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/enc +oding/" xmlns:soap="http://schemas.xmlsoap .org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/en +coding/" xmlns:tns="http://www.cnnmedia.com" xmlns:wsdl="http://schem +as.xmlsoap. org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="htt +p://www.w3.org/2001/XMLSchema-instance">
Using Soap UI i have determined that the attribute 'xmlns:tns="http://www.cnnmedia.com"' need to be 'xmlns:cnn="http://www.cnnmedia.com"' to get it working which I thought the line below acheived
$soap->serializer->register_ns('http://www.cnnmedia.com', 'cnn' );
This is not having any effect so I'm obviously not understanding it's intended use, any pointers would be appreciated. I've tried soap::lite v1.11 & v0.710.08
In reply to Soap::Lite - Changing attribute in envelope element by freeflyer73
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |