I have noticed that Serializer doesn't serialize everything equally
well, so I ended up creating specialized objects for data exchange
over RSB.

And some time later I thought about serializing (and possibly Base64-
encoding) them myself before sending. I have not implemented it, but
maybe it can help in your case?

On Jun 28, 10:28 pm, Strobaek <[email protected]> wrote:
> To understand what was going on, I created a really simple solution
> with three class libraries (server, client and message) and one
> console app. I got this to work fine, sending and receiving messages.
> I then tried to add my socket listener class and as soon as I receive
> a message, I get the following error/exception; I don't even get
> inside my code:
>
> A first chance exception of type 'System.ArgumentException' occurred
> in System.Xml.dll
> System.Transactions Critical: 0 : <TraceRecord xmlns="http://
> schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"
> Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/
> TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/
> Unhandled</TraceIdentifier><Description>Unhandled exception</
> Description><AppDomain>DevEnv.vshost.exe</
> AppDomain><Exception><ExceptionType>System.ArgumentException,
> mscorlib, Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089</ExceptionType><Message>'&#x1;',
> hexadecimal value 0x01, is an invalid character.</
> Message><StackTrace>   at
> System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch, Char*
> pDst, Boolean entitize)
>    at System.Xml.XmlEncodedRawTextWriter.WriteElementTextBlock(Char*
> pSrc, Char* pSrcEnd)
>
> My message is a string of key-value pairs where the hexadecimal value
> 0x01 is used as delimitor. The stacktrace is quite long, so I will not
> include it here, but it seems like
> Rhino.ServiceBus.Serializers.XmlMessageSerializer.Serialize() is
> involved.
>
> Why is this? As I cannot change the message format of what is going
> over the wire, I really need to be able to read the hexadecimal value.
> I have no problem reading this value, if I do not include the
> ServiceBus.
>
> At this point in time, I have only initialized the ServiceBus, but it
> seems like it is trying to serialize when I read from the socket.
>
> ServiceBus is configured to use port 50001 and 50002 and my socket
> listener is listening to port 10001, so there should be no conflight
> here.
>
> Thank you.
>
> On Jun 28, 7:43 pm, Mike Nichols <[email protected]> wrote:
>
>
>
>
>
>
>
> > Can you share you configuration?
>
> > On Jun 27, 1:04 am, Strobaek <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm writing a class libray where I need to read some messages from an
> > > (async) socket, parse it and send it on for further processing. I am
> > > considering to use the Rhino ServcieBus to de-couple the message, but
> > > am having some problems with the setup.
>
> > > To test my class library, I've added another project to my soludion, a
> > > console app, which will fire up the Listener. When I have received my
> > > message I call bus.Send(). So far so good. My problem is, that my
> > > consumer never gets the message. If I put everything inside the
> > > console project it works, but I would like to have my consumer in my
> > > "socket" library or maybe another class library.
>
> > > I'm sure it has to do with the setup, but I just can's swing it.
>
> > > Thanks in advance for any help/pointers.- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to