Hello all, this is my first post in the pearl Monks and i really sorry if i did something whrong but i need help

IŽm trying to consume a webservice API from SwiftKanban on this address: https://www.digite.com/knowledge-base/swiftkanban/article/kanbancardservice-2/ and this is what i'm doing:

sub createCardOnProjectName { my ($username, $password, $projectName ) = @_; my $method = 'addCard'; my $soap_action = sub {return 'https://login.swift-kanban.com/axis +2/services/KanbanCardService?wsdl' . '/' . $method}; my $SoapClient = SOAP::Lite ->uri('https://login.swift-kanban.com/axis2/services/KanbanCardSer +vice?wsdl') ->proxy('https://login.swift-kanban.com/axis2/services/KanbanCardS +ervice') ->autotype(0) ->on_action( $soap_action ); my $Security = getHeader($SoapClient, $username, $password); my $projectId = returnProjectIdFromName($username, $password, $pro +jectName, $Security ); my $cardType = returnCardListFromProjectDetail($username, $passwor +d, $projectId, $Security ); #my $cardMetaData = returnCardMetaData ($username, $password, $car +dType, $Security ); #my $method_name = SOAP::Data->name($method)->attr({'xmlns' => $se +lf->xmlns()}); my $beamlineName = SOAP::Data->name('addCardDetails' => \SOAP::Dat +a->value( SOAP::Data->name("projectId")->value($projectId)->type("")->pr +efix('kan'), SOAP::Data->name("cardType")->value($cardType)->type("")->pref +ix('kan'), SOAP::Data->name("userLoginId")->value($username)->type("")->p +refix('kan'), SOAP::Data->name('fields' => \SOAP::Data->value( SOAP::Data->name('field')->value('teste de criacao')->type +("")->attr({"name" => "name"})->prefix('kan'), SOAP::Data->name('field')->value('M')->type("")->attr({"na +me" => "cardSize"})->prefix('kan'), SOAP::Data->name('field')->value('Expedite')->type("")->at +tr({"name" => "classOfService"})->prefix('kan'), SOAP::Data->name('field')->value('PM')->type("")->attr({"n +ame" => "Category"})->prefix('kan'), ), )->prefix('kan'), )->prefix('kan'), )->prefix('kan'); my $xml = $SoapClient->call($method, $Security, $beamlineName)->re +sult; return $xml; }

The code produces the xml:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/enve +lope/" xmlns:kan="http://kanbancard.webservices.kanban.app.digite.co +m/"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004 +/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstan +d="1"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/ +wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="User +nameToken-31571602"> <wsse:Username>IntegrationUser_1078957</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/20 +04/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">005L8 +FM#</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <addCard xmlns="https://login.swift-kanban.com/axis2/services/ +KanbanCardService?wsdl"> <kan:addCardDetails> <kan:projectId>1</kan:projectId> <kan:cardType>KanbanIssue</kan:cardType> <kan:userLoginId>IntegrationUser_1078957</kan:userLogi +nId> <kan:fields> <kan:field name="name">teste de criacao</kan:f +ield> <kan:field name="cardSize">M</kan:field> <kan:field name="classOfService">Expedite</kan +:field> <kan:field name="Category">PM</kan:field> </kan:fields> </kan:addCardDetails> </addCard> </soapenv:Body> </soapenv:Envelope>

The SwiftKanban support ask me to send the xml without the tag: <addCard xmlns="https://login.swift-kanban.com/axis2/services/KanbanCardService?wsdl"> but i coudŽnt remove it

If someone can help-me iŽll apreciate

Tanks!


In reply to Help with SOAP::Lite and SwiftKanban API by tuliovsmartins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.