Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-522

SOAP UnMarshaller should provide better debug messages on HTTP errors

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Minor Minor
    • jbossws-1.0RC2
    • None
    • jbossws-native
    • None

      This is a minor issue. But it is important for debugging return messages from remote servers.

      When a dynamic proxy makes an invocation and the server returns http/404. SOAP unmarshaller ( even under trace logging) just exits with the following message:

      ======================================================================================
      [junit] 21:36:26,421 ERROR [SOAPMessageUnMarshaller] Cannot unmarshall SOAPMessage
      [junit] javax.xml.soap.SOAPException: Unsupported content typetext/html; charset=utf-8
      [junit] at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:177)
      [junit] at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:52)
      [junit] at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:121)
      [junit] at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:56)
      [junit] at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:112)
      [junit] at org.jboss.remoting.Client.invoke(Client.java:244)
      [junit] at org.jboss.remoting.Client.invoke(Client.java:207)
      [junit] at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:125)
      [junit] at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:640)
      [junit] at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:399)
      [junit] at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:115)
      ======================================================================================

      The developer from the error message can figure out that there is a http/error message sent back from the server. But
      the developer has no way of knowing what the message is, unless we provide better trace or developer uses ethereal or like.

      Infact, turning on the RequestDumperValve on the serverside gave me the following:
      ====================================================================
      21:36:24,562 INFO [ClientDeployer] Client ENC bound under: jbossws-client
      21:36:26,359 INFO [[localhost]] REQUEST URI =/jbossws-bookService
      21:36:26,359 INFO [[localhost]] authType=null
      21:36:26,359 INFO [[localhost]] characterEncoding=null
      21:36:26,359 INFO [[localhost]] contentLength=352
      21:36:26,359 INFO [[localhost]] contentType=text/xml
      21:36:26,359 INFO [[localhost]] contextPath=
      21:36:26,359 INFO [[localhost]] header=soapaction=""
      21:36:26,359 INFO [[localhost]] header=content-type=text/xml
      21:36:26,359 INFO [[localhost]] header=user-agent=Java/1.5.0_04
      21:36:26,359 INFO [[localhost]] header=host=localhost:8080
      21:36:26,359 INFO [[localhost]] header=accept=text/html, image/gif,image/jpeg, ; q=.2, */; q=.2
      21:36:26,359 INFO [[localhost]] header=connection=keep-alive
      21:36:26,359 INFO [[localhost]] header=content-length=352
      21:36:26,359 INFO [[localhost]] locale=en_US
      21:36:26,359 INFO [[localhost]] method=POST
      21:36:26,359 INFO [[localhost]] pathInfo=null
      21:36:26,359 INFO [[localhost]] protocol=HTTP/1.1
      21:36:26,359 INFO [[localhost]] queryString=null
      21:36:26,359 INFO [[localhost]] remoteAddr=127.0.0.1
      21:36:26,359 INFO [[localhost]] remoteHost=127.0.0.1
      21:36:26,359 INFO [[localhost]] remoteUser=null
      21:36:26,359 INFO [[localhost]] requestedSessionId=null
      21:36:26,359 INFO [[localhost]] scheme=http
      21:36:26,359 INFO [[localhost]] serverName=localhost
      21:36:26,359 INFO [[localhost]] serverPort=8080
      21:36:26,359 INFO [[localhost]] servletPath=/jbossws-bookService
      21:36:26,359 INFO [[localhost]] isSecure=false
      21:36:26,359 INFO [[localhost]] ---------------------------------------------------------------
      21:36:26,375 INFO [[localhost]] ---------------------------------------------------------------
      21:36:26,375 INFO [[localhost]] authType=null
      21:36:26,375 INFO [[localhost]] contentLength=-1
      21:36:26,375 INFO [[localhost]] contentType=text/html;charset=utf-8
      21:36:26,375 INFO [[localhost]] header=X-Powered-By=Servlet 2.4; JBoss-5.0.0alpha (build: CVSTag=HEAD date=200511171225)/Tomcat-5.5
      21:36:26,375 INFO [[localhost]] message=/jbossws-bookService
      21:36:26,375 INFO [[localhost]] remoteUser=null
      21:36:26,375 INFO [[localhost]] status=404
      21:36:26,375 INFO [[localhost]] ===============================================

      So it is indeed a HTTP/404. But from the client side, I have no way of knowing this....

      Sorry for the long report. Please check this behavior and resolve if found suitable.

            tdiesler@redhat.com Thomas Diesler
            anil.saldhana Anil Saldanha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: