Here's the response that causes the problem (I got it by using a
separate tool). All of the elements with 'date' in their name are
declared as 'standard' dateTime types, and are allowed to be nil. The
C# .NET proxy class declares the dateTime variables as System.DateTime.
I don't know why I get a dateTime format error from this document.
Any ideas? Thanks.
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<findByReportNumberResponse
xmlns="http://discrepancyreporting.service.yyy.zzz.xxx.com">
<findByReportNumberReturn>
<closedBy xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<closedDate xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<closedReference xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<creditDate
xmlns="http://dto.zzz.xxx.com">2005-02-07T14:00:00.000Z</creditDate>
<creditedBy xmlns="http://dto.zzz.xxx.com">0000000054</creditedBy>
<creditReference
xmlns="http://dto.zzz.xxx.com">LARRYC</creditReference>
<creditReplace xmlns="http://dto.zzz.xxx.com">C</creditReplace>
<creditValue xmlns="http://dto.zzz.xxx.com">1.00</creditValue>
<discrepancy xmlns="http://dto.zzz.xxx.com">1 MISSING</discrepancy>
<discrepancyReference
xmlns="http://dto.zzz.xxx.com">1MISS</discrepancyReference>
<discrepancyReportItemNumber
xmlns="http://dto.zzz.xxx.com">1</discrepancyReportItemNumber>
<discrepancyReportNumber
xmlns="http://dto.zzz.xxx.com">1</discrepancyReportNumber>
<discrepancyType1 xmlns="http://dto.zzz.xxx.com" />
<holdPayment xmlns="http://dto.zzz.xxx.com">Y</holdPayment>
<medium xmlns="http://dto.zzz.xxx.com">P</medium>
<purchaseOrderItemNumber
xmlns="http://dto.zzz.xxx.com">1</purchaseOrderItemNumber>
<purchaseOrderNumber
xmlns="http://dto.zzz.xxx.com">P00015</purchaseOrderNumber>
<purchaseRequisitionNumber xsi:nil="true"
xmlns="http://dto.zzz.xxx.com" />
<qualityInspectionCode xmlns="http://dto.zzz.xxx.com" />
<quantityRequired
xmlns="http://dto.zzz.xxx.com">18.00</quantityRequired>
<raisedBy xmlns="http://dto.zzz.xxx.com">0000000054</raisedBy>
<raisedDate
xmlns="http://dto.zzz.xxx.com">2005-02-07T14:00:00.000Z</raisedDate>
<replacedBy xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<replacementDate xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<replacementQuantity xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<replacementReference xsi:nil="true" xmlns="http://dto.zzz.xxx.com"
/>
<shipmentCarrier
xmlns="http://dto.zzz.xxx.com">FEDEX</shipmentCarrier>
<shipmentDate
xmlns="http://dto.zzz.xxx.com">2005-02-07T14:00:00.000Z</shipmentDate>
<shipmentInsurance
xmlns="http://dto.zzz.xxx.com">NONE</shipmentInsurance>
<shipmentPaymentType
xmlns="http://dto.zzz.xxx.com">P</shipmentPaymentType>
<shipmentReference
xmlns="http://dto.zzz.xxx.com">LARRYC</shipmentReference>
<stockCode xmlns="http://dto.zzz.xxx.com">000001446</stockCode>
<supplierContact
xmlns="http://dto.zzz.xxx.com">CHARLIE</supplierContact>
<supplierContacted
xmlns="http://dto.zzz.xxx.com">Y</supplierContacted>
<supplierNumber
xmlns="http://dto.zzz.xxx.com">000006</supplierNumber>
<unitOfMeasure xmlns="http://dto.zzz.xxx.com">EA</unitOfMeasure>
<updateStatistics xmlns="http://dto.zzz.xxx.com" />
<waybillItemNumber xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<waybillNumber xsi:nil="true" xmlns="http://dto.zzz.xxx.com" />
<discrepancyReportStatus
xmlns="http://dto.zzz.xxx.com">OPEN</discrepancyReportStatus>
<discrepancyQuantity
xmlns="http://dto.zzz.xxx.com">1</discrepancyQuantity>
</findByReportNumberReturn>
</findByReportNumberResponse>
</soapenv:Body>
</soapenv:Envelope>
mjf wrote:
Keenan; thanks for the reply. I've determined that the problem is in
the conversion to a standard (that is, from
xsd:xml.apache.org/xml-soap) dateTime variable. I can catch the
exception, but it doesn't look like it tells me what the allegedly
offending string is, nor what the dateTime format strings it's trying
to use are.
Also, I don't know how to get hold of the XML string being sent back
from the service. How do I get the entire SOAP message? I'm within
the VSS debugger, but the routines on the stack at the time of the
exception (assuming I don't catch it) don't have source associated
with them, so it's unclear to me how I can get hold of the SOAP message.
Ideas?
The dateTime portion of the WSDL is simply (!):
<xsd:element name="badVar"" nillable="true" type="xsd:dateTime"/>,
where xsd is as above.
Thanks.