Hi,
I am facing some trouble with the XML marshalling framework. The documentation says that it handles references, particularly forward references. Unless I've made a mistake, it doesn't in the following example. All necessary code and a ready-to-use image is available here: http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip (open the image or load the parcel or file in .st) Please execute the workspace code at first without the second unmarshal message and inspect the result. Diving into ID6 (ColoredPetriNet) brings up 5 transitions. '+' indicates, that the should have a subgraph, but the corresponding structure ist empty. If you execute both unmarshalling messages, the references to the subnets are beeing resolved as intended. Has anybody an idea what goes wrong? Greetings, Steffen Märcker _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Steffen,
I ran your image and executed the workspace expressions, reproducing the behaviour you describe. The 'references' you are describing, I am assuming to be the XML attributes of type ID. Is that correct? You really need someone who has used this same DTD and schema as well as the VisualWorks tools; although that is not me, here are some observations which may or may not help. 1) I do not see that the processor is really getting access to the DTD listed in your XML file. It certainly isn't on my system. So if "page" is a type IDREF attribute of "instance" elements, the marshaller will not have that information. 2) ID6 is the id of a page. It is referenced from an "instance" element through that one's "page" attribute. Are you sure that there is really a problem in the marshalling? Maybe the page is not supposed to be fleshed out until it is referenced? (And that happens incidentally as a side-effect of the second marshalling?) This is a CPN question, and I have no knowledge of CPN tools. Regards. Gregory Bourassa ============================================= Steffen Märcker wrote: > Hi, > > I am facing some trouble with the XML marshalling framework. The > documentation says that it handles references, particularly forward > references. Unless I've made a mistake, it doesn't in the following > example. > All necessary code and a ready-to-use image is available here: > http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip > (open the image or load the parcel or file in .st) > Please execute the workspace code at first without the second unmarshal > message and inspect the result. Diving into ID6 (ColoredPetriNet) brings > up 5 transitions. '+' indicates, that the should have a subgraph, but the > corresponding structure ist empty. If you execute both unmarshalling > messages, the references to the subnets are beeing resolved as intended. > Has anybody an idea what goes wrong? > > Greetings, > Steffen Märcker > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > ----------------------------------------- Key Technology, Inc. Disclaimer Notice - The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged. If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system. Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability. Key Technology, Inc. is not liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Steffen Märcker
Steffen,
Please bear with me, as my only toe-hold in this is the XML and DTD part. I have not used the WebServices marshaller. Having a closer look at your binding.xml, but unable to browse your code because the source files are missing, it occurs to me that the marshaller may not in fact be able to resolve all the forward references. The mapping from your XML to the object model: page --> ColoredPetriNet trans --> CPNTransition ColoredPetriNet holds a collection of CPNTransitions in its "transitions" instance variable. Note that your Schema maps page's child element "trans" to ColoredPetriNet's instance variable "transitions". It mentions the selector "addTransitions:" for Smalltalk to use in setting this. This seems to work well, and gives you the collection of CPNTransition objects on the first marshalling. On the other hand, the Schema maps trans's child element "subst" not to an existing instance variable of CPNTransition (which would be "subgraph"), but instead to the Webservices.Struct called subnetStruct, and gives no Smalltalk selector for setting that. This may be related to the problem with the forward references. I am not very familiar with the object marshaller's Schemas. Maybe the schema could be tightened up to give you the result you want. It may need a "setter" method on CPNTransition, and the corresponding correction of the schema definition for <object name="trans"... G.B. Steffen Märcker wrote: > Hi, > > I am facing some trouble with the XML marshalling framework. The > documentation says that it handles references, particularly forward > references. Unless I've made a mistake, it doesn't in the following > example. > All necessary code and a ready-to-use image is available here: > http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip > (open the image or load the parcel or file in .st) > Please execute the workspace code at first without the second unmarshal > message and inspect the result. Diving into ID6 (ColoredPetriNet) brings > up 5 transitions. '+' indicates, that the should have a subgraph, but the > corresponding structure ist empty. If you execute both unmarshalling > messages, the references to the subnets are beeing resolved as intended. > Has anybody an idea what goes wrong? > > Greetings, > Steffen Märcker > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > ----------------------------------------- Key Technology, Inc. Disclaimer Notice - The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged. If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system. Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability. Key Technology, Inc. is not liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Gregory,
I've tested your suggestions and cleaned up the example. It turns out, that specifying the getters and setters does not make any difference - the problems remain. Furthermore it depends neither on the use of struct nor object in the binding. (I've added both to binding.xml). Is it a bug or my fault? Attached you will find a simplified version of the test case. Please load "HTTP" and "XMLObjectMarshalers" into a clean image, then file in "CPN Tools.st". "X2O - marshalling.ws" contains all necessary code to unmarshal "CPN Claims Process.xml". Inspect the results: -> 1 -> value -> 'ID6' -> transitions Each transition labeled with $+ should hold a struct with a "graph" object. But this works only after unmarshalling the second time. Steffen Am 17.03.2009, 21:18 Uhr, schrieb Gregory Bourassa <[hidden email]>: > Steffen, > > Please bear with me, as my only toe-hold in this is the XML and DTD > part. I have not used the WebServices marshaller. > > Having a closer look at your binding.xml, but unable to browse your > code because the source files are missing, it occurs to me that the > marshaller may not in fact be able to resolve all the forward references. > > The mapping from your XML to the object model: > > page --> ColoredPetriNet > trans --> CPNTransition > > ColoredPetriNet holds a collection of CPNTransitions in its > "transitions" instance variable. > > Note that your Schema maps page's child element "trans" to > ColoredPetriNet's instance variable "transitions". It mentions the > selector "addTransitions:" for Smalltalk to use in setting this. This > seems to work well, and gives you the collection of CPNTransition > objects on the first marshalling. > > On the other hand, the Schema maps trans's child element "subst" not to > an existing instance variable of CPNTransition (which would be > "subgraph"), but instead to the Webservices.Struct called subnetStruct, > and gives no Smalltalk selector for setting that. This may be related > to the problem with the forward references. > > I am not very familiar with the object marshaller's Schemas. Maybe the > schema could be tightened up to give you the result you want. It may > need a "setter" method on CPNTransition, and the corresponding > correction of the schema definition for <object name="trans"... > > G.B. > > > > > Steffen Märcker wrote: >> Hi, >> >> I am facing some trouble with the XML marshalling framework. The >> documentation says that it handles references, particularly forward >> references. Unless I've made a mistake, it doesn't in the following >> example. >> All necessary code and a ready-to-use image is available here: >> http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip >> (open the image or load the parcel or file in .st) >> Please execute the workspace code at first without the second unmarshal >> message and inspect the result. Diving into ID6 (ColoredPetriNet) brings >> up 5 transitions. '+' indicates, that the should have a subgraph, but >> the >> corresponding structure ist empty. If you execute both unmarshalling >> messages, the references to the subnets are beeing resolved as intended. >> Has anybody an idea what goes wrong? >> >> Greetings, >> Steffen Märcker >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >> >> > > > ----------------------------------------- > Key Technology, Inc. Disclaimer Notice - The information and > attachment(s) contained in this communication are intended for the > addressee only, and may be confidential and/or legally privileged. > If you have received this communication in error, please contact > the sender immediately, and delete this communication from any > computer or network system. Any interception, review, printing, > copying, re-transmission, dissemination, or other use of, or taking > of any action upon this information by persons or entities other > than the intended recipient is strictly prohibited by law and may > subject them to criminal or civil liability. Key Technology, Inc. > is not liable for the improper and/or incomplete transmission of > the information contained in this communication or for any delay in > its receipt. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc CPN_Tool - XML.zip (38K) Download Attachment |
In reply to this post by Gregory Bourassa-3
Steffen,
There is a shared variable, XMLObjectMarshalingManager.UseReferences, that controls whether references are processed during marshaling. I'm not sure what the default is, but think it's "false". You can use the accessors on the class side to change it, such as: WebServices.XMLObjectMarshalingManager setUseReferences That might help the situation. Cheers! Tom Hawker -------------------------- Senior Framework Developer -------------------------- Home +1 (408) 274-4128 Office +1 (408) 576-6591 Mobile +1 (408) 835-3643 -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gregory Bourassa Sent: Tuesday, March 17, 2009 1:18 PM To: Steffen Märcker Cc: vwnc Subject: Re: [vwnc] XML marshalling problem Steffen, Please bear with me, as my only toe-hold in this is the XML and DTD part. I have not used the WebServices marshaller. Having a closer look at your binding.xml, but unable to browse your code because the source files are missing, it occurs to me that the marshaller may not in fact be able to resolve all the forward references. The mapping from your XML to the object model: page --> ColoredPetriNet trans --> CPNTransition ColoredPetriNet holds a collection of CPNTransitions in its "transitions" instance variable. Note that your Schema maps page's child element "trans" to ColoredPetriNet's instance variable "transitions". It mentions the selector "addTransitions:" for Smalltalk to use in setting this. This seems to work well, and gives you the collection of CPNTransition objects on the first marshalling. On the other hand, the Schema maps trans's child element "subst" not to an existing instance variable of CPNTransition (which would be "subgraph"), but instead to the Webservices.Struct called subnetStruct, and gives no Smalltalk selector for setting that. This may be related to the problem with the forward references. I am not very familiar with the object marshaller's Schemas. Maybe the schema could be tightened up to give you the result you want. It may need a "setter" method on CPNTransition, and the corresponding correction of the schema definition for <object name="trans"... G.B. Steffen Märcker wrote: > Hi, > > I am facing some trouble with the XML marshalling framework. The > documentation says that it handles references, particularly forward > references. Unless I've made a mistake, it doesn't in the following > example. > All necessary code and a ready-to-use image is available here: > http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip > (open the image or load the parcel or file in .st) > Please execute the workspace code at first without the second unmarshal > message and inspect the result. Diving into ID6 (ColoredPetriNet) brings > up 5 transitions. '+' indicates, that the should have a subgraph, but the > corresponding structure ist empty. If you execute both unmarshalling > messages, the references to the subnets are beeing resolved as intended. > Has anybody an idea what goes wrong? > > Greetings, > Steffen Märcker > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > ----------------------------------------- Key Technology, Inc. Disclaimer Notice - The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged. If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system. Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability. Key Technology, Inc. is not liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc IMPORTANT NOTICE Email from OOCL is confidential and may be legally privileged. If it is not intended for you, please delete it immediately unread. The internet cannot guarantee that this communication is free of viruses, interception or interference and anyone who communicates with us by email is taken to accept the risks in doing so. Without limitation, OOCL and its affiliates accept no liability whatsoever and howsoever arising in connection with the use of this email. Under no circumstances shall this email constitute a binding agreement to carry or for provision of carriage services by OOCL, which is subject to the availability of carrier's equipment and vessels and the terms and conditions of OOCL's standard bill of lading which is also available at http://www.oocl.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Tom,
my examples include the following lines: manager := WebServices.XMLObjectMarshalingManager on: binding. manager useInlineType: true; useReference: true. I thought this would do the job but tried your proposal too. Unforunately it doesn't work. THX, Steffen Am 18.03.2009, 17:57 Uhr, schrieb <[hidden email]>: > Steffen, > > There is a shared variable, XMLObjectMarshalingManager.UseReferences, > that controls whether references are processed during marshaling. I'm > not sure what the default is, but think it's "false". You can use the > accessors on the class side to change it, such as: > > WebServices.XMLObjectMarshalingManager setUseReferences > > That might help the situation. > > Cheers! > Tom Hawker > -------------------------- > Senior Framework Developer > -------------------------- > Home +1 (408) 274-4128 > Office +1 (408) 576-6591 > Mobile +1 (408) 835-3643 > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of Gregory Bourassa > Sent: Tuesday, March 17, 2009 1:18 PM > To: Steffen Märcker > Cc: vwnc > Subject: Re: [vwnc] XML marshalling problem > > Steffen, > > Please bear with me, as my only toe-hold in this is the XML and DTD > part. I have not used the WebServices marshaller. > > Having a closer look at your binding.xml, but unable to browse your > code because the source files are missing, it occurs to me that the > marshaller may not in fact be able to resolve all the forward references. > > The mapping from your XML to the object model: > > page --> ColoredPetriNet > trans --> CPNTransition > > ColoredPetriNet holds a collection of CPNTransitions in its > "transitions" instance variable. > > Note that your Schema maps page's child element "trans" to > ColoredPetriNet's instance variable "transitions". It mentions the > selector "addTransitions:" for Smalltalk to use in setting this. This > seems to work well, and gives you the collection of CPNTransition > objects on the first marshalling. > > On the other hand, the Schema maps trans's child element "subst" not to > an existing instance variable of CPNTransition (which would be > "subgraph"), but instead to the Webservices.Struct called subnetStruct, > and gives no Smalltalk selector for setting that. This may be related > to the problem with the forward references. > > I am not very familiar with the object marshaller's Schemas. Maybe the > schema could be tightened up to give you the result you want. It may > need a "setter" method on CPNTransition, and the corresponding > correction of the schema definition for <object name="trans"... > > G.B. > > > > > Steffen Märcker wrote: >> Hi, >> >> I am facing some trouble with the XML marshalling framework. The >> documentation says that it handles references, particularly forward >> references. Unless I've made a mistake, it doesn't in the following >> example. >> All necessary code and a ready-to-use image is available here: >> http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip >> (open the image or load the parcel or file in .st) >> Please execute the workspace code at first without the second unmarshal >> message and inspect the result. Diving into ID6 (ColoredPetriNet) brings >> up 5 transitions. '+' indicates, that the should have a subgraph, but >> the >> corresponding structure ist empty. If you execute both unmarshalling >> messages, the references to the subnets are beeing resolved as intended. >> Has anybody an idea what goes wrong? >> >> Greetings, >> Steffen Märcker >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >> >> > > > ----------------------------------------- > Key Technology, Inc. Disclaimer Notice - The information and > attachment(s) contained in this communication are intended for the > addressee only, and may be confidential and/or legally privileged. > If you have received this communication in error, please contact > the sender immediately, and delete this communication from any > computer or network system. Any interception, review, printing, > copying, re-transmission, dissemination, or other use of, or taking > of any action upon this information by persons or entities other > than the intended recipient is strictly prohibited by law and may > subject them to criminal or civil liability. Key Technology, Inc. > is not liable for the improper and/or incomplete transmission of > the information contained in this communication or for any delay in > its receipt. > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > IMPORTANT NOTICE > Email from OOCL is confidential and may be legally privileged. If it is > not intended for you, please delete it immediately unread. The internet > cannot guarantee that this communication is free of viruses, > interception or interference and anyone who communicates with us by > email is taken to accept the risks in doing so. Without limitation, > OOCL and its affiliates accept no liability whatsoever and howsoever > arising in connection with the use of this email. Under no > circumstances shall this email constitute a binding agreement to carry > or for provision of carriage services by OOCL, which is subject to the > availability of carrier's equipment and vessels and the terms and > conditions of OOCL's standard bill of lading which is also available at > http://www.oocl.com. vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Steffen Märcker
Steffen,
It looks like there is a bug in XMLObjectMarshalingManager>>addKey:value: Could you, please, try the fix from the attached file and let me know if it works? Thanks, Tamara Kogan Smalltalk development, Cincom Systems > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Steffen Märcker > Sent: Wednesday, March 18, 2009 10:49 AM > To: Gregory Bourassa > Cc: vwnc > Subject: Re: [vwnc] XML marshalling problem > > Hi Gregory, > > I've tested your suggestions and cleaned up the example. It > turns out, > that specifying the getters and setters does not make any > difference - the > problems remain. Furthermore it depends neither on the use of > struct nor > object in the binding. (I've added both to binding.xml). Is > it a bug or my > fault? > Attached you will find a simplified version of the test case. > Please load > "HTTP" and "XMLObjectMarshalers" into a clean image, then > file in "CPN > Tools.st". "X2O - marshalling.ws" contains all necessary code > to unmarshal > "CPN Claims Process.xml". > Inspect the results: > -> 1 -> value -> 'ID6' -> transitions > Each transition labeled with $+ should hold a struct with a "graph" > object. But this works only after unmarshalling the second time. > > Steffen > > > Am 17.03.2009, 21:18 Uhr, schrieb Gregory Bourassa > <[hidden email]>: > > > Steffen, > > > > Please bear with me, as my only toe-hold in this is the XML > and DTD > > part. I have not used the WebServices marshaller. > > > > Having a closer look at your binding.xml, but unable to > browse your > > code because the source files are missing, it occurs to me > that the > > marshaller may not in fact be able to resolve all the > forward references. > > > > The mapping from your XML to the object model: > > > > page --> ColoredPetriNet > > trans --> CPNTransition > > > > ColoredPetriNet holds a collection of CPNTransitions in its > > "transitions" instance variable. > > > > Note that your Schema maps page's child element "trans" to > > ColoredPetriNet's instance variable "transitions". It > mentions the > > selector "addTransitions:" for Smalltalk to use in setting > this. This > > seems to work well, and gives you the collection of CPNTransition > > objects on the first marshalling. > > > > On the other hand, the Schema maps trans's child element > "subst" not to > > an existing instance variable of CPNTransition (which would be > > "subgraph"), but instead to the Webservices.Struct called > subnetStruct, > > and gives no Smalltalk selector for setting that. This > may be related > > to the problem with the forward references. > > > > I am not very familiar with the object marshaller's > Schemas. Maybe the > > schema could be tightened up to give you the result you > want. It may > > need a "setter" method on CPNTransition, and the corresponding > > correction of the schema definition for <object name="trans"... > > > > G.B. > > > > > > > > > > Steffen Märcker wrote: > >> Hi, > >> > >> I am facing some trouble with the XML marshalling framework. The > >> documentation says that it handles references, particularly forward > >> references. Unless I've made a mistake, it doesn't in the following > >> example. > >> All necessary code and a ready-to-use image is available here: > >> http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip > >> (open the image or load the parcel or file in .st) > >> Please execute the workspace code at first without the > second unmarshal > >> message and inspect the result. Diving into ID6 > (ColoredPetriNet) brings > >> up 5 transitions. '+' indicates, that the should have a > subgraph, but > >> the > >> corresponding structure ist empty. If you execute both > unmarshalling > >> messages, the references to the subnets are beeing > resolved as intended. > >> Has anybody an idea what goes wrong? > >> > >> Greetings, > >> Steffen Märcker > >> _______________________________________________ > >> vwnc mailing list > >> [hidden email] > >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > >> > >> > > > > > > ----------------------------------------- > > Key Technology, Inc. Disclaimer Notice - The information and > > attachment(s) contained in this communication are intended for the > > addressee only, and may be confidential and/or legally privileged. > > If you have received this communication in error, please contact > > the sender immediately, and delete this communication from any > > computer or network system. Any interception, review, printing, > > copying, re-transmission, dissemination, or other use of, or taking > > of any action upon this information by persons or entities other > > than the intended recipient is strictly prohibited by law and may > > subject them to criminal or civil liability. Key Technology, Inc. > > is not liable for the improper and/or incomplete transmission of > > the information contained in this communication or for any delay in > > its receipt. > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc XMLObjectMarshalingManager-addKeyvalue.zip (858 bytes) Download Attachment |
Hi Tamara,
thank you for this fix. I've tested it successfully with two input files - all problems gone. Btw, is it advisable to load the current XMLObjectMarshallers packege from Store into a 7.6 image? And will there be a (more) complete documentation of the XMl binding format, e.g. an XML Schema, available? Greetings! Steffen Märcker Am 19.03.2009, 02:14 Uhr, schrieb Kogan, Tamara <[hidden email]>: > Steffen, > > It looks like there is a bug in XMLObjectMarshalingManager>>addKey:value: > > Could you, please, try the fix from the attached file and let me know if > it works? > > Thanks, > Tamara Kogan > Smalltalk development, > Cincom Systems > >> -----Original Message----- >> From: [hidden email] >> [mailto:[hidden email]] On Behalf Of Steffen Märcker >> Sent: Wednesday, March 18, 2009 10:49 AM >> To: Gregory Bourassa >> Cc: vwnc >> Subject: Re: [vwnc] XML marshalling problem >> >> Hi Gregory, >> >> I've tested your suggestions and cleaned up the example. It >> turns out, >> that specifying the getters and setters does not make any >> difference - the >> problems remain. Furthermore it depends neither on the use of >> struct nor >> object in the binding. (I've added both to binding.xml). Is >> it a bug or my >> fault? >> Attached you will find a simplified version of the test case. >> Please load >> "HTTP" and "XMLObjectMarshalers" into a clean image, then >> file in "CPN >> Tools.st". "X2O - marshalling.ws" contains all necessary code >> to unmarshal >> "CPN Claims Process.xml". >> Inspect the results: >> -> 1 -> value -> 'ID6' -> transitions >> Each transition labeled with $+ should hold a struct with a "graph" >> object. But this works only after unmarshalling the second time. >> >> Steffen >> >> >> Am 17.03.2009, 21:18 Uhr, schrieb Gregory Bourassa >> <[hidden email]>: >> >> > Steffen, >> > >> > Please bear with me, as my only toe-hold in this is the XML >> and DTD >> > part. I have not used the WebServices marshaller. >> > >> > Having a closer look at your binding.xml, but unable to >> browse your >> > code because the source files are missing, it occurs to me >> that the >> > marshaller may not in fact be able to resolve all the >> forward references. >> > >> > The mapping from your XML to the object model: >> > >> > page --> ColoredPetriNet >> > trans --> CPNTransition >> > >> > ColoredPetriNet holds a collection of CPNTransitions in its >> > "transitions" instance variable. >> > >> > Note that your Schema maps page's child element "trans" to >> > ColoredPetriNet's instance variable "transitions". It >> mentions the >> > selector "addTransitions:" for Smalltalk to use in setting >> this. This >> > seems to work well, and gives you the collection of CPNTransition >> > objects on the first marshalling. >> > >> > On the other hand, the Schema maps trans's child element >> "subst" not to >> > an existing instance variable of CPNTransition (which would be >> > "subgraph"), but instead to the Webservices.Struct called >> subnetStruct, >> > and gives no Smalltalk selector for setting that. This >> may be related >> > to the problem with the forward references. >> > >> > I am not very familiar with the object marshaller's >> Schemas. Maybe the >> > schema could be tightened up to give you the result you >> want. It may >> > need a "setter" method on CPNTransition, and the corresponding >> > correction of the schema definition for <object name="trans"... >> > >> > G.B. >> > >> > >> > >> > >> > Steffen Märcker wrote: >> >> Hi, >> >> >> >> I am facing some trouble with the XML marshalling framework. The >> >> documentation says that it handles references, particularly forward >> >> references. Unless I've made a mistake, it doesn't in the following >> >> example. >> >> All necessary code and a ready-to-use image is available here: >> >> http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip >> >> (open the image or load the parcel or file in .st) >> >> Please execute the workspace code at first without the >> second unmarshal >> >> message and inspect the result. Diving into ID6 >> (ColoredPetriNet) brings >> >> up 5 transitions. '+' indicates, that the should have a >> subgraph, but >> >> the >> >> corresponding structure ist empty. If you execute both >> unmarshalling >> >> messages, the references to the subnets are beeing >> resolved as intended. >> >> Has anybody an idea what goes wrong? >> >> >> >> Greetings, >> >> Steffen Märcker >> >> _______________________________________________ >> >> vwnc mailing list >> >> [hidden email] >> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >> >> >> >> >> > >> > >> > ----------------------------------------- >> > Key Technology, Inc. Disclaimer Notice - The information and >> > attachment(s) contained in this communication are intended for the >> > addressee only, and may be confidential and/or legally privileged. >> > If you have received this communication in error, please contact >> > the sender immediately, and delete this communication from any >> > computer or network system. Any interception, review, printing, >> > copying, re-transmission, dissemination, or other use of, or taking >> > of any action upon this information by persons or entities other >> > than the intended recipient is strictly prohibited by law and may >> > subject them to criminal or civil liability. Key Technology, Inc. >> > is not liable for the improper and/or incomplete transmission of >> > the information contained in this communication or for any delay in >> > its receipt. >> >> _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I would suggest to load the WebServices bundle latest trunk version but not separate packages.
Tamara Kogan Smalltalk development, Cincom Systems > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] > Sent: Thursday, March 19, 2009 11:27 AM > To: Kogan, Tamara > Cc: vwnc > Subject: Re: [vwnc] XML marshalling problem > > Hi Tamara, > > thank you for this fix. I've tested it successfully with two > input files - > all problems gone. > Btw, is it advisable to load the current XMLObjectMarshallers > packege from > Store into a 7.6 image? And will there be a (more) complete > documentation > of the XMl binding format, e.g. an XML Schema, available? > > Greetings! > Steffen Märcker > > > Am 19.03.2009, 02:14 Uhr, schrieb Kogan, Tamara <[hidden email]>: > > > Steffen, > > > > It looks like there is a bug in > XMLObjectMarshalingManager>>addKey:value: > > > > Could you, please, try the fix from the attached file and > let me know if > > it works? > > > > Thanks, > > Tamara Kogan > > Smalltalk development, > > Cincom Systems > > > >> -----Original Message----- > >> From: [hidden email] > >> [mailto:[hidden email]] On Behalf Of Steffen Märcker > >> Sent: Wednesday, March 18, 2009 10:49 AM > >> To: Gregory Bourassa > >> Cc: vwnc > >> Subject: Re: [vwnc] XML marshalling problem > >> > >> Hi Gregory, > >> > >> I've tested your suggestions and cleaned up the example. It > >> turns out, > >> that specifying the getters and setters does not make any > >> difference - the > >> problems remain. Furthermore it depends neither on the use of > >> struct nor > >> object in the binding. (I've added both to binding.xml). Is > >> it a bug or my > >> fault? > >> Attached you will find a simplified version of the test case. > >> Please load > >> "HTTP" and "XMLObjectMarshalers" into a clean image, then > >> file in "CPN > >> Tools.st". "X2O - marshalling.ws" contains all necessary code > >> to unmarshal > >> "CPN Claims Process.xml". > >> Inspect the results: > >> -> 1 -> value -> 'ID6' -> transitions > >> Each transition labeled with $+ should hold a struct with a "graph" > >> object. But this works only after unmarshalling the second time. > >> > >> Steffen > >> > >> > >> Am 17.03.2009, 21:18 Uhr, schrieb Gregory Bourassa > >> <[hidden email]>: > >> > >> > Steffen, > >> > > >> > Please bear with me, as my only toe-hold in this is the XML > >> and DTD > >> > part. I have not used the WebServices marshaller. > >> > > >> > Having a closer look at your binding.xml, but unable to > >> browse your > >> > code because the source files are missing, it occurs to me > >> that the > >> > marshaller may not in fact be able to resolve all the > >> forward references. > >> > > >> > The mapping from your XML to the object model: > >> > > >> > page --> ColoredPetriNet > >> > trans --> CPNTransition > >> > > >> > ColoredPetriNet holds a collection of CPNTransitions in its > >> > "transitions" instance variable. > >> > > >> > Note that your Schema maps page's child element "trans" to > >> > ColoredPetriNet's instance variable "transitions". It > >> mentions the > >> > selector "addTransitions:" for Smalltalk to use in setting > >> this. This > >> > seems to work well, and gives you the collection of CPNTransition > >> > objects on the first marshalling. > >> > > >> > On the other hand, the Schema maps trans's child element > >> "subst" not to > >> > an existing instance variable of CPNTransition (which would be > >> > "subgraph"), but instead to the Webservices.Struct called > >> subnetStruct, > >> > and gives no Smalltalk selector for setting that. This > >> may be related > >> > to the problem with the forward references. > >> > > >> > I am not very familiar with the object marshaller's > >> Schemas. Maybe the > >> > schema could be tightened up to give you the result you > >> want. It may > >> > need a "setter" method on CPNTransition, and the corresponding > >> > correction of the schema definition for <object name="trans"... > >> > > >> > G.B. > >> > > >> > > >> > > >> > > >> > Steffen Märcker wrote: > >> >> Hi, > >> >> > >> >> I am facing some trouble with the XML marshalling framework. The > >> >> documentation says that it handles references, > particularly forward > >> >> references. Unless I've made a mistake, it doesn't in > the following > >> >> example. > >> >> All necessary code and a ready-to-use image is available here: > >> >> http://dl.getdropbox.com/u/106181/CPN_Tool%20-%20XML.zip > >> >> (open the image or load the parcel or file in .st) > >> >> Please execute the workspace code at first without the > >> second unmarshal > >> >> message and inspect the result. Diving into ID6 > >> (ColoredPetriNet) brings > >> >> up 5 transitions. '+' indicates, that the should have a > >> subgraph, but > >> >> the > >> >> corresponding structure ist empty. If you execute both > >> unmarshalling > >> >> messages, the references to the subnets are beeing > >> resolved as intended. > >> >> Has anybody an idea what goes wrong? > >> >> > >> >> Greetings, > >> >> Steffen Märcker > >> >> _______________________________________________ > >> >> vwnc mailing list > >> >> [hidden email] > >> >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > >> >> > >> >> > >> > > >> > > >> > ----------------------------------------- > >> > Key Technology, Inc. Disclaimer Notice - The information and > >> > attachment(s) contained in this communication are > intended for the > >> > addressee only, and may be confidential and/or legally > privileged. > >> > If you have received this communication in error, please contact > >> > the sender immediately, and delete this communication from any > >> > computer or network system. Any interception, review, printing, > >> > copying, re-transmission, dissemination, or other use > of, or taking > >> > of any action upon this information by persons or entities other > >> > than the intended recipient is strictly prohibited by law and may > >> > subject them to criminal or civil liability. Key Technology, Inc. > >> > is not liable for the improper and/or incomplete transmission of > >> > the information contained in this communication or for > any delay in > >> > its receipt. > >> > >> > > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |