How to send XML within a SOAP message -
i'm trying guide colleague towards right way of sending xml document in soap message, i'm no expert on subject. seems should solvable using cdata section, default gsoap serializer 'helping' encoding '<' , '>'.
for example, when seek send this:
<xml> <tag> <content> <![cdata[<xml><tag>text!</tag></xml>]]> </content> </tag> </xml>
what gets sent more this:
<xml> <tag> <content> <![cdata[<xml><tag>text!</tag></xml>]]> </content> </tag> </xml>
if receiver gsoap based may transparently away without needing cdata markers, not case. receiver php code, using html_entity_decode may work, feels wrong (and perhaps wouldn't work in cases?).
i hoping/expecting solution specify different type field (currently 'xsd:string') dumber serializer got used, preserving cdata markers , content within.
i'd avoid in-house wheel-reinvention if there's simple , right way solve (base64 encoding payload beingness proposed).
the serializer presumably taking input text instead of xml… leave cdata markers out of text , allow utilize character references instead of cdata markers.
xml soap gsoap
No comments:
Post a Comment