Find Jobs
Hire Freelancers

C# expert - quick help

$10-30 USD

In Progress
Posted over 2 years ago

$10-30 USD

Paid on delivery
Replace the Message ([login to view URL]) content with altered soap xml. If any xml element of SOAP message in the "ref Message reply" paramte has a value of "0E-number" eg: 0E-7 then replace it with 0 and update the "ref Message reply" paramter, You should retain the same xml format. Just replace only those values if found. See the attached code /// <summary> /// Allows adding in WS-Security header to incoming request /// </summary> public class TestMessageInspector : IClientMessageInspector { ....... public void AfterReceiveReply(ref Message reply, object correlationState) { // Here Need to replace or alter the reply Message ([login to view URL]) content with other soap xml. Tried the below code and it does not alter the reply message content var sb = new StringBuilder("<testAmt>88977</testAmt>"); using (var sw = [login to view URL](new StringWriter(sb))) { [login to view URL](sw); [login to view URL](); } } } Sample Input: <? xml version='1.0' encoding='utf-16'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='[login to view URL]'><SOAP-ENV:Header/><SOAP-ENV:Body>< ns4:testResponse xmlns:ns2 = '[login to view URL]' xmlns:ns4 ='[login to view URL]'><Document><testAmt >0E-7</testAmt><testRate>0</testRate><test1Amt>0E-8</test1Amt></Document></ns4:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> Sample Output: <? xml version='1.0' encoding='utf-16'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='[login to view URL]'><SOAP-ENV:Header/><SOAP-ENV:Body>< ns4:testResponse xmlns:ns2 = '[login to view URL]' xmlns:ns4 ='[login to view URL]'><Document><testAmt >0</testAmt><testRate>0</testRate><test1Amt>0</test1Amt></Document></ns4:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> Please refer the comments in the code and ask me for any details Getting the below output and format is automatically updated by .NET which is undesirable <s:Envelope xmlns:s="[login to view URL]"> <s:Header> <Action s:mustUnderstand="1" xmlns="[login to view URL]" /> </s:Header> <s:Body> <string xmlns="[login to view URL]">&lt;? xml version='1.0' encoding='utf-16'?&gt;&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV='[login to view URL]'&gt;&lt;SOAP-ENV:Header/&gt;&lt;SOAP-ENV:Body&gt;&lt; ns4:testResponse xmlns:ns2 = '[login to view URL]' xmlns:ns4 ='[login to view URL]'&gt;&lt;Document&gt;&lt;testAmt &gt;0E-7&lt;/testAmt&gt;&lt;testRate&gt;0&lt;/testRate&gt;&lt;test1Amt&gt;0E-8&lt;/test1Amt&gt;&lt;/Document&gt;&lt;/ns4:testResponse&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;</string> </s:Body> </s:Envelope>
Project ID: 32171337

About the project

Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of UNITED STATES
Woburn, United States
4.9
106
Payment method verified
Member since Apr 29, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.