Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi 2007 and Custom SOAP Faults

69 views
Skip to first unread message

Chris Krohn

unread,
Jan 22, 2015, 12:16:47 PM1/22/15
to
I am writing a fairly simple SOAP client to do some inquiries to a remote SOAP server (not controlled by me). If the inquiry fails, the remote SOAP server sends back a custom fault calls WSExceptionResponse. My copy of Delphi 2007 doesn't seem to want to map the fault to the custom ERemotableException descendant that it created from the WSDL. I have seen in another post (https://groups.google.com/forum/#!topic/borland.public.delphi.webservices.soap/5ItFmx7P0KQ) that this is a known issue with Delphi 2007 and that I should copy OPToSOAPDomConv.pas to my project and revert the GetElementType function to what it was in Delphi 2006 and prior. I have done this but the fault is still not working. I am wondering if the remote server is sending back something that is not accounted for in Delphi (although it looks very similar to the 2nd example response shown in the ProcessFault procedure). This is the response:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://trips.crownagents.com/wsexception/message" xmlns:ns1="http://trips.crownagents.com/external/customs/release/message" xmlns:ns2="http://trips.crownagents.com/external/common/message">
<env:Body>
<env:Fault xsi:type="env:Fault">
<faultcode>env:Server</faultcode>
<faultstring xsi:nil="1"/>
<detail>
<ans1:WSExceptionResponse xmlns:ans1="http://msgsvr.trips.crownagents.com/">
<ErrorCode>0002</ErrorCode>
<ErrorDescription>Invalid Declaration</ErrorDescription>
<Stack>getSingleResult() did not retrieve any entities.</Stack>
</ans1:WSExceptionResponse>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>

Can anyone help me with this?
0 new messages