I'm trying to work in SOAP::Lite to create a SOAPAction and a SOAP method call where the XMLNS in the method call has a trailing '/' at the end. Below I'll post what I've got so far, what it creates, and what I'm trying to create for comparison. I'm a bit stumped on getting the training '/' added, but I know it will work if can get it that way, as it works in LWP. Some information has been obscured due to necessity.

## EXISTING RELEVANT CODING:
$soapreg = SOAP::Lite ->proxy($regws) ->uri ("$regns") ->autotype(0); $results = $soapreg -> $regmethod (SOAP::Data->name('username') ->value($cun), SOAP::Data->name('password') ->value($cpw), SOAP::Data->name('status') ->value('1'), SOAP::Data->name('filter') ->value($testdata));
## CURRENT OUTPUT CREATED (debug):
SOAP::Transport::HTTP::Client::send_receive: POST https://(url.com)/xx +x/service.asmx HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 621 Content-Type: text/xml; charset=utf-8 SOAPAction: https://(url.com)/xxx/UserInfo <?xml version="1.0" encoding="UTF-8"?> <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/encoding +/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <UserInfo xmlns="https://(url.com)/xxx"> <username>OMIT</username> <password>OMIT</password> <status>1</status> <filter>9876533</filter> </UserInfo> </soap:Body></soap:Envelope>
## DESIRED OUTPUT (can't get the extra slash at the end in UserInfo)
SOAP::Transport::HTTP::Client::send_receive: POST https://(url.com)/xx +x/service.asmx HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 621 Content-Type: text/xml; charset=utf-8 SOAPAction: https://(url.com)/xxx/UserInfo <?xml version="1.0" encoding="UTF-8"?> <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/encoding +/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <UserInfo xmlns="https://(url.com)/xxx/"> <username>OMIT</username> <password>OMIT</password> <status>1</status> <filter>9876533</filter> </UserInfo> </soap:Body></soap:Envelope>
This should be easy to do, but I can't figure out how. If I modify $regns to "https://(url.com)/xxx/" (extra slash at the end) then it creates an invalid SOAPAction request (https://(url.com)/xxx//UserInfo) which breaks the application. We don't have control of the server so nothing can be done on that end, unfortunately.

In reply to SOAP::Lite attribute modification on method by ffrost

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.