.netwcfsap-pi

Pass .NET DateTime value to SAP PI xsd:Date


I'm calling SAP Web Service from my WCF application and I need to pass a date to it.

The problem is that SAP PI does not have DateTime type, it's only Date though.

When I import SAP WSDL to my WCF application it generates a class with DateTime type. How would I pass such values to SAP PI?


Solution

  • I got it working, just for you guys to know it was not an issue with DateTime values but with every non nullable types (Bool, Int, DateTime, etc). The problem was on SAP PI side, we had to change the property "ocurrence" from 0 (Attribute not required) to 1 (Attribute required) of each attribute in SAP's WSDL. That's it!