Hello, I have been given a heck of a lot of good information and documentation for my SOAP problems to date so thank you. I have very strange behavior when converting a string to soap and I am hoping someone has seen this before. The code is simple:
$xml = '<wellmed>MessageList><MessageItem msgtype="5" subject="Bookmar +k from Health Coach"><Patient loginname="' ."$ss|$name|$dob" . '" spo +nsorid="303" /><DocumentList><DocumentItem date="' . "$theDate" .'" f +rom="HealthDialog" time="">abc</DocumentItem></DocumentList></Message +Item></MessageList></wellmed>'; use XML::Simple; use SOAP::Lite +trace; my $data = SOAP::Data->name('data' => "$xml")->type('string')->uri('') +;
I would expect all '<' characters to be turned to '& l t ;' and all '>' characters to be turned to '& g t ;' (I put in the spaces here because it converts them for display). It converts the '<', but not the '>'. I can not fathom why it converts one type and not the other. Here is the trace:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-EN +C="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle= +"http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://sc +hemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/X +MLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP +-ENV:Body><namesp1:PerformUpdate xmlns:namesp1="http://di.wellmed.com +/SoapService"><data xmlns="" xsi:type="xsd:string">&lt;wellmed>Messag +eList>&lt;MessageItem msgtype="5" subject="Bookmark from Health Coach +">&lt;Patient loginname="111111111|LYNN|19407202" sponsorid="303" />& +lt;DocumentList>&lt;DocumentItem date="09/17/04" from="HealthDialog" +time="">abc&lt;/DocumentItem>&lt;/DocumentList>&lt;/MessageItem>&lt;/ +MessageList>&lt;/wellmed></data></namesp1:PerformUpdate></SOAP-ENV:Bo +dy></SOAP-ENV:Envelope>
Thank You

In reply to SOAP string conversion problem by Hammy

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.