Hi rob 

Sorry for the delayed response . 
I'm attaching a file where the functions are there and the description of the functions . 
It will give you an idea of how we are doing it . 
If you require the input and output files do let me know . But I have already explained and shown you the special characters .
  

  // Writing the string onto the file system.
  
  private boolean stringToFile(String path, String fileName, String data)
        {
                String finalPath = path + fileName;
                boolean isSuccess = false;
                try
                {
                        
                                File newFile = new File(finalPath);
                                FileWriter fw = new FileWriter(newFile);
                                fw.write(data);
                                fw.close();             
                                isSuccess = true;
                        
                }
                catch (IOException e) {
                        logger.error("Exception occured while saving file to 
filesystem");
                }
                return isSuccess;
        }
        
        // Reading the file that is to be put into the qpid queue.  (1)
        
        public DataXml() throws IOException {                       
                File file = new File("D:/GPM/GPM/11413/Data.xml");
                FileInputStream fis = new FileInputStream(file);
                content = new byte[(int) file.length()];
                fis.read(content);
        }

        
        
        public void sendFile(){
                
                QPIDMessage 
qpidmessage=qpidmessagefilesender.createNewQPIDMessage();
                try{
                        
                        FileMessage mes=new FileMessage();
                        mes.putData();   // Puts the data.xml file that is read 
by the DataXml() (1)
                        HashMap<String, byte[]> messageMap=mes.getMessage();
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                    ObjectOutputStream os = new ObjectOutputStream(out);
                    os.writeObject(messageMap);
                    byte[] b=out.toByteArray();
                    
System.out.println("****************@@@@@@@@@@*********"+b.length);
                        qpidmessage.writeBytes(b);    // writes the qpid 
message to be put onto the queue.
                    os.close();
                        out.close();
                }
                catch(Exception e){
                        e.printStackTrace();
                }
                qpidmessagefilesender.send(qpidmessage);
        }
        
        // Message to be sent on the qpid queue
        
                public void send(QPIDMessage message) {
                // TODO Auto-generated method stub
                QPIDMessageCreator qpidmessagecreator = new 
QPIDMessageCreator(message);
                qpidsenderJmsTemplate.send(sendmessagequeuename, 
qpidmessagecreator);
                logger.debug("message sent to qpid on queue " + 
sendmessagequeuename );
                

        }


Thanks 

Akhil Samnotra 

Sent from my iPhone

On 02-Nov-2016, at 8:49 PM, Rob Godfrey <[email protected]> wrote:

Did you say you are using bytes messages?  How are you converting those messages into character data?  My first thought would be that this is an application issue not an issue within Qpid, but it would be good if you could provide some code that demonstrates what you are seeing.

Thanks,
Rob

On 2 November 2016 at 13:06, Akhil Samnotra <[email protected]> wrote:
 Hi rob ,

We are using Java client as 1.7,
Qpid client is 0.18
Qpid server-0.32
The Java client for AMQP 0-9,0-10 and 0-8

As our Java version was older so on using latest client we were getting some compatibility issue 

Thanks 


Sent from my iPhone

On 02-Nov-2016, at 5:49 PM, Rob Godfrey <[email protected]> wrote:

Which Java client are you using?  The Java client for AMQP 0-9/0-10 or the Qpid JMS client for AMQP 1.0?  Are you using the same client at both the sender and the receiver?

-- Rob

On 2 November 2016 at 11:22, Akhil Samnotra <[email protected]> wrote:
Hi Rob,

Our broker is java , client is java and the version we are using is 0.32 version

Thanks

Akhil Samnotra


Sent from my iPhone

> On 02-Nov-2016, at 3:38 PM, Rob Godfrey <[email protected]> wrote:
>
> Hi Akhil,
>
> can you give a little more information about which Broker (C++ / Java),
> which client (Java, C+, Python, etc), and which versions of the broker and
> client you are using?
>
> Thanks,
> Rob
>
>> On 2 November 2016 at 08:36, Akhil Samnotra <[email protected]> wrote:
>>
>> Hi,
>>
>> We are using Apache qpid as broker between Oracle 10 g DB and our
>> application. The message that is passed onto QPID is in a byte format and
>> it has both rtf content and the xml content coming from the DB.
>>
>> The encoding used in the database is ISO-8859-1.
>>
>> It was observed when some special characters that were there in one of the
>> XML was passed onto the QPID as a message they got changed with ? or some
>> other format .
>>
>> And once this message, stored on the local file system and used by the
>> application, these special characters were seen as ?.
>>
>> We want to keep these characters intact.
>>
>> The characters are:
>>
>> °
>>
>> :
>>
>> { ( [
>>
>> ± ≠
>>
>> µ
>>
>> π
>>
>> Ω
>>
>> –
>>
>> -
>>
>> The Character as seen inside QPID Message Queue:
>>
>> ?
>>
>> ?
>>
>> { ( [
>>
>> ± â‰
>>
>> µ
>>
>> π
>>
>> Ω
>>
>> –
>>
>> -
>>
>> The characters seen in the applicatoion:
>>
>>
>>
>> ?
>>
>> ?
>>
>> { ( [
>>
>> ± ?
>>
>> µ
>>
>> ?
>>
>> ?
>>
>> ?
>>
>> -
>>
>> Also, the encoding used in the application is ISO-8859-1.
>>
>> Hence, can you please let us know how we can keep these characters intact.
>>
>>
>> Thanks
>>
>>
>> Akhil Samnotra
>>
>> +91-7888044049
>>


Reply via email to