3 Replies Latest reply: Jul 28, 2006 9:14 AM by 442546 RSS

    CalendaringResponse method getCalendarReply()  returns a null object pt2

    476550
      Hello

      Thanks to dfiore for previous help but I'm still having problems.
      I created a service request for this in metalink but they referred me back to this forum for formal support.

      So I am using Version 09.00.04.02.43.2827 Collaberation Suite - calendar - standalone. and am using the code examples in a document called OCal9042-Cal-Applic-Dev-Guide.pdf.

      I set up my request and it looks like this.

      POST / HTTP/1.0
      Host: 127.0.0.1:9999
      Content-Type: text/xml; charset=utf-8
      Content-Length: 680
      SOAPAction: "http://www.oracle.com/WebServices/Calendaring/1.0/Search"

      <?xml version='1.0' encoding='UTF-8'?>
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Header>
      <auth:BasicAuth xmlns:auth="http://soap-authentication.org/2002/01/"><Name>**me**</Name><Password>********</Password></auth:BasicAuth>
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>
      <cwsl:Search xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/"><CmdId>WEEK_TO_VIEW</CmdId><vQuery><From>VEVENT</From><Where>DTEND >= '20060624T230000Z' AND DTSTART <= '20060701T225900Z'</Where></vQuery></cwsl:Search>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      I call

      response = cws.Search(search.getElement());
      log.debug("got response " + response.toString());
      log.debug ("response buffer= " + response.getReceiveBuffer());

      and get

      got response oracle.calendar.soap.client.CalendaringResponse@1c92535
      response buffer=

      Then I check the response for errors

      Vector bodyEntries = response.getBodyEntries();
      log.debug("fault? " + CalendarUtils.isSOAPFault(bodyEntries) );

      and get

      fault? false

      then I get my null poiter exception from

      Reply reply = (Reply)response.getCalendarReply()
      Vector someiCalendars = iCalendar.unmarshallVector(reply.getEntries());

      interestingly (or not) if I do the folowing

      Vector bodyEntries = response.getBodyEntries();
      log.debug("size "+ bodyEntries.size());
      log.debug("class is " +bodyEntries.firstElement().getClass());

      I get

      size 1
      class is class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl

      and if I then do

      DeferredElementNSImpl el = (DeferredElementNSImpl) bodyEntries.firstElement();
      log.debug("ns is " + el.getNamespaceURI());
      log.debug("nodename is " + el.getFirstChild().getNodeName());
      log.debug("value is " + el.getFirstChild().getNodeValue());
      log.debug("el is " + el.toString());

      I get

      ns is http://www.oracle.com/WebServices/Calendaring/1.0/ ( I get a 404 from this)
      nodename is #text
      value is
      el is [cwsl:Reply: null]

      Questions then are:

      Should I be getting classes com.sun.org.apache.xerces.internal.dom.DeferredElementNSImp?

      is there a namespace problem?

      I'm using the following oracle jars in eclipse with jdk 1.5. and have them at the
      front of the classpath: calendarlet.jar size 66344 and xmlparserv2.jar size 1834119. I'm also using apache soap and the following other jars in my project: activation.jar and mail.jar. These 5 jars seem to be the minimum to get the project working this far.

      A previous post mentioned:

      "To clarify the jars needed and where they can be found on the app. tier, here is a list of jars that should usually be in your classpath to get the Calendar WS working properly:

      ${ORACLE_HOME}/j2ee/home/lib/*
      ${ORACLE_HOME}/ocal/jlib/ocal_clnt.jar
      ${ORACLE_HOME}/soap/lib/soap.jar
      ${ORACLE_HOME}/lib/xmlparserv2.jar

      "
      our standalone server does not have any of the above
      apart from ${ORACLE_HOME}/lib/xmlparserv2.jar and i am not using this version as it creates a soap fault as a request that looks like the following is created.


      POST / HTTP/1.0

      Host: 127.0.0.1:9999

      Content-Type: text/xml; charset=utf-8

      Content-Length: 720

      SOAPAction: "http://www.oracle.com/WebServices/Calendaring/1.0/Search"



      <?xml version='1.0' encoding='UTF-8'?>

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Header>
      <auth:BasicAuth xmlns:auth="http://soap-authentication.org/2002/01/"><Name xmlns:="">**me***</Name><Password xmlns:="">*******</Password></auth:BasicAuth>
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>
      <cwsl:Search xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/"><CmdId xmlns:="">WEEK_TO_VIEW</CmdId><vQuery xmlns:=""><From>VEVENT</From><Where>DTEND &gt;= '20060624T230000Z' AND DTSTART &lt;= '20060701T225900Z'</Where></vQuery></cwsl:Search>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      there are odd namespace things happening with the username and password elements. Interestingly or not here,

      Vector bodyEntries = response.getBodyEntries();
      log.debug("size "+ bodyEntries.size());
      log.debug("class is " +bodyEntries.firstElement().getClass());

      I get

      size 1
      class is class oracle.xml.parser.v2.XMLElement

      and if I then do

      XMLElement el = (XMLElement) bodyEntries.firstElement();
      log.debug("ns is " + el.getNamespaceURI());
      log.debug("nodename is " + el.getFirstChild().getNodeName());
      log.debug("value is " + el.getFirstChild().getNodeValue());
      log.debug("el is " + el.toString());

      I get

      ns is http://schemas.xmlsoap.org/soap/envelope/
      nodename is #text
      value is
      el is oracle.xml.parser.v2.XMLElement@480457.

      So I'm not entirely sure what jars and versions my project should include and they don't seem to be on our server anyway. Where would I get these from?


      Many thanks for any help

      Nomit
        • 1. Re: CalendaringResponse method getCalendarReply()  returns a null object pt2
          442546
          If I understand correctly you looked on the machine where OCAS is installed and the libs I have specified are not available.


          I think the libs specified would have been available if a stand alone calendar server (OCAL) was also installed with the standalone calendar web client (OCAS Version 09.00.04.02.43) . I am not sure if installing the stand alone Calendar server on an other machine to retrieve this jar is an option.

          I am not sure what version of the calendar server you are using but try to see if you can get a hold of the location of the calendar server and retrieve ocal_clnt.jar if it is available. If the installation is too old , this lib will not be available.

          You can find the calendar server domain by going to :
          http://{OCAS-DOMAIN}:{port #}/ocas-bin/ocas.fcgi?sub=sys&sys=stats and look for Calendar Server Host .

          For the rest of the libs. I am not sure which dev. platform you are using but if you are using Oracle's JDeveloper then all these libs are available in the following location:

          {JDEV-PATH}/webservices/lib/soap.jar
          {JDEV-PATH}/}/j2ee/home/lib/*
          {JDEV-PATH}/lib/xmlparserv2.

          If you can not obtain any of these libs let me know and I'll see if I am allowed to send them to you.


          Thank you
          • 2. Re: CalendaringResponse method getCalendarReply() returns a null object pt2
            476550
            hi thnaks for the reply
            If I understand correctly you looked on the machine where OCAS is installed >and the libs I have specified are not available.
            yep
            I think the libs specified would have been available if a stand alone calendar >server (OCAL) was also installed with the standalone calendar web client >(OCAS Version 09.00.04.02.43) . I am not sure if installing the stand alone >Calendar server on an other machine to retrieve this jar is an option.
            I'll investigate this - thanks
            I am not sure what version of the calendar server you are using but try to >see if you can get a hold of the location of the calendar server and retrieve >ocal_clnt.jar if it is available. If the installation is too old , this lib will not be >available.
            You can find the calendar server domain by going to :
            http://{OCAS-DOMAIN}:{port #}/ocas-bin/ocas.fcgi?sub=sys&sys=stats and >look for Calendar Server Host .
            I don't hink it is available but will check once more
            For the rest of the libs. I am not sure which dev. platform you are using but if >you are using Oracle's JDeveloper then all these libs are available in the >following location:
            I am using eclipse.
            {JDEV-PATH}/webservices/lib/soap.jar
            {JDEV-PATH}/}/j2ee/home/lib/*
            what specific jars are needed here? That would be useful to know.
            {JDEV-PATH}/lib/xmlparserv2.
            If you can not obtain any of these libs let me know and I'll see if I am allowed to send them to you.
            I'll see if anyone is using Jdeveloper and let you know thanks.
            • 3. Re: CalendaringResponse method getCalendarReply() returns a null object pt2
              442546
              You can download the j2ee jdk package from sun and it should contain all the jars needed in the specified j2ee.
              If I am not mistaken the jars needed in j2ee are:
              mail.jar, http_client.jar & activation.jar
              but adding them all is preferable.
              Also, as an Oracle customer is shouldn't be a problem for you to get JDeveloper. If you prefer using eclipse, that's fine. At least you can extract the libs you need.