I agree with cooldadtx, it's unusual to for a SOAP service to return a soap fault or response type that is not defined in the WSDL. The most likely scenario is you do not understand how the server works. Frankly, interacting with a SOAP service should take just a few minutes to get up and running.
Anyway, if you want to parse the XML into a type yourself, simply copy the XML. In Visual Studio select Edit -> Paste Special -> Paste XML as classes. Then use the standard XML serializer to populate a C# type. Anyway, this is what the proxy class does automatically except only the response type is return (the result of a SOAP action) where as the example below deserializes the the entire SOAP envelope (the XML you shared). You'll need to create code that maps the SOAP actions to the possible response types which is what the WSDL does...
https://learn.microsoft.com/en-us/dotnet/api/system.xml.serialization.xmlserializer.deserialize?view=net-6.0
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
DeserializeObject("XMLFile1.xml");
}
private static void DeserializeObject(string filename)
{
// Create an instance of the XmlSerializer.
XmlSerializer serializer = new XmlSerializer(typeof(Envelope));
// Declare an object variable of the type to be deserialized.
Envelope e;
using (Stream reader = new FileStream(filename, FileMode.Open))
{
// Call the Deserialize method to restore the object's state.
e = (Envelope)serializer.Deserialize(reader);
}
// Write out the properties of the object.
Console.WriteLine(e.Body.GET_PCB_IDOutput.P_OUT.RESPONSE_SIE.TIMESTAMP);
Console.WriteLine(e.Body.GET_PCB_IDOutput.P_OUT.RESPONSE_SIE.PROCESSINGSTATUS.RETURNDESCRIPTION);
}
}
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.xmlsoap.org/soap/envelope/")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.xmlsoap.org/soap/envelope/", IsNullable = false)]
public partial class Envelope
{
private EnvelopeBody bodyField;
/// <remarks/>
public EnvelopeBody Body
{
get
{
return this.bodyField;
}
set
{
this.bodyField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.xmlsoap.org/soap/envelope/")]
public partial class EnvelopeBody
{
private GET_PCB_IDOutput gET_PCB_IDOutputField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://xmlns.oracle.com/orawsv/PDS/PS_PFWI")]
public GET_PCB_IDOutput GET_PCB_IDOutput
{
get
{
return this.gET_PCB_IDOutputField;
}
set
{
this.gET_PCB_IDOutputField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://xmlns.oracle.com/orawsv/PDS/PS_PFWI")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://xmlns.oracle.com/orawsv/PDS/PS_PFWI", IsNullable = false)]
public partial class GET_PCB_IDOutput
{
private GET_PCB_IDOutputP_OUT p_OUTField;
/// <remarks/>
public GET_PCB_IDOutputP_OUT P_OUT
{
get
{
return this.p_OUTField;
}
set
{
this.p_OUTField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://xmlns.oracle.com/orawsv/PDS/PS_PFWI")]
public partial class GET_PCB_IDOutputP_OUT
{
private GET_PCB_IDOutputP_OUTRESPONSE_SIE rESPONSE_SIEField;
/// <remarks/>
public GET_PCB_IDOutputP_OUTRESPONSE_SIE RESPONSE_SIE
{
get
{
return this.rESPONSE_SIEField;
}
set
{
this.rESPONSE_SIEField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://xmlns.oracle.com/orawsv/PDS/PS_PFWI")]
public partial class GET_PCB_IDOutputP_OUTRESPONSE_SIE
{
private string mESSAGEIDField;
private System.DateTime tIMESTAMPField;
private string iNTERFACEIDField;
private GET_PCB_IDOutputP_OUTRESPONSE_SIEPROCESSINGSTATUS pROCESSINGSTATUSField;
private object pROGField;
/// <remarks/>
public string MESSAGEID
{
get
{
return this.mESSAGEIDField;
}
set
{
this.mESSAGEIDField = value;
}
}
/// <remarks/>
public System.DateTime TIMESTAMP
{
get
{
return this.tIMESTAMPField;
}
set
{
this.tIMESTAMPField = value;
}
}
/// <remarks/>
public string INTERFACEID
{
get
{
return this.iNTERFACEIDField;
}
set
{
this.iNTERFACEIDField = value;
}
}
/// <remarks/>
public GET_PCB_IDOutputP_OUTRESPONSE_SIEPROCESSINGSTATUS PROCESSINGSTATUS
{
get
{
return this.pROCESSINGSTATUSField;
}
set
{
this.pROCESSINGSTATUSField = value;
}
}
/// <remarks/>
public object PROG
{
get
{
return this.pROGField;
}
set
{
this.pROGField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://xmlns.oracle.com/orawsv/PDS/PS_PFWI")]
public partial class GET_PCB_IDOutputP_OUTRESPONSE_SIEPROCESSINGSTATUS
{
private string rETURNVALUEField;
private string rETURNCODEField;
private string rETURNDESCRIPTIONField;
/// <remarks/>
public string RETURNVALUE
{
get
{
return this.rETURNVALUEField;
}
set
{
this.rETURNVALUEField = value;
}
}
/// <remarks/>
public string RETURNCODE
{
get
{
return this.rETURNCODEField;
}
set
{
this.rETURNCODEField = value;
}
}
/// <remarks/>
public string RETURNDESCRIPTION
{
get
{
return this.rETURNDESCRIPTIONField;
}
set
{
this.rETURNDESCRIPTIONField = value;
}
}
}
}
Results
1/27/2022 10:07:19 AM
Receiver not running (WS Siemens App)
@Markus Freitag ,
If the proposed solution is working for you, please don't forget to 'Accept Answer'.