Code: Select all
[DataContract(Name = "TestCustomModel", Namespace = "https://myNamespace.com")]
public class MyCustomModel
{
[DataMember]
public int username { get; set; }
[DataMember]
public string password { get; set; }
[DataMember]
public int orgId { get; set; }
[DataMember]
public int poolId { get; set; }
[DataMember]
public string cycleStartDate { get; set; }
}
< /code>
Mein Dienst: < /p>
[ServiceContract(Namespace = "https://myNamespace.com")]
public class SampleService : ISampleService
{
public string Test(string s)
{
Console.WriteLine("Test Method Executed!");
return s;
}
public void XmlMethod(XElement xml)
{
Console.WriteLine(xml.ToString());
}
public MyCustomModel TestCustomModel(MyCustomModel customModel)
{
return customModel;
}
}
< /code>
Meine Serviceschnittstelle: < /p>
[ServiceContract]
public interface ISampleService
{
[OperationContract]
string Test(string s);
[OperationContract]
void XmlMethod(System.Xml.Linq.XElement xml);
[OperationContract]
MyCustomModel TestCustomModel(MyCustomModel inputModel);
}
< /code>
Hier ist die Seife, die ich sende: < /p>
USERNAME
PASSWORD
123
1234
2023-01-01
Basierend auf dem, was ich finden konnte, glaube ich, dass ich den Namespace an den richtigen Orten festlegt, aber es erwartet immer noch tempuri.org