Board index » delphi » TXSDateTime issue

TXSDateTime issue


2006-11-30 10:02:05 AM
delphi123
Hello there,
I am having access violation with one of the property with TXSDateTime
datatype when it is defined as nil. If you look at the xml document below,
quoteDueTime is defined as nil.
When I traced the delphi code, access violation occurs in the following
section
procedure TSOAPDomConv.LoadObject(Instance: TObject; RootNode, Node:
IXMLNode);
begin
if Instance.InheritsFrom(TRemotable) then
TRemotable(Instance).SOAPToObject(RootNode, Node, Self)
else
InitObjectFromSOAP(Instance, RootNode, Node);
end;
SOAPToObject calls InitObjectFromSOAP and within that procedure Count :=
GetTypeData(Instance.ClassInfo)^.PropCount; returns 0. Please someone can
shred some light here to modify the delphi code to support nil TXSDateTime.
Thanks
Jude
<?xml version="1.0" encoding="utf-8" ?>
- <soapenv:Envelope
xmlns:soapenv="schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="www.w3.org/2001/XMLSchema"
xmlns:xsi="www.w3.org/2001/XMLSchema-instance">
<soapenv:Header />
- <soapenv:Body>
- <getQuoteRequestResponse xmlns="webservice.pnet.aami.com.au">
- <response
xmlns="quoterequest.response.webservice.pnet.aami.com.au">
<quoteRequestNumber>385</quoteRequestNumber>
<quoteRequestVersionNumber>1</quoteRequestVersionNumber>
<claimNumber>2179484100</claimNumber>
<claimDescription>I WAS HIT FROM BEHIND & SHUNTED INTO THE CAR IN FRT. IV
DAM - FRT & REAR DAM TP1 - FRT TP2 - REAR</claimDescription>
<claimManager>AAMI</claimManager>
<corporateCustomer>AAMI</corporateCustomer>
- <claimCustomer>
<title xmlns="comm.webservice.pnet.aami.com.au" />
<surname xmlns="comm.webservice.pnet.aami.com.au" />
<firstName xmlns="comm.webservice.pnet.aami.com.au" />
<companyName xmlns="comm.webservice.pnet.aami.com.au" />
</claimCustomer>
<vehicleLocation>Unknown</vehicleLocation>
<bayNumber />
<offsiteQuoting>0</offsiteQuoting>
<extraQuoteInformationRequested>1</extraQuoteInformationRequested>
<quoteDueTime xsi:nil="true" />
<vehicleRegistration>ZW631</vehicleRegistration>
<vehicleDescription>UTE</vehicleDescription>
- <extraVehicleInfo>
<vehicleMake xmlns="comm.webservice.pnet.aami.com.au" />
<yearOfManufacture
xmlns="comm.webservice.pnet.aami.com.au">0</yearOfManufacture>
<monthOfManufacture
xmlns="comm.webservice.pnet.aami.com.au">0</monthOfManufacture>
<bodyShape xmlns="comm.webservice.pnet.aami.com.au" />
<transmissionType xmlns="comm.webservice.pnet.aami.com.au" />
<numberOfCylinders xmlns="comm.webservice.pnet.aami.com.au" />
<vinChassis xmlns="comm.webservice.pnet.aami.com.au" />
<color xsi:nil="true" xmlns="comm.webservice.pnet.aami.com.au" />
<paintType xsi:nil="true" xmlns="comm.webservice.pnet.aami.com.au"
/>
<odometer xmlns="comm.webservice.pnet.aami.com.au">0</odometer>
<fuelLevel xmlns="comm.webservice.pnet.aami.com.au">0</fuelLevel>
<damageDescription xmlns="comm.webservice.pnet.aami.com.au" />
<oldDamageDescription xmlns="comm.webservice.pnet.aami.com.au" />
</extraVehicleInfo>
<instructions />
<quoteRequestImageIds />
</response>
</getQuoteRequestResponse>
</soapenv:Body>
</soapenv:Envelope>
 
 

Re:TXSDateTime issue

Hello,
I'll need a little more detail to investigate this as there's something that
went wrong in that we should never go to LoadObject for a TXSDateTime.
Although it is a class and classes typically are loaded via LoadObject,
TXSDateTime (and all other TXSxxxx types) really represent XML simple
types - hence serialize and deserialize via XSToNative and NativetoXS.
Can you post the Pascal type that corresponds to the response from this
method (i.e. the method that contains the following:
property quoteDueTime: TXSDateTime read FquoteDueTime;
)... and any serialization options attached to that type.
I'll also double check the code path and relay any findings.
Cheers,
Bruneau.
 

Re:TXSDateTime issue

Hi Jean,
Thanks for the quick response.
Here is pascal type of the response. Where do I look for serialization
options?
Thanks
Jude
GetQuoteRequestResponse = class(TRemotable)
private
FquoteRequestNumber: Integer;
FquoteRequestVersionNumber: Smallint;
FclaimNumber: Int64;
FclaimDescription: WideString;
FclaimManager: WideString;
FcorporateCustomer: WideString;
FclaimCustomer: ClaimCustomer;
FvehicleLocation: WideString;
FbayNumber: WideString;
FoffsiteQuoting: Boolean;
FextraQuoteInformationRequested: Boolean;
FquoteDueTime: TXSDateTime;
FvehicleRegistration: WideString;
FvehicleDescription: WideString;
FextraVehicleInfo: ExtraVehicleInformation;
Finstructions: WideString;
FquoteRequestImageIds: ImageIDs;
public
destructor Destroy; override;
published
property quoteRequestNumber: Integer read FquoteRequestNumber write
FquoteRequestNumber;
property quoteRequestVersionNumber: Smallint read
FquoteRequestVersionNumber write FquoteRequestVersionNumber;
property claimNumber: Int64 read FclaimNumber write FclaimNumber;
property claimDescription: WideString read FclaimDescription write
FclaimDescription;
property claimManager: WideString read FclaimManager write
FclaimManager;
property corporateCustomer: WideString read FcorporateCustomer write
FcorporateCustomer;
property claimCustomer: ClaimCustomer read FclaimCustomer write
FclaimCustomer;
property vehicleLocation: WideString read FvehicleLocation write
FvehicleLocation;
property bayNumber: WideString read FbayNumber write FbayNumber;
property offsiteQuoting: Boolean read FoffsiteQuoting write
FoffsiteQuoting;
property extraQuoteInformationRequested: Boolean read
FextraQuoteInformationRequested write FextraQuoteInformationRequested;
property quoteDueTime: TXSDateTime read FquoteDueTime write
FquoteDueTime;
property vehicleRegistration: WideString read FvehicleRegistration write
FvehicleRegistration;
property vehicleDescription: WideString read FvehicleDescription write
FvehicleDescription;
property extraVehicleInfo: ExtraVehicleInformation read
FextraVehicleInfo write FextraVehicleInfo;
property instructions: WideString read Finstructions write
Finstructions;
property quoteRequestImageIds: ImageIDs read FquoteRequestImageIds write
FquoteRequestImageIds;
end;
"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
Quote
Hello,

I'll need a little more detail to investigate this as there's something
that
went wrong in that we should never go to LoadObject for a TXSDateTime.
Although it is a class and classes typically are loaded via LoadObject,
TXSDateTime (and all other TXSxxxx types) really represent XML simple
types - hence serialize and deserialize via XSToNative and NativetoXS.

Can you post the Pascal type that corresponds to the response from this
method (i.e. the method that contains the following:

property quoteDueTime: TXSDateTime read FquoteDueTime;

)... and any serialization options attached to that type.

I'll also double check the code path and relay any findings.

Cheers,

Bruneau.


 

Re:TXSDateTime issue

