Menu

Problems with Knopflerfich-Axis

2008-02-15
2012-11-28
  • Yesica Diaz

    Yesica Diaz - 2008-02-15

    Hi,

    I am working at interoperability level between OSGi services and Web services. I use Knopflerfish framework because it has the Knopflerfish Axis port for providing SOAP/Web servicess access to nay OSGi bundle. There are some available examples at the URL: https://www.knopflerfish.org/svn/knopflerfish.org/trunk/osgi/bundles_opt/soap/readme.html

    However, I obtain errors in the first example (soapobject) . This example implements a server side SOAP object (I've simplified the example reduccing the methods number). The soapobject bundle install a service object into the service registry. Using the following URLs from a Web browser to explore the service: http://localhost:8080/axis/services

    But when I access to URL: http://localhost:8080/axis/services/remoteFW?method=getHelloWorld
    I obtain the following result:

    <soapenv:Envelope>
        <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Server.userException</faultcode>
            <faultstring>java.lang.NullPointerException</faultstring>
            <detail/>
        </soapenv:Fault>
        </soapenv:Body>
    </soapenv:Envelope>

    The soapobject, axis-osgi, and ksoap-osgi are installed and started. My knopflerfish framework version is 2.0.0.
    I can't understand these errors. Can somebody help me?  Has somebody any example of soap services installed in Knopflerfish?
    Does anybody know free software libraries for Axis for Knopflerfish?
    Thanks a lot.

    Best regards,
    Yesica Diaz.

     
    • Gunnar Ekolin

      Gunnar Ekolin - 2008-02-21

      I think you have encountered an XML-parsing problem.
      The default XML-parser included in the JVM you are using is not capable enough for way it is used by the Axis implementation.

      Which OS, JVM versions are you using?

      I tried with Knopflerfish 2.0.4 running on Apples JVM, 1.5.0_13-121, and MacOSX 10.4.11. This gave me the NullPointerException you are describing above.

      Then I downloaded xercesImpl.jar (version 2.9.1) and xml-apis.jar from
      http://xerces.apache.org/xerces2-j/index.html
      and installed them in the JVMs endorsed directory, $JAVA_HOME/lib/endorsed.

      When I restarted the framework it WORKS! I.e., Srufing in to
      http://localhost:8080/axis/services/remoteFW?method=getBundles
      resultedin in the follwoing output:


          <soapenv:Envelope>

          <soapenv:Body>

          <getBundlesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

          <getBundlesReturn xsi:type="soapenc:Array" soapenc:arrayType="xsd:long[24]">
      <item>5</item>
      <item>21</item>
      <item>4</item>
      <item>14</item>
      <item>11</item>
      <item>18</item>
      <item>8</item>
      <item>17</item>
      <item>9</item>
      <item>1</item>
      <item>15</item>
      <item>16</item>
      <item>22</item>
      <item>20</item>
      <item>19</item>
      <item>2</item>
      <item>13</item>
      <item>10</item>
      <item>12</item>
      <item>0</item>
      <item>6</item>
      <item>7</item>
      <item>23</item>
      <item>3</item>
      </getBundlesReturn>
      </getBundlesResponse>
      </soapenv:Body>
      </soapenv:Envelope>

       
    • Yesica Diaz

      Yesica Diaz - 2008-03-05

      Thank you. You are right.

       

Log in to post a comment.

MongoDB Logo MongoDB