5 Replies Latest reply: Aug 2, 2013 3:46 AM by rcx4009v2 RSS

    Load-On-Demand Network Analysis for .NET Implementation




      Does anyone have sources, samples and/or tutorials with implementation of Load On Demand for Network Data Model in a .NET environment?

      Or are there ways on how will I be able to use Load On Demand APIs for my ASP.Net Application?

      I've been searching the web for sometime but still no luck finding how I will be able to use this for .NET


      Thank you

        • 1. Re: Load-On-Demand Network Analysis for .NET Implementation
          Jack Wang-Oracle

          To use NDM LOD API in a .NET environment, you could do the following:


          - Design your analysis XML API (XML request and response) and deploy the analysis as a web service

            Your .NET client will generate an XML request and send it to the the analysis service.

            Your .NET client will also receive the XML response from the analysis service.


          Other alternatives include:

          - Create the analysis functions as Java functions and expose these functions as operations of SOAP web  services (with JAX-WS).

            The WSDL of this Web Service could be used to generate the .Net client class using the WSDL .Net tool

          - Or you can  create some PL/SQL analysis wrapper functions (Java stored procedures using NDM LOD API) and call these PL/SQL functions from the .NET application.

          • 2. Re: Load-On-Demand Network Analysis for .NET Implementation



            Thanks for the reply.


            I ran into another problem. So I decided to implement this as a Java Web Service.

            I first tried my codes in executable JAR and it is working perfectly. Then I tried to transfer my codes to Java Web Service and I was able to Build and Deploy the service. But when I am trying to invoke my function, I am getting an error:

            Service invocation threw an exception with message : null; Refer to the server log for more details

            Exceptions details : java.lang.IllegalArgumentException



            this is the output I get when I try to test my Web Service:


            shortestPath  Method invocation

            Method parameter(s)


            Method returned

            java.util.List : "[36, 39, 551, 554, 782, 562, 561, 563, 564, 565, 1126, 783, 549, 547, 548, 550, 560, 740, 738, 742, 743, 737, 736, 716, 714, 715, 733, 734, 735, 713, 712, 521, 519, 520, 711, 710, 518, 517, 708, 707, 705, 704, 706, 703, 702, 340, 338, 339, 857, 855, 853, 850, 731, 730, 351, 348, 349, 113, 107, 106, 108, 371]"

            SOAP Request

            Service invocation threw an exception with message : null; Refer to the server log for more details


            Exceptions details : java.lang.IllegalArgumentException

            javax.servlet.ServletException: java.lang.IllegalArgumentException at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:330) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:106) at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.IllegalArgumentException at oracle.xml.jaxp.JXTransformer.setOutputProperty(JXTransformer.java:793) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.dumpMessage(WebServiceTesterServlet.java:360) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:312) ... 28 more


            This is what's in my server log:

            [#|2013-07-24T19:31:24.351+0800|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=34;_ThreadName=Thread-2;|AAAA_NETWORK was successfully deployed in 936 milliseconds.|#]

            [#|2013-07-24T19:31:42.138+0800|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=105;_ThreadName=Thread-2;|parsing WSDL...


            Generating code...

            Compiling code...

            [#|2013-07-24T19:31:42.460+0800|INFO|glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices.monitoring|_ThreadID=105;_ThreadName=Thread-2;|Invoking wsimport with http://localhost:8080/AAAA_NETWORK/AAAA_NETWORK?WSDL|#]

            [#|2013-07-24T19:31:42.461+0800|INFO|glassfish3.1.2|javax.enterprise.webservices.org.glassfish.webservices.monitoring|_ThreadID=105;_ThreadName=Thread-2;|wsimport successful|#]



            Clearly, the method was able to get the node ids and return it as an array. My problem is why is it throwing an IllegalArgumentException?

            • 3. Re: Load-On-Demand Network Analysis for .NET Implementation



              So I found the culprit on of the error.

              The error occurs when the xmlparserv2.jar is included in my Library references for my Web Service. The problem is I can't use LODNetworkManager methods without the xmlparserv2.jar. Without the xmlparserv2.jar in my libraries I am having java.lang.reflect.InvocationTargetException instead. Even a simple Hello World method won't invoke if xmlparserv2.jar is included in the library.


              Someone please enlighten me on this.

              • 4. Re: Load-On-Demand Network Analysis for .NET Implementation


                As far as I understand you are exposing some NDM LOD API functions through your own Web Service, Am I right?

                If so, what are you using for generating your Web Services  (JAX-RPC, Axis, JAX-WS)?

                Additionally to the stack trace you receive in the client side, are there any other errors in the server side (maybe in another log file)?

                It would be helpful if you could provide the WSDL of your web service along with the SOAP of a request and response.

                • 5. Re: Load-On-Demand Network Analysis for .NET Implementation



                  So I was able to resolve my problem. The problem is the Web Server that I am using. The error was encountered when I deployed my Web Service to GlassFish Server or Apache Tomcat.

                  To resolve this I deployed my NDM Load on Demand Java  Web Service to Oracle Web Logic Server.