very thanks

but i want using Array or List ,...(for gateway)

Like This

SerialModemGateway gtw[];
gtw[0] = new SerialModemGateway("modem", "COM1", 9600, "Nokia", "");
.....

when using array error occured.
----------------------------------------------------------------
JRE Version: 1.6.0_05
JRE Impl Version: 10.0-b19
O/S: Windows XP / x86 / 5.1
java.lang.NullPointerException


On 10/2/09, Thanasis <[email protected]> wrote:
>
> You mean, reading from multiple modems?
>
> You should define multiple gateways and add them to the Service
> object. In essence, replicate the following lines:
>
> SerialModemGateway gateway = new SerialModemGateway("modem.com1",
> "COM1", 57600, "Nokia", "");
> gateway.setProtocol(Protocols.PDU);
> gateway.setInbound(true);
> gateway.setOutbound(true);
> gateway.setSimPin("0000");
> srv.addGateway(gateway);
>
> as many times as the modems you have (use different "gateway"
> variables!).
>
>
> On Oct 2, 9:58 am, Peogrammer Base <[email protected]> wrote:
>> Hi,
>>
>> I want using multi gateway into ReadMessages.java.
>> i dont Know how using multi gateway, please give me a sample that
>> shown how to use gateway in programm?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SMSLib for Java User Group" 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/smslib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to