2 Replies Latest reply on Nov 23, 2007 11:55 AM by renjit

    MTOM With JBOSSWS and WSCOMPILE

    greenbean

      I am attempting to use MTOM with JBossWS. We currently use WSCompile to generate the java objects from the wsdl/xsd. It generates a Base64Binary object to hold the binary attachment data. However, when I run a JBossWS client, I get the following exception. How do I fix this?

      java.rmi.RemoteException: Call invocation failed: Could not transmit message; nested exception is:
      javax.xml.soap.SOAPException: Could not transmit message
      at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:718)
      at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
      at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
      at $Proxy2.search(Unknown Source)
      at com.ngc.ident1.client.Client.main(Client.java:144)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.eclipse.ve.internal.java.vce.launcher.remotevm.JavaBeansLauncher.main(JavaBeansLauncher.java:79)
      Caused by: javax.xml.soap.SOAPException: Could not transmit message
      at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204)
      at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
      ... 9 more
      Caused by: javax.xml.rpc.JAXRPCException: java.lang.ClassCastException: com.test.Base64Binary
      at org.jboss.ws.soap.SOAPContentElement.write(SOAPContentElement.java:986)
      at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:171)
      at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
      at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
      at org.jboss.ws.soap.SAAJElementWriter.printInternal(SAAJElementWriter.java:163)
      at org.jboss.ws.soap.SAAJElementWriter.print(SAAJElementWriter.java:142)
      at org.jboss.ws.soap.SAAJElementWriter.printSOAPElement(SAAJElementWriter.java:91)
      at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:177)
      ... 10 more

        • 1. Re: MTOM With JBOSSWS and WSCOMPILE
          greenbean

          I changed my schema to type="xmlmime:base64Binary" from xmlmime:type="xmlmime:base64Binary" and got alittle farther. The jbossws client now sends the data to the jboss server. However, the server has this problem.

          We are using JBoss 4.0.5GA.

          Any ideas?

          java.rmi.RemoteException: Call invocation failed with code [Client] because of: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Failed to set value 'javax.activation.DataHandler@109b4cb' for property 'xxx' defined in com.xxx.xxx.xxx.xxx@3c938d on instance com.xxx.xxx.xxx.xxx@3c938d; nested exception is:
          javax.xml.rpc.soap.SOAPFaultException: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Failed to set value 'javax.activation.DataHandler@109b4cb' for property 'afrData' defined in com.ngc.ident1.sissiba.SearchData@3c938d on instance com.ngc.ident1.sissiba.SearchData@3c938d
          at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:713)
          at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
          at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
          at $Proxy2.search(Unknown Source)
          at com.ngc.ident1.client.Client.main(Client.java:146)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.eclipse.ve.internal.java.vce.launcher.remotevm.JavaBeansLauncher.main(JavaBeansLauncher.java:79)
          Caused by: javax.xml.rpc.soap.SOAPFaultException: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Failed to set value 'javax.activation.DataHandler@109b4cb' for property 'xxx' defined in com.xxx.xxx.xxx.xxx@3c938d on instance com.xxx.xxx.xxx.xxx@3c938d
          at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.getSOAPFaultException(SOAPFaultExceptionHelper.java:100)
          at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindResponseMessage(SOAPBindingProvider.java:486)
          at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:702)
          ... 9 more

          • 2. Re: MTOM With JBOSSWS and WSCOMPILE
            renjit

            I too have come out with the same exception,and unable to get anything regrding to the same.Please help me out in this.Iam throwing an user defined exception from the EndPoint along with Remote Exception.Is thta the problem??Please help me out.

            Thanks in advance