Any Help on this - Negative response 0000000f found

2,679 views
Skip to first unread message

Lanka

unread,
Dec 11, 2012, 5:22:04 AM12/11/12
to js...@googlegroups.com
Hi All,

I am trying to test the following code (SMPP client) using this simulator. 

public class SimpleSubmitExample {
//  final Logger logger = LoggerFactory.getLogger(SimpleSubmitExample.class);
  private static TimeFormatter timeFormatter = new AbsoluteTimeFormatter();

  public static void main(String[] args) {
    SMPPSession session = new SMPPSession();
    try {
      session.connectAndBind("127.0.0.1", 2775, new BindParameter(
          BindType.BIND_TX, "test", "test", "cp", TypeOfNumber.UNKNOWN,
          NumberingPlanIndicator.UNKNOWN, null),15000);
    } catch (IOException e) {
      System.err.println("Failed connect and bind to host");
      e.printStackTrace();
    }

    try {
      String messageId = session.submitShortMessage("CMT",
          TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, "1616",
          TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN,
          "628176504657", new ESMClass(), (byte) 0, (byte) 1, timeFormatter
              .format(new Date()), null, new RegisteredDelivery(
              SMSCDeliveryReceipt.DEFAULT), (byte) 0, new GeneralDataCoding(
              Alphabet.ALPHA_DEFAULT, MessageClass.CLASS1, false), (byte) 0,
          "jSMPP simplify SMPP on Java platform".getBytes());
      System.out.println("Message submitted, message_id is " + messageId);
    } catch (PDUException e) {
      // Invalid PDU parameter
      System.err.println("Invalid PDU parameter");
      e.printStackTrace();
    } catch (ResponseTimeoutException e) {
      // Response timeout
      System.err.println("Response timeout");
      e.printStackTrace();
    } catch (InvalidResponseException e) {
      // Invalid response
      System.err.println("Receive invalid response");
      e.printStackTrace();
    } catch (NegativeResponseException e) {
      // Receiving negative response (non-zero command_status)
      System.err.println("Receive negative response");
      e.printStackTrace();
    } catch (IOException e) {
      System.err.println("IO error occur");
      e.printStackTrace();
    }

    session.unbindAndClose();
  }
}


The given port is of the simulator. But when run it gives me the following error.

15:41:53,073 DEBUG SMPPSession:215 - Connect and bind to 127.0.0.1 port 2775
15:41:53,090  INFO SMPPSession:221 - Connected
15:41:53,101  INFO SMPPSession:549 - Starting PDUReaderWorker with processor degree:3 ...
15:41:53,131  INFO SMPPSession:555 - PDUReaderWorker stop
15:41:53,134 DEBUG AbstractSessionContext:82 - Activity notified
15:41:53,134 DEBUG SMPPSessionOpen:57 - Bind Response header (16, 80000002, 0000000f, 1)
15:41:53,136 DEBUG AbstractSession:258 - bind response received
15:41:53,138 ERROR SMPPSession:243 - Receive negative bind response
org.jsmpp.extra.NegativeResponseException: Negative response 0000000f found
at org.jsmpp.session.AbstractSession.validateResponse(AbstractSession.java:215)
at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:271)
at org.jsmpp.session.SMPPSession.sendBind(SMPPSession.java:293)
at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:231)
at com.mobiassist.sms.SimpleSubmitExample.main(SimpleSubmitExample.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Failed connect and bind to host
java.io.IOException: Receive negative bind response: Negative response 0000000f found
at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:245)
at com.mobiassist.sms.SimpleSubmitExample.main(SimpleSubmitExample.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
IO error occur
java.io.IOException: Cannot submitShortMessage while in state CLOSED
at org.jsmpp.session.AbstractSession.ensureTransmittable(AbstractSession.java:375)
at org.jsmpp.session.AbstractSession.ensureTransmittable(AbstractSession.java:358)
at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:312)
at com.mobiassist.sms.SimpleSubmitExample.main(SimpleSubmitExample.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)


Any help or hint is greatly appreciated. 
Thanks in advance!

Nagendra E Loli

unread,
Dec 11, 2012, 6:01:38 AM12/11/12
to js...@googlegroups.com

Please make sure all the binding credentials are correct. Either username/password/system id are incorrect..

Cheers

--
You received this message because you are subscribed to the Google Groups "jsmpp" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jsmpp/-/EPhgrfsFEycJ.
To post to this group, send email to js...@googlegroups.com.
To unsubscribe from this group, send email to jsmpp+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jsmpp?hl=en.

manoj prabhakar

unread,
Dec 11, 2012, 11:02:08 AM12/11/12
to js...@googlegroups.com
Invalid System ID (User Name) .. CHeck you are providing correct system id in Binding parameters


