Tester Toss - 2016-07-04

Hi, its me again.

I've discovered a service, S, which contains all the operations and events that I want to access.
I'd like to subscribe to an EventSource, and did httpbinding on my Android device. However, when i debug, i always get NPE error at line

subscription=jese.subscribe(el,0,bindings,CredentialInfo.EMPTY_CREDENTIAL_INFO)
        ClientSubscription subscription;
        EventSource jese = s.getAnyEventSource(q, "JobEndStateEvent");

        if(jese!=null){

            DataStructure bindings  = new org.ws4d.java.structures.ArrayList();

            HTTPBinding binding = new HTTPBinding(IPNetworkDetection.getInstance().getIPAddressOfAnyLocalInterface(phone_ip, false),22245,null,DPWSCommunicationManager.COMMUNICATION_MANAGER_ID);
            bindings.add(binding);

            try{
                subscription=jese.subscribe(el, 0, bindings, CredentialInfo.EMPTY_CREDENTIAL_INFO);
            }catch (IOException e){
                e.printStackTrace();
            }catch (CommunicationException ce){
                ce.printStackTrace();
            }catch(EventingException ee){ee.printStackTrace();}
        }

Log:

07-04 10:47:57.609 6415-6415/com.toshiba.bcreceiverz I/System.out: [DEBUG] [NEW EVENT SOURCE]: org.ws4d.java.service.DefaultEventSource [ name=JobEndStateEvent, portType={http://schemas.microsoft.com/windows/2006/08/wdp/print}PrinterServiceType, type=Notification, inputName=null, outputName=JobEndStateEvent, inputAction=null, outputAction=http://schemas.microsoft.com/windows/2006/08/wdp/print/JobEndStateEvent, input=null, output=Element [ name=JobEndStateEvent, namespace=http://schemas.microsoft.com/windows/2006/08/wdp/print, type={http://schemas.microsoft.com/windows/2006/08/wdp/print}JobEndStateEventType ] ]
07-04 10:47:57.609 6415-6415/com.toshiba.bcreceiverz I/Choreographer: Skipped 67 frames!  The application may be doing too much work on its main thread.
07-04 10:48:02.039 6415-6415/com.toshiba.bcreceiverz I/System.out: [DEBUG] <O-OutDispatcher> InvokeMessage [ header=SOAPHeader, messageId=urn:uuid:b98dcc40-4191-11e6-bf18-61a0328a10c4, relatesTo=null, replyTo=null, to=http://172.20.28.254:50082/, appSequence=null, referenceParameters=null ], inbound=false, content=PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}CreatePrintJobRequest, children=(PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}PrintTicket, children=(PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}JobDescription, children=(adeline.pdf, user123), min=0, max=1 ]), min=1, max=1 ], PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}JobDescription, children=(adeline.pdf, user123), min=0, max=1 ]), min=1, max=1 ] ]
07-04 10:48:02.039 6415-6449/com.toshiba.bcreceiverz I/System.out: [DEBUG] Send DPWS 2006 Message
07-04 10:48:02.049 6415-6446/com.toshiba.bcreceiverz I/System.out: [DEBUG] <O-TCP> From 172.20.28.200@53990 to 172.20.28.254@50082, TCP Connection [ id = 14 ]
07-04 10:48:02.049 6415-6446/com.toshiba.bcreceiverz I/System.out: [DEBUG] <O> HTTP request [ method=POST, version=HTTP/1.1, URI=/ ] to 172.20.28.254@50082, TCP Connection [ id = 14 ]
07-04 10:48:02.049 6415-6446/com.toshiba.bcreceiverz I/System.out: [DEBUG] <O> Communicate over :DPWS 2006, Action: Unknown Message, Id: urn:uuid:b98dcc40-4191-11e6-bf18-61a0328a10c4
07-04 10:48:02.059 6415-6455/com.toshiba.bcreceiverz I/System.out: [DEBUG] <I-TCP> Reading data, TCP Connection [ id = 14 ]
07-04 10:48:02.059 6415-6446/com.toshiba.bcreceiverz I/System.out: [DEBUG] <O-TCP> Sending data, TCP Connection [ id = 14 ]
07-04 10:48:02.129 6415-6455/com.toshiba.bcreceiverz I/System.out: [DEBUG] <I> HTTP response [ status=200, reason=OK ] from 172.20.28.200@53990, TCP Connection [ id = 14 ]
07-04 10:48:02.129 6415-6451/com.toshiba.bcreceiverz I/System.out: [DEBUG] <I> Incoming DPWS 2006 Message, Action: Unknown Message, Id: uuid:7e2f7380-41d6-11e6-9a55-0721fa9ffed0
07-04 10:48:02.129 6415-6451/com.toshiba.bcreceiverz I/System.out: [DEBUG] <I> Incoming SOAP message header: [ SOAPHeader, messageId=uuid:7e2f7380-41d6-11e6-9a55-0721fa9ffed0, relatesTo=urn:uuid:b98dcc40-4191-11e6-bf18-61a0328a10c4, replyTo=null, to=http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous, appSequence=null, referenceParameters=null ] ]
07-04 10:48:02.129 6415-6451/com.toshiba.bcreceiverz I/System.out: [DEBUG] <I> Message: InvokeMessage [ header=SOAPHeader, messageId=uuid:7e2f7380-41d6-11e6-9a55-0721fa9ffed0, relatesTo=urn:uuid:b98dcc40-4191-11e6-bf18-61a0328a10c4, replyTo=null, to=http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous, appSequence=null, referenceParameters=null ], inbound=true, content=PV [ name={http://schemas.microsoft.com/windows/2006/08/wdp/print}CreatePrintJobResponse, children=(60), min=1, max=1 ] ]
07-04 10:48:02.139 6415-6415/com.toshiba.bcreceiverz I/System.out: [DEBUG] IPAddress: Adding address change listener for address: 172.20.28.200 and binding: 172.20.28.200:-1
07-04 10:48:02.139 6415-6415/com.toshiba.bcreceiverz D/AndroidRuntime: Shutting down VM
07-04 10:48:02.139 6415-6415/com.toshiba.bcreceiverz W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4c845160)
07-04 10:48:02.139 6415-6415/com.toshiba.bcreceiverz E/AndroidRuntime: FATAL EXCEPTION: main
                                                                       Process: com.toshiba.bcreceiverz, PID: 6415
                                                                       java.lang.NullPointerException
                                                                           at org.ws4d.java.service.DefaultEventSource.subscribe(DefaultEventSource.java:309)
                                                                           at com.toshiba.bcreceiverz.activity.PrinterDetails.subscribe(PrinterDetails.java:423)
                                                                           at com.toshiba.bcreceiverz.activity.PrinterDetails$1.onClick(PrinterDetails.java:365)
                                                                           at android.view.View.performClick(View.java:4438)
                                                                           at android.view.View$PerformClick.run(View.java:18431)
                                                                           at android.os.Handler.handleCallback(Handler.java:733)
                                                                           at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                           at android.os.Looper.loop(Looper.java:149)
                                                                           at android.app.ActivityThread.main(ActivityThread.java:5045)
                                                                           at java.lang.reflect.Method.invokeNative(Native Method)
                                                                           at java.lang.reflect.Method.invoke(Method.java:515)
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
                                                                           at dalvik.system.NativeStart.main(Native Method)