Java 我在发送短信时遇到异常

Java 我在发送短信时遇到异常,java,sms-gateway,Java,Sms Gateway,} } 有人能纠正这个错误吗? 我正在通过Ozeki NG短信网关发送短信。我想你没有为短信网关付费,这就是它不起作用的原因 我说得对吗 另一个原因是您可能给出了错误的发送参数: java.io.IOException: An established connection was aborted by the software in your hostmachine java.io.IOException: An established connection w

}

}

有人能纠正这个错误吗?
我正在通过Ozeki NG短信网关发送短信。

我想你没有为短信网关付费,这就是它不起作用的原因

我说得对吗

另一个原因是您可能给出了错误的发送参数:

    java.io.IOException: An established connection was aborted by the software in 
    your hostmachine    
    java.io.IOException: An established connection was aborted by the software in 
    yourhost machine                                                                                    
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
    at sun.nio.ch.IOUtil.read(IOUtil.java:206)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
    at hu.ozeki.OzSmsClient.run(OzSmsClient.java:87)

“电话号码”应替换为一些真实的电话号码

代码!另外,请接受一些旧问题的答案。给我们看一些代码怎么样?
package hu.ozekisms;

import java.io.*;
import java.util.*;
import hu.ozeki.*;

public class MyOzSmsClient extends OzSmsClient{

public MyOzSmsClient(String host, int port) throws IOException, InterruptedException {
    super(host, port);
    // TODO Auto-generated constructor stub
}   

@Override
public void doOnMessageAcceptedForDelivery(OzSMSMessage sms) {
    Date now = new Date();
    System.out.println(now.toString() + " Message accepted for delivery. ID: " + sms.messageId);
}

@Override
public void doOnMessageDeliveredToHandset(OzSMSMessage sms) {
    Date now = new Date();
    System.out.println(now.toString() + " Message delivered to handset. ID: " + sms.messageId);
}

@Override
public void doOnMessageDeliveredToNetwork(OzSMSMessage sms) {
    Date now = new Date();
    System.out.println(now.toString() + " Message delivered to network. ID: " + sms.messageId);
}

@Override
public void doOnMessageDeliveryError(OzSMSMessage sms) {
    Date now = new Date();
    System.out.println(now.toString() + " Message could not be delivered. ID: " + sms.messageId + " Error message: " + sms.errorMessage + "\r\n");
}

@Override
public void doOnMessageReceived(OzSMSMessage sms) {
    Date now = new Date();
    System.out.println(now.toString() + " Message received. Sender address: " + sms.sender + " Message text: " + sms.messageData  + " at: "+ sms.receivedDate);
}

@Override
public void doOnClientConnectionError(int errorCode, String errorMessage) {
    Date now = new Date();
    System.out.println(now.toString() + " Message code: " + errorCode + ", Message: " + errorMessage);
}
    java.io.IOException: An established connection was aborted by the software in 
    your hostmachine    
    java.io.IOException: An established connection was aborted by the software in 
    yourhost machine                                                                                    
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
    at sun.nio.ch.IOUtil.read(IOUtil.java:206)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
    at hu.ozeki.OzSmsClient.run(OzSmsClient.java:87)
osc.sendMessage("phone number", "Test Message");