5 Replies Latest reply on Jul 26, 2011 3:28 PM by Srinivas Jonnalagadda

    Exception while running with JBoss CXF - WrapperClassoutInterceptor

    Srinivas Jonnalagadda Newbie

      Hi,

       

      When i invole a webservice to an external provider i am getting the following exception. When i remove the JBOSS 6.0 Runtime from my call path and use just JDK 1.6.24 the webservice invocation is succesful and i get the result. Weird thing is that one method of the webservice get this exception. Any help in solving the problem is hignhly appreciated.

       

       

       

      Invoking faxQuery...

      javax.xml.ws.soap.SOAPFaultException: Fault string, and possibly fault code, not set

      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)

      at $Proxy36.faxQuery(Unknown Source)

      Caused by: java.lang.NullPointerException

      at cc.interfax.FaxQuery_WrapperTypeHelper1.createWrapperObject(Unknown Source)

      at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)

      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)

      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)

      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)

      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

      ... 3 more

        • 1. Re: Exception while running with JBoss CXF - WrapperClassoutInterceptor
          Jim Ma Apprentice

          Looks like it's an issue in asm generated  class FaxQuery_WrapperTypeHelper1. Can you attach your source code that can help reproduce this issue ?

          • 2. Re: Exception while running with JBoss CXF - WrapperClassoutInterceptor
            Srinivas Jonnalagadda Newbie

            Hi Jim,

             

            I removed the asm.jar from the run time but no luck, got the same exception. Below is the sourde code and the WSDL URL is as

             

            http://ws.interfax.net/dfs.asmx?wsdl

             

            Thanks in advance

            Srinivas Jonnalagadda

             

                                    

            iFaxURL = new URL(jediProp.getProperty("INTERFAX.WSDLURL"));

              queueName = jediProp.getProperty("INTERFAX.QUEUENAME");

              SERVICE_NAME = new QName(queueName, "InterFax");

              ifs = new InterFax(iFaxURL,SERVICE_NAME); 

              port = ifs.getInterFaxSoap(); 

              ifsUser = jediProp.getProperty("INTERFAX.USERNAME");

              ifsPass = jediProp.getProperty("INTERFAX.PASSWORD");

              prefix = jediProp.getProperty("INTERFAX.PREFIX");

             

             

                                          

            Integer faxQuery_resultCodeVal =

            null;

            Holder<Integer> faxQuery_resultCode =

            new Holder<Integer>(faxQuery_resultCodeVal);

            Holder<ArrayOfFaxItemEx> faxQueryResult =

            newHolder<ArrayOfFaxItemEx>();

             

            port.faxQuery(ifsUser, ifsPass, "IN" , faxIDs, -1, faxQuery_resultCode, faxQueryResult);

             

            // port.faxStatus(username, password, lastTransactionID, maxItems, totalCount, listSize, resultCode, faxStatusResult)

            System.

            out.println("faxQuery._faxQuery_resultCode=" + faxQuery_resultCode.value

            );

            System.

            out.println("faxQuery._faxQuery_faxQueryResult=" + faxQueryResult.value

            );

             

            BTW this is the way i am assigning the port

                          

            iFaxURL = new URL(jediProp.getProperty("INTERFAX.WSDLURL"));

              queueName = jediProp.getProperty("INTERFAX.QUEUENAME");

              SERVICE_NAME = new QName(queueName, "InterFax");

              ifs = new InterFax(iFaxURL,SERVICE_NAME); 

              port = ifs.getInterFaxSoap(); 

              ifsUser = jediProp.getProperty("INTERFAX.USERNAME");

              ifsPass = jediProp.getProperty("INTERFAX.PASSWORD");

              prefix = jediProp.getProperty("INTERFAX.PREFIX");

             

             

            2011-07-25 11:15:02,444 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (pool-13-thread-8) Creating Service {http://www.interfax.cc}InterFax from WSDL: http://ws.interfax.net/dfs.asmx?wsdl
            2011-07-25 11:15:02,428 WARN  [org.apache.cxf.phase.PhaseInterceptorChain] (pool-13-thread-1) Interceptor for {http://www.interfax.cc}InterFax#{http://www.interfax.cc}FaxQuery has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault
            at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:121) [:2.3.1]
            at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1]
            at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) [:2.3.1]
            at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) [:2.3.1]
            at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) [:2.3.1]
            at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) [:2.3.1]
            at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) [:2.3.1] 

            • 3. Re: Exception while running with JBoss CXF - WrapperClassoutInterceptor
              Jim Ma Apprentice

              Which tool did you use to generate service(InterFax) and interface class(port = ifs.getInterFaxSoap) ?  There is soap encoding  type in your wsdl (line 717) , which is not supported by jaxws implementation/CXF.  Here is the error message I  tired to generate code with cxf wsdl2java :

              ./wsdl2java -keep http://ws.interfax.net/dfs.asmx?wsdl

              WSDLToJava Error: Thrown by JAXB: undefined simple or complex type 'soapenc:Array' at line 717 column 11 of schema http://ws.interfax.net/dfs.asmx?wsdl

              • 4. Re: Exception while running with JBoss CXF - WrapperClassoutInterceptor
                Srinivas Jonnalagadda Newbie

                Hi Jim,

                 

                I used Apache CXF 3.3.1 wsdltojava command line tool. When i tried i got the same error.  I removed the complex type specified in the error which is a StringArray. This is not being used by the queryfax function which i wanted to use. So once i removed the complex type my client generation was successful. Then my sendfax function call was successful without any issue. Probably because it has ony primitive datatypes.

                 

                Also can u suggest a tool to generate without changing the WSDL and we want to use it in the JBOSS environment.

                 

                Regards,

                srinivas jonnalagadda

                • 5. Re: Exception while running with JBoss CXF - WrapperClassoutInterceptor
                  Srinivas Jonnalagadda Newbie

                  Hi Jim,

                   

                  Figured out the solution. The issue was with the 'soapenc:Array' deletion. I used apache axis 1.X runtime to generate the  Client using the original WSDL from the Interfax. When i added the JBOSS runtime also it worked fine. The issue was with the deletion and the JBOSS was unable to find the wrapper object and bumped out.

                   

                  If you have any other solution than this please let me know.

                   

                  Sincerely,

                  Srinivas Jonnalagadda