3 Replies Latest reply on Sep 22, 2005 7:12 PM by thomas.diesler

    SOAPConnection Problem

    jonathan.martin

      I curently have a problem using a SOAPConnection inside a STRUTS Action class.

      I set up the connection in the usual way:

      SOAPConnectionFactory.getConnectionFactory();
      soapConnectionFactory.createConnection();

      And use the standard method:

      connection.call(SOAPMessage,URL)

      I have a debug statement before and after the connection call in which both lines are printed and no exceptions are thrown or caught during the entire process, but the message is never sent from the Action class.

      Does any 1 know of any problems using web sevices inside a struts environment like this ? I initially thought it may be a class loader issue, but so far have not been able to track a solution down.

      Any thoughts would be appreciated.

      Cheers

      JonnyEmm

        • 1. Re: SOAPConnection Problem
          jonathan.martin

          Im sure this is turning into a silly question, but here goes.

          I took a step back and have written a servlet outside the world of struts which when called calls:

          SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
          SOAPConnection connection = soapConnectionFactory.createConnection();
          connection.call(messageFactory.createMessage(),new URL("http://<a different server>:8080/soapservice/listener"));
          connection.close();


          This now produces the error message:
          Failed to create SOAPConnectionFactory: org.jboss.webservice.soap.SOAPConnectionFactoryImpl


          I'm not really sure why this is happening, especially when the same code works inside an EJB.

          Im presuming now that this same exception is being thrown inside my Action class but is being caught/wrapped by the strutts environment and isn't rethrown to the caller/client.

          Any suggestions would be appreciated as I dont really want to seperate this piece of client code into a seperate EJB as it isnt quite logical.

          Cheers,

          JonnyEmm

          • 2. Re: SOAPConnection Problem
            jonathan.martin

            OK,
            The previous problem seems to be my fault, beleive it or not :-) I had forgot to tell my ide not to package the dependant jars into the web-app and therefore had loads of unwelcome stuff in my lib directory.

            Now I seem to be getting the original problem, I cannot make a call from the connection object, and I cant get it to throw an exception. It doesnt matter what the value in the URL object is it always continues through till it thinks it has completed succesfully. When in fact the URL value I have never existed ?

            Again any comments would be useful.

            Cheers,

            JonnyEmm.

            • 3. Re: SOAPConnection Problem
              thomas.diesler

              Jonny,

              you could create a JIRA issue and attach your sample application to it.

              Also, have a look at org.jboss.axis and org.jboss.webservice debug in the logfile