10 Replies Latest reply: May 29, 2008 8:01 AM by 666705 RSS

    Weblogic SAAJ implementation and version problem

    666705
      I have a problem with Weblogic 9.0 using its own implementation over the one i provide.
                
                I have tried putting the saaj-api.jar and saaj-impl.jar in my domains lib/ catalog as well as the domains config/lib/ catalog.
                I also tried PRE_CLASSPATH in setDomainEnv.cmd but it seems the weblogic implementation is being used anyway!
                
                Any ideas how to solve this?
                
                Here are a couple of exceptions i get after a context lookup and getConnection of the resource adapter:
                
                
                ....
                Caused by: javax.xml.soap.SOAPException: Unable to create SOAP connection factory: com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory
                     at javax.xml.soap.SOAPConnectionFactory.newInstance(Unknown Source)
                ....
                
                          I also tried adding a property value:
                
                System.setProperty("javax.xml.soap.SOAPConnectionFactory", "com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory");
                
                in the web app before doing the context lookup, and then i get this exception:
                
                
                java.lang.UnsupportedOperationException: This class does not support SAAJ 1.1
                at weblogic.webservice.core.soap.SOAPElementImpl.getElementsByTagNameNS(SOAPElementImpl.java:527)
                .....
                
        • 1. Re: Weblogic SAAJ implementation and version problem
          666705
          This works for me in WL 9.1:
                    
                    System.setProperty("javax.xml.soap.SOAPConnectionFactory",
                    "weblogic.wsee.saaj.SOAPConnectionFactoryImpl");
          • 2. Re: Weblogic SAAJ implementation and version problem
            666705
            Hi,
                      
                      Please follow the below steps to resolve "UnsupportedOperationException: This class does not support SAAJ 1.1" issue.
                      
                      1. Set classpath to latest saaj-impl.jar in startweblogic.cmd
                      2. Set the below 2 system properties in code.
                      System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
                      System.setProperty("javax.xml.soap.SOAPConnectionFactory","weblogic.wsee.saaj.SOAPConnectionFactoryImpl");
                      
                      It works for me in weblogic9.2. Let me know if you still face any problem related to "UnsupportedOperationException: SAAJ1.1"
                      
                      Thanks,
                      Mani
            • 3. Re: Weblogic SAAJ implementation and version problem
              666705
              Hi Krishnan,
                        
                        I came across the same issue. I followed the steps you posted here, but still get the same exception in WLS 9.2.
                        
                        At the moment, I have jax-rpc handlers to intercept the SOAP messages, and use SAAJ to manipulate the SOAP elements. Basically, most of the methods from org.w3c.dom.Node and org.w3c.dom.Element, which are implemented in SOAPElementImpl, throw the exception. Even though I set javax.xml.soap.MessageFactory and javax.xml.soap.SOAPFactory to the latest version of saaj-*.jar, they are still bypassed by WLS's own implementation.
                        
                        Any idea why it happens?
                        
                        PS: By reading the document, WLS 9.x seems to support SAAJ 1.2. I actually need SAAJ 1.3 since it supports SOAP 1.2. The latest saaj-*.jar supports SOAP 1.2. I wonder if that actually causes the exception to be thrown?
              • 4. Re: Weblogic SAAJ implementation and version problem
                666705
                Hi Krishnan , I followed all steps what you told in this forum , regarding the "This class does not support SAAJ 1.1" error.
                          
                          But still I am getting same error.
                          
                          I am using weblogic 9.2
                          
                          I create a helloworld class.
                          I create a constructor and added the System.setProperty in that.
                          
                          and also added the saaj-Impl.jar file in the classpath.
                          In fact I added that in the setDomainEnv since this is called in startWeblogic.cmd
                          
                          Please flash some light on this.
                          
                          Thanks
                          viswanadh
                • 5. Re: Weblogic SAAJ implementation and version problem
                  666705
                  hi, vkviswanadh,
                            
                            Have you got this issue resolved? I have exactly same problem.
                            
                            Thanks,
                            Suping
                  • 6. Re: Weblogic SAAJ implementation and version problem
                    666705
                    It works after setting:
                              -Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl.
                              
                              Cheers
                    • 7. Re: Weblogic SAAJ implementation and version problem
                      666705
                      to make the following work -Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl.
                                
                                I am adding axis.jar file to bea class path. Is it OK? or can we replace webservices.jar?
                                
                                Thanks
                                
                                -N
                      • 8. Re: Weblogic SAAJ implementation and version problem
                        666705
                        vsjdev / viswanadh,
                                  
                                  Please send me the source code where you are setting below 2 properties
                                  
                                  System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
                                  System.setProperty("javax.xml.soap.SOAPConnectionFactory","weblogic.wsee.saaj.SOAPConnectionFactoryImpl");
                                  
                                  Since I have not received any alert mail for your post, i am not able to reply imm'ly.
                                  
                                  Thanks,
                                  Mani
                        • 9. Re: Weblogic SAAJ implementation and version problem
                          666705
                          Follow the below steps to resolve "UnsupportedOperationException" in WL9.2
                                    
                                    1. Set classpath to latest saaj-impl.jar in startweblogic.cmd
                                    2. Set the below 2 system properties in code.
                                    System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
                                    System.setProperty("javax.xml.soap.SOAPConnectionFactory","weblogic.wsee.saaj.SOAPConnectionFactoryImpl");
                                    3. Note that the above 2 classes are available in the saaj-impl.jar which i have used and set classpath in step1. If you are using different version of saaj-impl.jar, set the exact "MessageFactory" and "SOAPConnectionFactory" classes which are avilable in your saaj-impl.jar. (Just extract your saaj-impl.jar and findout the exact classes).
                                    
                                    Thanks,
                                    Mani
                                    krishnan.manikandan@gmail.com
                                    
                                    --
                                    Edited by krishnan.manikandan@gmail.com at 05/26/2008 4:34 AM
                          • 10. Re: Weblogic SAAJ implementation and version problem
                            666705
                            Was this problem solved in the latest version of Bea Weblogic 9.2?
                                      
                                      I have an issue on soap 1.2 support activation (through Binding.Type.SOAP12):
                                      
                                      java.lang.RuntimeException: weblogic.testclient.WsdlParseFailedException: SOAP 1.2 is not supported by the Test Client
                                      at weblogic.testclient.ConnectionState.createWsdl(ConnectionState.java:63)
                                      at Controller.refreshWsdl(Controller.java:437)
                                      at Controller.begin(Controller.java:285)
                                      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.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:878)
                                      at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:808)
                                      at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:477)
                                      at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:305)
                                      at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:335)
                                      at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:51)
                                      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
                                      at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:95)
                                      at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2042)
                                      at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
                                      at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2114)
                                      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
                                      at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:554)
                                      at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:851)
                                      at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:630)
                                      at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
                                      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3241)
                                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
                                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
                                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
                                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                                      Caused by: weblogic.testclient.WsdlParseFailedException: SOAP 1.2 is not supported by the Test Client
                                      at weblogic.testclient.WsdlOperationParser.createOperation(WsdlOperationParser.java:38)
                                      at weblogic.testclient.WebService.createOperation(WebService.java:251)
                                      at weblogic.testclient.WebService.<init>(WebService.java:88)
                                      at weblogic.testclient.Wsdl.parseWsdl(Wsdl.java:135)
                                      at weblogic.testclient.Wsdl.<init>(Wsdl.java:60)
                                      at weblogic.testclient.ConnectionState.createWsdlFromHttpUrl(ConnectionState.java:120)
                                      at weblogic.testclient.ConnectionState.createWsdl(ConnectionState.java:54)
                                      ... 37 more