Open swastiks opened 1 month ago
Hi @swastiks,
We encountered a similar issue with our legacy service. After some investigation, we discovered that the problem was related to using a custom serializer to our SOAP service. We figured this out Attribute applied in our service and resolve using the ReplaceDataContractSerializerOperationBehavior
method, as shown below:
[OperationContract]
[MessageOperationFormat]
[FaultContract(typeof(ApplicationFault), Action = "http://ourproductenterprise.com/productname/2010/06/FaultAction")]
Where MessageOperationFormat
has the following implementations:
public class MessageOperationFormatAttribute : Attribute, IOperationBehavior
{
private void ReplaceDataContractSerializerOperationBehavior(OperationDescription operationDescription)
{
DataContractSerializerOperationBehavior dataContractSerializerOperationBehavior = operationDescription.Behaviors.Find<DataContractSerializerOperationBehavior>();
if (dataContractSerializerOperationBehavior != null)
{
int index = operationDescription.Behaviors.IndexOf(dataContractSerializerOperationBehavior);
operationDescription.Behaviors.Remove(dataContractSerializerOperationBehavior);
operationDescription.Behaviors.Insert(index, new MessageSerializerOperationBehavior(operationDescription));
}
}
}
You might want to check if your legacy service has a similar workaround. We resolved our issue by implementing a custom serializer using SoapCore.
Alternatively, you can modify the interface or write a custom serializer using the options provided in SoapCore. However, you might need to wait for a new release or fork the repository to generate the package yourself.
Hope this helps!
This issue is stale because it has been open for 30 days with no activity.
We have a legacy soap envelop like below which references a product xml using href as shown below.