](*,) Hi Friends,
As per example from Application Designer I have created 2 code units for sending and receiving messages in Navision.
For that I hv installed "Communication Componant/Bus Adapter"."Navision SDK".
As per App. Disgn. instruction m running Message Receiving codeunit 1st and from second session on the same client while running Send message codeunit am getting bellow error -
The call to member GetStream failed. SocketBusAdapter.SocketBusAdapter.1 returned the following message: Failed to connect to 127.0.0.1 on port 8079
Am also posting here sending code unit's codes
IF ISCLEAR(CC2) THEN
CREATE(CC2);
IF ISCLEAR(SBA) THEN
CREATE(SBA);
CC2.AddBusAdapter(SBA,0);
OutMsg := CC2.CreateoutMessage('Sockets://localhost:8079');
OutS := OutMsg.GetStream();
OutS.WRITE('My Message');
Is this problem because of Port code : 8079. If yes then which port no. need to give here and how to get port no of any client.
Please help my friends.
Sanjeev
Comments
RIS Plus, LLC
I tried with its options also. So can u tell me what I need to install on my laptop and need to set parameters. As of now I have installed Communication Component and Bus Adapter. What more apart from this?
Do I need to install Application Server for that..?
Also if u hv code sample which run successfully please give me here.
Thx
Sanjeev
RIS Plus, LLC
You don't really need Application Server I think. You can just leave a client running on the server. However it's useful, because it throws the error messages into the event log instead of on the screen.
Believ me I already gone thru the help provided by Navision and tested its sample codes but i think something is missing due to which m getting the problem.
I used socket with different port nos. I dont _stand which port to put and how to get port no.
I tried Queue message but that also giving problem.
Thats why m asking detail help coz that navision help doesnt cover the system requirement.
Pls help.
Regds,
Sanjeev
RIS Plus, LLC
Sorry 4 later reply. After defining changing SingleInstance Property of Receiving Codeunit problem solved. But when it receives message it receives lots of junk and empty messages along with sent message.
One more thing I also installed Messaging Queue Component.
Is it possible to receive particular message sent to me.
I am using XP.
- only the common MSMQ components are installed. The AD Integration part of MSMQ screws up the bus adapter for some reason. I've seen messages disappear and I got them when I uninstalled all MSMQ components except for the common ones.
- Dedicate one message queue for your program. If other programs send messages into this message queue, you're going to receive those too and it will get confused. With the bus adapter you can't peek the queue, so you have to dedicate certain queues for your program
- Set the receiving message queue to be a NON transactional queue. This is another limitation of the bus adapter, it does not know how to deal with a transactinal queue.
- The message that is sent into your queue has to be a single byte character stream. In double byte encoding characters are represented by two pairs of numbers, and the second pair of single byte characters have the same value as EOS in single byte encoding, and this causes the bus adapter to think that it's the end of the stream, when in fact it's just the end of the first character.
Could you please tell us what 'lots of junk' means?
RIS Plus, LLC
Junk message means blank message box some time box character appears and then my message appear along with box character @ its end.
Still Struggling with that problem. ](*,)