Hi Jean,
This is what I see in wsdl file. Is that what you are after for
serialization options?
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="quoterequest.response.webservice.pnet.aami.com.au"
xmlns="www.w3.org/2001/XMLSchema"
xmlns:comm="comm.webservice.pnet.aami.com.au"
xmlns:impl="webservice.pnet.aami.com.au"
xmlns:intf="webservice.pnet.aami.com.au"
xmlns:wsdl="schemas.xmlsoap.org/wsdl/"
xmlns:wsi="ws-i.org/profiles/basic/1.1/xsd"
xmlns:xsd="www.w3.org/2001/XMLSchema">
<import namespace="comm.webservice.pnet.aami.com.au"/>
<complexType name="GetQuoteRequestResponse">
<sequence>
<element name="quoteRequestNumber" type="xsd:int"/>
<element name="quoteRequestVersionNumber" type="xsd:short"/>
<element name="claimNumber" type="xsd:long"/>
<element name="claimDescription" type="xsd:string"/>
<element name="claimManager" type="comm:ClaimManager"/>
<element name="corporateCustomer" type="xsd:string"/>
<element name="claimCustomer" type="comm:ClaimCustomer"/>
<element name="vehicleLocation" type="xsd:string"/>
<element name="bayNumber" type="xsd:string"/>
<element name="offsiteQuoting" type="xsd:boolean"/>
<element name="extraQuoteInformationRequested" type="xsd:boolean"/>
<element name="quoteDueTime" type="xsd:dateTime"/>
<element name="vehicleRegistration" type="xsd:string"/>
<element name="vehicleDescription" type="xsd:string"/>
<element name="extraVehicleInfo" type="comm:ExtraVehicleInformation"/>
<element name="instructions" type="xsd:string"/>
<element name="quoteRequestImageIds" type="comm:ImageIDs"/>
</sequence>
</complexType>
<element name="getQuoteRequestResponse">
<complexType>
<sequence>
<element name="response" type="quoterequest:GetQuoteRequestResponse"/>
</sequence>
</complexType>
</element>
</schema>
"Jude" <XXXX@XXXXX.COM>writes
Quote
Hi Jean,
Thanks for the quick response.
Here is pascal type of the response. Where do I look for serialization
options?

Thanks
Jude

GetQuoteRequestResponse = class(TRemotable)
private
FquoteRequestNumber: Integer;
FquoteRequestVersionNumber: Smallint;
FclaimNumber: Int64;
FclaimDescription: WideString;
FclaimManager: WideString;
FcorporateCustomer: WideString;
FclaimCustomer: ClaimCustomer;
FvehicleLocation: WideString;
FbayNumber: WideString;
FoffsiteQuoting: Boolean;
FextraQuoteInformationRequested: Boolean;
FquoteDueTime: TXSDateTime;
FvehicleRegistration: WideString;
FvehicleDescription: WideString;
FextraVehicleInfo: ExtraVehicleInformation;
Finstructions: WideString;
FquoteRequestImageIds: ImageIDs;
public
destructor Destroy; override;
published
property quoteRequestNumber: Integer read FquoteRequestNumber write
FquoteRequestNumber;
property quoteRequestVersionNumber: Smallint read
FquoteRequestVersionNumber write FquoteRequestVersionNumber;
property claimNumber: Int64 read FclaimNumber write FclaimNumber;
property claimDescription: WideString read FclaimDescription write
FclaimDescription;
property claimManager: WideString read FclaimManager write
FclaimManager;
property corporateCustomer: WideString read FcorporateCustomer write
FcorporateCustomer;
property claimCustomer: ClaimCustomer read FclaimCustomer write
FclaimCustomer;
property vehicleLocation: WideString read FvehicleLocation write
FvehicleLocation;
property bayNumber: WideString read FbayNumber write FbayNumber;
property offsiteQuoting: Boolean read FoffsiteQuoting write
FoffsiteQuoting;
property extraQuoteInformationRequested: Boolean read
FextraQuoteInformationRequested write FextraQuoteInformationRequested;
property quoteDueTime: TXSDateTime read FquoteDueTime write
FquoteDueTime;
property vehicleRegistration: WideString read FvehicleRegistration
write FvehicleRegistration;
property vehicleDescription: WideString read FvehicleDescription write
FvehicleDescription;
property extraVehicleInfo: ExtraVehicleInformation read
FextraVehicleInfo write FextraVehicleInfo;
property instructions: WideString read Finstructions write
Finstructions;
property quoteRequestImageIds: ImageIDs read FquoteRequestImageIds
write FquoteRequestImageIds;
end;


"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
news:456e407f$XXXX@XXXXX.COM...
>Hello,
>
>I'll need a little more detail to investigate this as there's something
>that
>went wrong in that we should never go to LoadObject for a TXSDateTime.
>Although it is a class and classes typically are loaded via LoadObject,
>TXSDateTime (and all other TXSxxxx types) really represent XML simple
>types - hence serialize and deserialize via XSToNative and NativetoXS.
>
>Can you post the Pascal type that corresponds to the response from this
>method (i.e. the method that contains the following:
>
>property quoteDueTime: TXSDateTime read FquoteDueTime;
>
>)... and any serialization options attached to that type.
>
>I'll also double check the code path and relay any findings.
>
>Cheers,
>
>Bruneau.
>
>


 

