Contributions
Re: how to replace encoding information in xml
hisonya_m no i can't solve my problem. This problem needs to be solved with the event, but I cannot get support in this regard. I opened a case about it. we cannot find a solution.4 years agoPlace ReadyAPI QuestionsReadyAPI Questions974Views0likes1CommentRe: how to replace encoding information in xml
hiHimanshuTayal I shared how I use the script in the screenshots below.I see the script working correctly. There is a situation like this, as seen in the second picture, I cannot transfer the value of the property transfer to the other webservice. 2.picture4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes4Comments- 4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes1Comment
Re: how to replace encoding information in xml
hirichie yes.I write the details below. 1.SubmitListener.afterSubmit a.script is working when I run it manually. (I put the screenshot below) b.When I run the script automatically, the test suite doesn't work. 2. we tried to solve this problem using RequestFilter.afterRequest but it doesn't work at all (a and b). I hope I haven't confused you more. I would be very happy if you could help me4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes8CommentsRe: how to replace encoding information in xml
hirichie submitlistener.aftersubmitworks as below so I use it like this for requestfilter.afterrequest. butsubmitlistener.aftersubmit does not work automatically in test suite. we got support for this but we couldn't find a solution. (submitlistener.aftersubmit) I thought I could use the after request as a solution. so I wrote here for support. def content = submit.response.responseContent content = content.replaceAll("<!\\[CDATA\\[", "") content = content.replaceAll("\\]]>", "") content = content.replaceAll("<\\?xml version=\"1.0\" encoding=\"iso-8859-9\"\\?>", "") log.info (content) submit.response.responseContent = content I would really apreciate if you help thanks.4 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes10Commentshow to replace encoding information in xml
Hi everyone, I use this to replace redundancy using XML. event>requestfilter.afterrequest def content = context.httpResponse.responseContent log.info content content = content.replaceAll( "<!\\[CDATA\\[", "" ) content = content.replaceAll( "]]>", "" ) content = content.replaceAll("<\\?xml version=\"1.0\" encoding=\"iso-8859-9\"\\?>","") log.info content context.httpResponse.responseContent = content Code replace CDATA but does not replace("<\\?xml version=\"1.0\" encoding=\"iso-8859-9\"\\?>","") can you help me please... xml response: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <ns1:alisverisBaslatResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="WsOtomotiv"> <return xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="iso-8859-9"?><XmlString><SONUC>1</SONUC><DURUM>0</DURUM><ACIKLAMA>Basarili Alisveris</ACIKLAMA><TRXNO>20061701011000001710</TRXNO><INDIRIM><YENIAVTUTAR>500,00</YENIAVTUTAR><DKID></DKID><DKAD></DKAD><DKKP></DKKP><DIPINDTUTAR>0,00</DIPINDTUTAR><URUNINDIRIMLIST><URUNINDIRIM><UKID>20200</UKID><UKAD>DIVAN</UKAD><UKKP>60</UKKP><URUNKOD>A</URUNKOD><UINDTUTAR>500,00</UINDTUTAR></URUNINDIRIM></URUNINDIRIMLIST></INDIRIM><KPAROPUAN>35,00</KPAROPUAN><TPAROPUAN>35,00</TPAROPUAN><HARCAMADURUM>1</HARCAMADURUM><IZINDURUM>1</IZINDURUM><KAYITDURUM>2</KAYITDURUM><VERDEKOD>18259294</VERDEKOD><ISYERIPUAN>0,00</ISYERIPUAN><ADSOYAD></ADSOYAD><URUNINDIRIMTARIHLIST><URUNINDIRIMTARIH><UKID>20200</UKID><UKAD>DIVAN</UKAD><BASLANGIC_TARIHI>18-01-2013</BASLANGIC_TARIHI><BITIS_TARIHI>30-12-2033</BITIS_TARIHI></URUNINDIRIMTARIH></URUNINDIRIMTARIHLIST></XmlString>]]></return> </ns1:alisverisBaslatResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>4 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews0likes16Comments