You need to sign in to do that
Don't have an account?
ziros
Passing null from apex class to external webservice.
Hello,
I search and found the fieldsToNull, but I can't get how to work with it.
I have apex class which calls to webservice, and I want to pass parameter of type Datetime with null value
to .net webservice.
how to do it ?
TIA
According to the Apex doc, you should not have to use fieldsToNull with Apex. Have you tried simply setting the value to null?
Hi, When Im passing null within apex class and pass a datetime parameter which is null this is the error I'm getting
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: System.Web.Services.Protocols.SoapException: לשרת לא היתה אפשרות לקרוא את הבקשה. ---> System.InvalidOperationException: Error in XML (1, 416). ---> System.FormatException: המחרוזת '' אינה ערך AllXsd חוקי.
ב- System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds)
ב- System.Xml.XmlConvert.ToDateTime(String s, XmlDateTimeSerializationMode dateTimeOption)
ב- System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String value)
ב- System.Xml.Serialization.XmlSerializationReader.ToDateTime(String value)
ב- Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read8_IchlusProtocolUpdate()
ב- Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer8.Deserialize(XmlSerializationReader reader)
ב- System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- סוף רכיב מעקב אחר מחסנית של מצב חריג פנימי ---
ב- System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
ב- System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
ב- System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
--- סוף רכיב מעקב אחר מחסנית של מצב חריג פנימי ---
ב- System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
ב- System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() faultcode=soap:Client faultactor=
Class.WSIchlusSalesForce.ServiceIchlusSoap.IchlusProtocolUpdate: line 134, column 13
Class.WSIchlusSalesForceHelper.UpdateIchlusProtocol: line 244, column 9
Hi Simon, guess you pointing in the right direction,
The webservice is an ASP.NET webservice and here is small section of its WSDL from wich the apex class is created
Solved : well seems like the answer was simple
In asp.net (im using framework 2) instead of defining just : DateTime somevar
need to define wiht nullable like this Datetime? somevar and than the WSDL includes the nillable="true"