Re:TXSDateTime issue

Hello,
Somewhere at the end of unit generated by the importer there will be some
calls (maybe?) to register serialization options. The options are typically
(in verbose mode) listed in comments just preceding the type declaration.
I believe I have enough info. to research this issue. I will relay my
findings.
Cheers,
Bruneau.
 

Re:TXSDateTime issue

Hi Jean,
For you info
RemClassRegistry.RegisterSerializeOptions(getAdjustedQuoteResponse2,
[xoLiteralParam]);
Thanks for the help
"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
Quote
Hello,

Somewhere at the end of unit generated by the importer there will be some
calls (maybe?) to register serialization options. The options are
typically
(in verbose mode) listed in comments just preceding the type declaration.

I believe I have enough info. to research this issue. I will relay my
findings.

Cheers,

Bruneau.


 

Re:TXSDateTime issue

Hi Jean,
Thanks for looking into this issue. Do you have any update for this issue?
Jude
"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
Quote
Hello,

Somewhere at the end of unit generated by the importer there will be some
calls (maybe?) to register serialization options. The options are
typically
(in verbose mode) listed in comments just preceding the type declaration.

I believe I have enough info. to research this issue. I will relay my
findings.

Cheers,

Bruneau.


 

Re:TXSDateTime issue

Hello,
Thanks for the reminder. it is hectic here currently (another deadline)...
I've verified that we have unit tests that have complex types returning
nillable xsd:dateTime. However, your setup also involved an unwrapped
literal parameter (which takes a slightly different code path). It will take
a little time to setup a server that the importer does not unwrap. I also
have the latest sources which include a few recent fixes.
If that is OK with you what I would like to do is email you the latest runtime
sources. You can simply add them to your project to see if that helps. I
remember fixing TXSDateTime (and other TXSxxxx types) when used as
attributes. I don't recall something specific to nil nodes...
As soon as time allows, I will try to put together a services that mimics
something along the lines of what you posted. If possible, you could also
run the importer with a -S (for generate server skeletons) on the WSDL and
send me the generated .pas file. Using a LinkedRIO I can them have the
client and server do a loop back call to walk through the code.
Please email me at XXXX@XXXXX.COM if you'd like to proceed with trying
out the updated runtime. Otherwise, I will try to make some time soon to
investigate this.
Cheers,
Bruenau.
 

Re:TXSDateTime issue

Hi Jean,
I have sent you an email with wsdl file. Please let me know if you need any
other help. This project is due on 15 dec. I'd appreciate if I can get
some solution by the due time.
Thanks in advance.
Jude
"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
Quote
Hello,

Thanks for the reminder. it is hectic here currently (another deadline)...

I've verified that we have unit tests that have complex types returning
nillable xsd:dateTime. However, your setup also involved an unwrapped
literal parameter (which takes a slightly different code path). It will
take
a little time to setup a server that the importer does not unwrap. I also
have the latest sources which include a few recent fixes.

If that is OK with you what I would like to do is email you the latest runtime
sources. You can simply add them to your project to see if that helps. I
remember fixing TXSDateTime (and other TXSxxxx types) when used as
attributes. I don't recall something specific to nil nodes...

As soon as time allows, I will try to put together a services that mimics
something along the lines of what you posted. If possible, you could also
run the importer with a -S (for generate server skeletons) on the WSDL and
send me the generated .pas file. Using a LinkedRIO I can them have the
client and server do a loop back call to walk through the code.

Please email me at XXXX@XXXXX.COM if you'd like to proceed with trying
out the updated runtime. Otherwise, I will try to make some time soon to
investigate this.

Cheers,

Bruenau.


 

Re:TXSDateTime issue

Hello,
I've emailed up an updated importer as well as the latest version of the
SOAP runtime.
Cheers,
Bruneau.
 

Re:TXSDateTime issue

Bruneau,
The problem is fixed. Thanks for the latest soap runtime files. You are such
a great helper.
Best regards,
Jude
"Jean-Marie Babet" <XXXX@XXXXX.COM>writes
Quote
Hello,

I've emailed up an updated importer as well as the latest version of the
SOAP runtime.

Cheers,

Bruneau.