in
Creating Smarter Networks

How to read data logs from Java ?

Last post 08-12-2009 9:06 AM by troggendorf. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-19-2009 11:14 PM

    • lokendar
    • Top 75 Contributor
    • Joined on 07-20-2009
    • Posts 2
    • Points 25

    How to read data logs from Java ?

    Hi, i am new to iLON world.. I can access data logs from C#. But unable to do so from Java. Are there any examples which i can refer for reading iLon smart server datapoints from java.

    I have used wsimport with the ilon wsdl file. It generated a bunch of class files. I'm stuck on which class file to start with .... can someone help..

     

    My code:

           

    public static void main(String[ args) throws MalformedURLException {

           URL wsdlLocation = new URL("http://1.2.2.2/iLON100.WSDL");
            QName serviceName = new QName("http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/wsdl/","iLON100");  
           
            ILON100 services = new ILON100();
            ILON100.create(wsdlLocation, serviceName);
       
            ILON100PortType ports = services.getILON100HttpPort();

            ItemColl icoll = new ItemColl();
           
            icoll.getItem().add(0,new Item());
            icoll.getItem().get(0).setUCPTname("XXX/YYYY/Node/datapoint");       

            ItemDataColl idc = ports.read(icoll);

            String s = idc.getItem().get(0).getUCPTdescription();

    }

     

    On executing, i am getting this error :

    Exception in thread "main" com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 404: Not Found

    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:203)

    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:179)

    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:94)

    at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:116)

    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)

    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)

    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)

    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)

    at com.sun.xml.ws.client.Stub.process(Stub.java:222)

    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)

    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)

    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)

    at $Proxy36.read(Unknown Source)

    at com.ilonservice.main(ilonservice.java:50)

     thanks...

    loki

    Filed under: , ,
    • Post Points: 20
  • 08-12-2009 9:06 AM In reply to

    Re: How to read data logs from Java ?

     Which framework are you using? I'd recommend spring.

    • Post Points: 5
Page 1 of 1 (2 items)
©2008 Echelon Corporation