3 Replies Latest reply on Oct 28, 2002 5:32 AM by gernot

    AXIS attachments & JBoss-Net

    Carles Pairot Newbie

      Hi everybody,

      I have tried to execute the AXIS attachments 'echo' example under JBoss 3.2 and it seems it works fine, at least with TCPMon I can see that the serialization of the file is OK, and that the data returned from the server to the client is also OK. The problem seems to be when the client tries to deserialize the server's response. The error is the following:

      nested exception is: org.xml.sax.SAXException: The element ":allCommands" is an attachment with sub elements which is not supported.

      AxisFault
      faultCode: {http://xml.apache.org/axis/}Server.userException
      faultString: org.xml.sax.SAXException: The element ":allCommands" is an attachment with sub elements which is not supported.
      faultActor: null
      faultDetail:
      stackTrace: org.xml.sax.SAXException: The element ":allCommands" is an attachment with sub elements which is not supported.
      at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.onStartChild(JAFDataHandlerDeserializer.java:124)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
      at org.apache.axis.client.Call.invoke(Call.java:1871)
      at org.apache.axis.client.Call.invoke(Call.java:1777)
      at org.apache.axis.client.Call.invoke(Call.java:1315)
      at botule.client.test.ToxicSessionSoapTests.testUploadFile(ToxicSessionSoapTests.java:112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      The response sent by the server is this:

      HTTP/1.1 200 OK

      Date: Fri, 25 Oct 2002 09:20:39 GMT

      Server: Jetty/4.1.0RC6 (Windows 2000 5.0 x86)

      Servlet-Engine: Jetty/4.1.0RC6 (Servlet 2.3; JSP 1.2; java 1.4.0_01)

      Set-Cookie: jsessionid=3pad2hcw3x6tx;Path=/jboss-net

      Set-Cookie2: jsessionid=3pad2hcw3x6tx;Version=1;Path=/jboss-net;Discard

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



      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <echoResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <echoReturn xsi:type="ns1:DataHandler" xmlns:ns1="urn:botule">
      <allCommands xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType[3]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">




      <content xsi:type="xsd:string">file contents
      <contentType xsi:type="xsd:string">text/plain


      <name xsi:type="xsd:string">C:\Documents and Settings\pairot\Local Settings\Temp\Axis47494axis
      <outputStream xsi:nil="true"/>
      <preferredCommands xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType[3]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">




      <transferDataFlavors xsi:type="soapenc:Array" soapenc:arrayType="xsd:anyType[1]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">




      <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.CommandInfo@a3ce3f
      <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.CommandInfo@39b99d
      <multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.CommandInfo@5d925b
      <multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.CommandInfo@33aa9b
      <multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">org.apache.axis.attachments.ManagedMemoryDataSource$Instream@930c3a
      <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.CommandInfo@7cc9c9
      <multiRef id="id5" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.CommandInfo@7c615
      <multiRef id="id8" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">javax.activation.ActivationDataFlavor[mimetype=text/plain;representationclass=java.io.InputStream;charset=Cp1252]
      <multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:anyType" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">org.apache.axis.attachments.ManagedMemoryDataSource@74f160
      </soapenv:Body>
      </soapenv:Envelope>

      Does anybody know what is going on?

      Thanks in advance

      --

      Carles

        • 1. Re: AXIS attachments & JBoss-Net
          gernot Newbie

          Have you included mail.jar in the classpath of your client? axis needs this jar to work proper with attachments.

          c.u.
          gernot

          • 2. Re: AXIS attachments & JBoss-Net
            Carles Pairot Newbie

            Hi,

            I have updated my mail.jar as you told me, but the error in the client is the same :'-(

            I have also noticed that when the file is sent to the server, the server stores it in my temporary directory under a name such as "Axis57196axis", and after it has been stored, if I check it out, its size is the right one and the contents are the same as the client's file, but then JBoss starts to do something like this, and it is VEEERY slow (until the end of the file):

            09:27:42,735 DEBUG [ManagedMemoryDataSource$Instream] reading 8192 bytes from disk
            09:27:42,735 DEBUG [ManagedMemoryDataSource$Instream] flushing
            09:27:42,735 DEBUG [ManagedMemoryDataSource$Instream] len=8192
            09:27:42,735 DEBUG [ManagedMemoryDataSource$Instream] off=0
            09:27:42,735 DEBUG [ManagedMemoryDataSource$Instream] b.length=8192
            09:27:42,735 DEBUG [ManagedMemoryDataSource$Instream] 13788498read 8192 bytes
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] available() = 5731920.
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] 13788498 read(0, 8192)
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] len = 8192
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] reading 8192 bytes from disk
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] flushing
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] len=8192
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] off=0
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] b.length=8192
            09:27:43,360 DEBUG [ManagedMemoryDataSource$Instream] 13788498read 8192 bytes
            09:27:44,016 DEBUG [ManagedMemoryDataSource$Instream] available() = 5723728.
            09:27:44,016 DEBUG [ManagedMemoryDataSource$Instream] 13788498 read(0, 8192)
            09:27:44,016 DEBUG [ManagedMemoryDataSource$Instream] len = 8192

            ...

            It seems as if it read the file again... Does anybody know why? Is there any way of turning off all these DEBUG messages in JBoss.Net?

            Thanks!

            --

            Carles.

            • 3. Re: AXIS attachments & JBoss-Net
              gernot Newbie

              You can set the log level in server/xxx/conf/log4.xml
              by setting
              to

              for the FILE or CONSOLE but this is a global setting so you want get any DEBUG messeages from jboss,...

              c.u.
              gernot