[esb-dev] message.getBody().setContents(some object) is deprecated

Mark Little mlittle at redhat.com
Thu May 17 11:30:10 EDT 2007


See, that's what happens when the North and South come together. You  
lose your identity.

Mark.


On 17 May 2007, at 16:26, Tom Fennelly wrote:

> lol
>
> Nah, we'd actually be posh Irish... we traded up the pig for a  
> dog.  It's a mongrel though.  We hope to trade up to a purebred one  
> of these days :-)
>
> Mark Little wrote:
>> Print off the specs and the WSDL/schemas and you can paper your  
>> entire house! I'm assuming it's got 5 floors with 2 bedrooms and  
>> an outhouse for the pig ;-)?
>>
>> Mark.
>>
>>
>> On 17 May 2007, at 16:16, Tom Fennelly wrote:
>>
>>> Now I'm interested in reading them!  Maybe I'll have a theme  
>>> room, with the walls covered in lines like that :-)
>>>
>>> Mark Little wrote:
>>>> ;)
>>>>
>>>> You should look at some WS-* specs ;-)
>>>>
>>>> Mark.
>>>>
>>>>
>>>> On 17 May 2007, at 16:08, Tom Fennelly wrote:
>>>>
>>>>> "... plus encryption of data, plus a general purpose  
>>>>> extensibility element"
>>>>>
>>>>> I'm printing that one off and posting it on the wall.  It's a  
>>>>> gem :-)
>>>>>
>>>>> Mark Little wrote:
>>>>>> That was one of it's original intentions, plus encryption of  
>>>>>> data, plus a general purpose extensibility element.
>>>>>>
>>>>>> Mark.
>>>>>>
>>>>>>
>>>>>> On 17 May 2007, at 15:40, Kurt T Stam wrote:
>>>>>>
>>>>>>> Yeah also with respect to:
>>>>>>>
>>>>>>>> just a byte array for anything that wasn't an Object, e.g.,  
>>>>>>>> a stream in
>>>>>>> for bytes, get a stream out of bytes
>>>>>>>
>>>>>>> Isn't everything in java an object? Is this for compatibility  
>>>>>>> across
>>>>>>> languages and platforms then?
>>>>>>>
>>>>>>> --K
>>>>>>>
>>>>>>> Tom Fennelly wrote:
>>>>>>>> While your at that, perhaps we should provide hard examples of
>>>>>>>> why/when one would attach objects to Message.Attachment Vs
>>>>>>>> Message.Body.  From the position of someone just using the  
>>>>>>>> API (Vs the
>>>>>>>> author), these classes look as though they do pretty much  
>>>>>>>> the same thing.
>>>>>>>>
>>>>>>>> T.
>>>>>>>>
>>>>>>>> Kurt T Stam wrote:
>>>>>>>>> Maybe the javadoc too then?
>>>>>>>>>
>>>>>>>>> Mark Little wrote:
>>>>>>>>>> I'm going to update the manual then, because it's  
>>>>>>>>>> obviously as clear
>>>>>>>>>> as mud ;-)
>>>>>>>>>>
>>>>>>>>>> Mark.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 17 May 2007, at 15:02, Kurt T Stam wrote:
>>>>>>>>>>
>>>>>>>>>>> Ah that's helps :).
>>>>>>>>>>>
>>>>>>>>>>> Yeah what I'm after is that there need to be a way to get  
>>>>>>>>>>> the whole
>>>>>>>>>>> thing. Sometimes you have no clue what's been set, so there
>>>>>>>>>>> should be way to "Get me the whole thing".
>>>>>>>>>>>
>>>>>>>>>>> --K
>>>>>>>>>>>
>>>>>>>>>>> Mark Little wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> On 17 May 2007, at 14:49, Kurt T Stam wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> There has been a lot of confusion on how to set the body
>>>>>>>>>>>>> object(s), and
>>>>>>>>>>>>> I think that we should get the word out that the
>>>>>>>>>>>>> 'right' way of doing this is to use:
>>>>>>>>>>>>>
>>>>>>>>>>>>> message.getBody().add(Body.DEFAULT_NAME, your object)
>>>>>>>>>>>>
>>>>>>>>>>>> There is no single "right" way. This is a default/ 
>>>>>>>>>>>> convenience. The
>>>>>>>>>>>> way it's supposed to happen is that the endpoints agree  
>>>>>>>>>>>> (via the
>>>>>>>>>>>> contract definition) where in the body specific contents  
>>>>>>>>>>>> go (what
>>>>>>>>>>>> names, for example).
>>>>>>>>>>>>
>>>>>>>>>>>> add(Object o) // <-- no parameter, is just for lazy  
>>>>>>>>>>>> developers ;-)
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> The thing I don't really understand is why getByteArray  
>>>>>>>>>>>>> does not
>>>>>>>>>>>>> stream
>>>>>>>>>>>>> all the objects into the ByteArray? I guess I don't really
>>>>>>>>>>>>> understand
>>>>>>>>>>>>> why we have the "_content" in addition to it; taken  
>>>>>>>>>>>>> from the
>>>>>>>>>>>>> BodyImpl class:
>>>>>>>>>>>>
>>>>>>>>>>>> Because that's the definition of getByteArray. It's not  
>>>>>>>>>>>> meant to
>>>>>>>>>>>> be the entire contents of the message, just a byte array  
>>>>>>>>>>>> for
>>>>>>>>>>>> anything that wasn't an Object, e.g., a stream in for  
>>>>>>>>>>>> bytes, get a
>>>>>>>>>>>> stream out of bytes. But not mutually exclusive to the  
>>>>>>>>>>>> named
>>>>>>>>>>>> objects, attachments etc.
>>>>>>>>>>>>
>>>>>>>>>>>> What you're after would probably be: getBodyAsByteArray
>>>>>>>>>>>>
>>>>>>>>>>>> Mark.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> public BodyImpl()
>>>>>>>>>>>>>     {
>>>>>>>>>>>>>         _content = null;
>>>>>>>>>>>>>         _objects = new Hashtable<String, Object>();
>>>>>>>>>>>>>     }
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx,
>>>>>>>>>>>>>
>>>>>>>>>>>>> --Kurt
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> esb-dev mailing list
>>>>>>>>>>>>> esb-dev at lists.jboss.org <mailto:esb-dev at lists.jboss.org>
>>>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/esb-dev
>>>>>>>>>>>>
>>>>>>>>>>>> ----
>>>>>>>>>>>>
>>>>>>>>>>>> Mark Little
>>>>>>>>>>>> mlittle at redhat.com <mailto:mlittle at redhat.com>
>>>>>>>>>>>>
>>>>>>>>>>>> JBoss, a Division of Red Hat
>>>>>>>>>>>> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111
>>>>>>>>>>>> Peascod Street, Windsor, Berkshire, SI4 1TE, United  
>>>>>>>>>>>> Kingdom.
>>>>>>>>>>>> Registered in UK and Wales under Company Registration  
>>>>>>>>>>>> No. 3798903
>>>>>>>>>>>> Directors: Michael Cunningham (USA), Charlie Peters  
>>>>>>>>>>>> (USA) and
>>>>>>>>>>>> David Owens (Ireland)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ----
>>>>>>>>>>
>>>>>>>>>> Mark Little
>>>>>>>>>> mlittle at redhat.com <mailto:mlittle at redhat.com>
>>>>>>>>>>
>>>>>>>>>> JBoss, a Division of Red Hat
>>>>>>>>>> Registered Address: Red Hat UK Ltd, Amberley Place,  
>>>>>>>>>> 107-111 Peascod
>>>>>>>>>> Street, Windsor, Berkshire, SI4 1TE, United Kingdom.  
>>>>>>>>>> Registered in
>>>>>>>>>> UK and Wales under Company Registration No. 3798903  
>>>>>>>>>> Directors:
>>>>>>>>>> Michael Cunningham (USA), Charlie Peters (USA) and David  
>>>>>>>>>> Owens
>>>>>>>>>> (Ireland)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> -------------------------------------------------------------- 
>>>>>>>>> ----------
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> esb-dev mailing list
>>>>>>>>> esb-dev at lists.jboss.org <mailto:esb-dev at lists.jboss.org>
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/esb-dev
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ----
>>>>>>
>>>>>> Mark Little
>>>>>> mlittle at redhat.com <mailto:mlittle at redhat.com>
>>>>>>
>>>>>> JBoss, a Division of Red Hat
>>>>>> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111  
>>>>>> Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.  
>>>>>> Registered in UK and Wales under Company Registration No.  
>>>>>> 3798903 Directors: Michael Cunningham (USA), Charlie Peters  
>>>>>> (USA) and David Owens (Ireland)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> -- 
>>>>> Red Hat:
>>>>> Registered Address: Red Hat Ltd, Brian O' Donnell and Partners,  
>>>>> 62 Merrion Square, Dublin 2, Ireland.
>>>>> Registered in the Companies Registration Office, Parnell House,  
>>>>> 14 Parnell Square, Dublin 1, Ireland, at No. 304873
>>>>> Directors: Charlie Peters (USA), Michael Cunningham (USA).  
>>>>> David Owens, Brendan Lane
>>>>>
>>>>
>>>> ----
>>>>
>>>> Mark Little
>>>> mlittle at redhat.com <mailto:mlittle at redhat.com>
>>>>
>>>> JBoss, a Division of Red Hat
>>>> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111  
>>>> Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.  
>>>> Registered in UK and Wales under Company Registration No.  
>>>> 3798903 Directors: Michael Cunningham (USA), Charlie Peters  
>>>> (USA) and David Owens (Ireland)
>>>>
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> Red Hat:
>>> Registered Address: Red Hat Ltd, Brian O' Donnell and Partners,  
>>> 62 Merrion Square, Dublin 2, Ireland.
>>> Registered in the Companies Registration Office, Parnell House,  
>>> 14 Parnell Square, Dublin 1, Ireland, at No. 304873
>>> Directors: Charlie Peters (USA), Michael Cunningham (USA). David  
>>> Owens, Brendan Lane
>>>
>>
>> ----
>>
>> Mark Little
>> mlittle at redhat.com <mailto:mlittle at redhat.com>
>>
>> JBoss, a Division of Red Hat
>> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111  
>> Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.  
>> Registered in UK and Wales under Company Registration No. 3798903  
>> Directors: Michael Cunningham (USA), Charlie Peters (USA) and  
>> David Owens (Ireland)
>>
>>
>>
>>
>
> -- 
> Red Hat:
> Registered Address: Red Hat Ltd, Brian O' Donnell and Partners, 62  
> Merrion Square, Dublin 2, Ireland.
> Registered in the Companies Registration Office, Parnell House, 14  
> Parnell Square, Dublin 1, Ireland, at No. 304873
> Directors: Charlie Peters (USA), Michael Cunningham (USA). David  
> Owens, Brendan Lane
>

----

Mark Little
mlittle at redhat.com

JBoss, a Division of Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod  
Street, Windsor, Berkshire,
SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David  
Owens (Ireland)




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/esb-dev/attachments/20070517/dc83936d/attachment.html 


More information about the esb-dev mailing list