From: Nagendra E Loli <nagen...@gmail.com>
To: js...@googlegroups.com
Sent: Tuesday, 11 December 2012 4:31 PM
Subject: Re: Any Help on this - Negative response 0000000f found

manoj prabhakar

unread,
Dec 11, 2012, 11:51:30 PM12/11/12
to js...@googlegroups.com
I think he is just testing it on his own system as the IP is default... For SMPP Client SMPP Server must be run which will handle the SMPP Client requests. You are a beginner so just testing the code to use it.
Please understand the SMPP protocol and SMSC platform first. It will better clear you your doubts.



From: Lanka <pushpal...@gmail.com>
To: js...@googlegroups.com
Sent: Tuesday, 11 December 2012 3:52 PM
Subject: Any Help on this - Negative response 0000000f found

Jabin Farhana

unread,
Jun 23, 2013, 6:38:26 AM6/23/13
to js...@googlegroups.com

Jabin Farhana

unread,
Jun 23, 2013, 6:39:14 AM6/23/13
to js...@googlegroups.com
Trying to connect smpp...
main DEBUG session.SMPPSession - Connect and bind to 192.168.51.5 port 6200
 main INFO  session.SMPPSession - Connected
 Thread-0 INFO  session.SMPPSession - Starting PDUReaderWorker with processor degree:3 ...
 pool-1-thread-1 DEBUG session.AbstractSessionContext - Activity notified
 pool-1-thread-1 DEBUG state.SMPPSessionOpen - Bind Response header (24, 80000009, 0000000f, 1)
 main DEBUG session.AbstractSession - bind response received
 main ERROR session.SMPPSession - Receive negative bind response
 org.jsmpp.extra.NegativeResponseException: Negative response 0000000f found
        at org.jsmpp.session.AbstractSession.validateResponse(AbstractSession.java:215)
        at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:271)
        at org.jsmpp.session.SMPPSession.sendBind(SMPPSession.java:294)
        at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:232)
        at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:200)
        at SimpleSubmitRegisteredExample.main(SimpleSubmitRegisteredExample.java:54)
Failed connect and bind to host-test5
java.io.IOException: Receive negative bind response: Negative response 0000000f found
        at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:246)
        at org.jsmpp.session.SMPPSession.connectAndBind(SMPPSession.java:200)
        at SimpleSubmitRegisteredExample.main(SimpleSubmitRegisteredExample.java:54)
Listener ok.......
Trying to send...
Thread-0 INFO  session.SMPPSession - PDUReaderWorker stop
 main ERROR session.AbstractSession - Failed sending submit_sm command
 java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:141)
        at org.jsmpp.DefaultPDUSender.writeAndFlush(DefaultPDUSender.java:419)
        at org.jsmpp.DefaultPDUSender.sendSubmitSm(DefaultPDUSender.java:203)
        at org.jsmpp.SynchronizedPDUSender.sendSubmitSm(SynchronizedPDUSender.java:192)
        at org.jsmpp.session.SubmitSmCommandTask.executeTask(SubmitSmCommandTask.java:86)
        at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:248)
        at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:320)
        at SimpleSubmitRegisteredExample.main(SimpleSubmitRegisteredExample.java:66)
IO error occur
java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:141)
        at org.jsmpp.DefaultPDUSender.writeAndFlush(DefaultPDUSender.java:419)
        at org.jsmpp.DefaultPDUSender.sendSubmitSm(DefaultPDUSender.java:203)
        at org.jsmpp.SynchronizedPDUSender.sendSubmitSm(SynchronizedPDUSender.java:192)
        at org.jsmpp.session.SubmitSmCommandTask.executeTask(SubmitSmCommandTask.java:86)
        at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:248)
        at org.jsmpp.session.SMPPSession.submitShortMessage(SMPPSession.java:320)
        at SimpleSubmitRegisteredExample.main(SimpleSubmitRegisteredExample.java:66)
 can you help me i cant bindrequest. 

On Tuesday, December 11, 2012 4:22:04 PM UTC+6, Lanka wrote:

Abdelmoula El Ousfour

unread,
Jun 23, 2013, 6:58:46 AM6/23/13
to js...@googlegroups.com, Jabin Farhana
Hi,

the error  0000000f means Invalid System ID, so check your Binding parameters, 

check also attached for full listing of Error Codes

Abdel


--
You received this message because you are subscribed to the Google Groups "jsmpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsmpp+un...@googlegroups.com.

To post to this group, send email to js...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsmpp.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Regards
Abdel
SMPP_Error Codes.pdf
Reply all
Reply to author
Forward
0 new messages