Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[VW] marshaling/unmarshaling XML to Smalltalk
Hi there,

I am trying to marshal/unmarshal xml-Smalltalk using the
XMLObjectBinding and XMLObjectMarshalingManager stuff. The documentation
is quite poor on this or I am too blind/stupid/ignorant...

Here's what I do:
| object xmlStream |
object := MyClassToBeMapped new.
xmlStream := '<xmlToSmalltalkBinding name=...' readStream.
WebServices.XMLObjectBinding loadFrom: xmlStream.

"Everything seems to be alright up to here... An INspect shows me an
XMLObjectBinding with the marshaler in it. The classname is spelled
correctly"

XMLObjectMarshalingManager new marshal: object.

Well, this last one doesn't work at all. It cant find a marshaler which
is responsible for MyClassToBeMapped. (Message notUnderstood:
#mashalerForObject:ifAbsent:)
the instVar #regeisteredObjects of the XMLObjectMarshalingManager is an
empty Identity Dictionary.

I certainly missed the place in the docs where they tell me how to
register my marshaler in at the MarshalinManager. It is not the
loadFrom: alone as stated in the docs...

please help...

Joachim


Report this thread to moderator Post Follow-up to this message
Old Post
Joachim Tuchel
10-20-04 09:07 PM


Re: [VW] marshaling/unmarshaling XML to Smalltalk
There may be several reasons. But your code sniplet suggests that you
create the MarshalingManager the wrong way. Try this:

theBinding := WebServices.XMLObjectBinding bindingAtNamespace:
'myNamespace'.
theMarshalManager := WebServices.XMLObjectMarshalingManager on: theBinding.
theMarshalManager marshal: anObject.

Hope this helps.

Volker

Joachim Tuchel wrote:
> Hi there,
>
> I am trying to marshal/unmarshal xml-Smalltalk using the
> XMLObjectBinding and XMLObjectMarshalingManager stuff. The documentation
> is quite poor on this or I am too blind/stupid/ignorant...
>
> Here's what I do:
> | object xmlStream |
> object := MyClassToBeMapped new.
> xmlStream := '<xmlToSmalltalkBinding name=...' readStream.
> WebServices.XMLObjectBinding loadFrom: xmlStream.
>
> "Everything seems to be alright up to here... An INspect shows me an
> XMLObjectBinding with the marshaler in it. The classname is spelled
> correctly"
>
> XMLObjectMarshalingManager new marshal: object.
>
> Well, this last one doesn't work at all. It cant find a marshaler which
> is responsible for MyClassToBeMapped. (Message notUnderstood:
> #mashalerForObject:ifAbsent:)
> the instVar #regeisteredObjects of the XMLObjectMarshalingManager is an
> empty Identity Dictionary.
>
> I certainly missed the place in the docs where they tell me how to
> register my marshaler in at the MarshalinManager. It is not the
> loadFrom: alone as stated in the docs...
>
> please help...
>
> Joachim
>

Report this thread to moderator Post Follow-up to this message
Old Post
Volker Zink
10-21-04 01:57 PM


Re: [VW] marshaling/unmarshaling XML to Smalltalk
Volker,

thanx for answering.


Volker Zink wrote:

> There may be several reasons. But your code sniplet suggests that you
> create the MarshalingManager the wrong way. Try this:

I thought I was doing exactly what the Web Services Guide says. Which,
btw, needs work.
>
>     theBinding := WebServices.XMLObjectBinding bindingAtNamespace:
> 'myNamespace'.

Okay, now we have a Smalltalk Namespace and a couple of XML Namespaces.
Do I pick just another one or does it have to match one of the others?

>     theMarshalManager := WebServices.XMLObjectMarshalingManager on:
> theBinding.
>     theMarshalManager marshal: anObject.
>
I' ll give it a try. thanx

Joachim


> Hope this helps.
>
> Volker
>
> Joachim Tuchel wrote:
> 


--
-------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:jtuchel@objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


Report this thread to moderator Post Follow-up to this message
Old Post
Joachim Tuchel
10-21-04 09:05 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Smalltalk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:26 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.