Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7974871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:30:12+00:00 2026-06-04T08:30:12+00:00

I have to deal with the following problem. I have a SOAP server and

  • 0

I have to deal with the following problem. I have a SOAP server and a SOAP client both asychron with an SAP system to work. I get queries on all classes filled up with data which I then edit my client to be handed over to them again and again send off (I’m looking for SAP sends me the data available, we will process it, ship it back). The problem is that the generated proxy classes to read and re-read the data differs a little. I am looking for 2 days for a way to REALLY SURE is! Since there are very sensitive data, where not really afford to lose.

Here is an example of the proxy class, the server receives the data.

[GeneratedCode("svcutil", "3.0.4506.2152")]
[Serializable]
[DebuggerStepThrough]
[DesignerCategory("code")]
[XmlType(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class _wsv_cas01d0005p0000013303Response
{
    private _wsv_cas01Rs0000012311S[] ec_20KiField;
    private _wsv_cas01Rs0000012302S[] ec_21KiField;
    private _wsv_cas01Rs0000012303S[] ec_23KiField;
    private _wsv_caSafMsgExternalS[] etMessagesField;

    private string evCeeRequestIdField;
    private int evStatusCodeField;

    [XmlArray(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
    [XmlArrayItem("item", Form=XmlSchemaForm.Unqualified, IsNullable=false)]
    public _wsv_cas01Rs0000012311S[] Ec_20Ki
    {
        get
        {
            return this.ec_20KiField;
        }
        set
        {
            this.ec_20KiField = value;
        }
    }

Here is an example of another class, the proxy is to be filled again:

[GeneratedCode("svcutil", "3.0.4506.2152")]
[Serializable]
[DebuggerStepThrough]
[DesignerCategor("code")]
[XmlType(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class _wsv_cas01d0005p0000013203
{
    private _wsv_cas01Rq0012210001S[] ic_20KiField;
    private _wsv_cas01Rq0012210002S[] ic_21KiField;
    private _wsv_cas01Rq0012210003S[] ic_23KiField;
    private string ivBoIdField;
    private string ivBoTypeCdField;
    private string ivCbDestinationField;

    [XmlArray(Form=XmlSchemaForm.Unqualified, Order=0)]
    [XmlArrayItem("item", Form=XmlSchemaForm.Unqualified, IsNullable=false)]
    public _wsv_cas01Rq0012210001S[] Ic_20Ki
    {
        get
        {
            return this.ic_20KiField;
        }
        set
        {
            this.ic_20KiField = value;
        }
    }

As you can see the headers are already written for SOAP, so I can not easily change the names of the other client.

With this method, I’ve been spending the XML code of the classes available to make the SOAP messages to log. Naur, unfortunately, the names are just all wrong.

public static string ObjectToXml(object input)
{
    string objectAsXmlString;

    XmlSerializer xs = new XmlSerializer(input.GetType());
    XmlSerializerNamespaces test = new XmlSerializerNamespaces();
    using (StringWriter sw = new StringWriter())
    {
        try
        {
            xs.Serialize(sw, input);
            objectAsXmlString = sw.ToString();
        }
        catch (Exception ex)
        {
            objectAsXmlString = ex.ToString();
        }
    }
    return objectAsXmlString;
}

Read the code sent back to the client of the package, I’ve realized so. With the modified XML code it works! As long as one considers the rich result.

XmlSerializer serializer = new XmlSerializer(typeof(_wsv_cas01d0005p0000013203));
_wsv_cas01d0005p0000013203 Requestdaten = (_wsv_cas01d0005p0000013203)serializer.Deserialize(xmlDoc);

So now I’m missing a way to transform the XML, and the variables exist which is not clear so I can fill leave the class. I’ve einges on XPATH and XSD read, but I was not really what I need. Maybe even someone of you ever seen such a similar case, and a tip for me?

PS: I hope that one of the translated text can be read. Unfortunately, my English for such complex cases is simply too complicated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:30:13+00:00Added an answer on June 4, 2026 at 8:30 am

    I have it now, not just the most beautiful way af solved, but since I had used URGENT a solution, I’ve realized now so … The “replace” I like not, but I think it’s just quicker than assuming you have the eternally long XML data into a new node first, then to copy the original …
    If someone thinks to do better, please’m thankful for every tip.

    public static string SearchToChangeXML(string input, int changetype = 0)
    {
        //Replace -.- | no time, hope later more time to make better... But it works
        input = input.Replace("<_asd_cas01d0005p0000013303Response", "<_asd_cas01d0005p0000013203");
        input = input.Replace("</_asd_cas01d0005p0000013303Response>", "</_asd_cas01d0005p0000013203>");
        for (int i = 20; i <= 40; i++)
        {
            input = input.Replace("<Ec_" + i.ToString() + "Ki>", "<Ic_" + i.ToString() + "Ki>");
            input = input.Replace("</Ec_" + i.ToString() + "Ki>", "</Ic_" + i.ToString() + "Ki>");
            input = input.Replace("<Ec_" + i.ToString() + "Ki />", "<Ic_" + i.ToString() + "Ki />");
            input = input.Replace("<Ec_" + i.ToString() + "Ki/>", "<Ic_" + i.ToString() + "Ki/>");
        }
    
        XmlDocument xml = new XmlDocument();
        xml.LoadXml(input);
        XmlNode dp = xml.DocumentElement;
        for (int i = 0; i < dp.ChildNodes.Count; i++)
        {
            //Things i dont need (not all Variables are present in other Class)
            if (dp.ChildNodes[i].Name == "Ic_38Ki" || dp.ChildNodes[i].Name == "Ic_39Ki" || dp.ChildNodes[i].Name == "EtMessages" ||
                    dp.ChildNodes[i].Name == "EvCeeRequestId" || dp.ChildNodes[i].Name == "EvStatusCode")
                dp.ChildNodes[i].RemoveAll();
    
        }
        using (var stringWriter = new StringWriter())
        using (var xmlTextWriter = XmlWriter.Create(stringWriter))
        {
            xml.WriteTo(xmlTextWriter);
            xmlTextWriter.Flush();
            return stringWriter.GetStringBuilder().ToString();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't figure out how to deal with a following problem. I have a
I'm having the following problem: I have a ListView and I get the layout
I'm facing the following problem. i have a servlet that serves a client request
I have the following tables: Company {CompanyID, CompanyName} Deal {CompanyID, Value} And I have
I have the following problem: I have a lot of papers in pdf format
I have the following problem. I need to calculate the Shrout & Fleiss ICC's
I have the following problem: Multithreaded WPF application, Model View Presenter Implementation. Presenters and
Hi i'm facing the following problem, i have to re-write an existant code to
I can deal with porting platform dependent functions. I have a problem that the
i have the following problem. The 1st step is to implement a program, which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.