1 2 Previous Next 19 Replies Latest reply on May 24, 2015 1:10 PM by ahmeddrira Go to original post
      • 15. Re: Moving to JBossWS-CXF in AS 6 Final
        jbossuser71

        Another question regarding web service with CXF stack.

         

        For generating artifacts from WSDL I find the class "org/apache/cxf/tools/wsdlto/WSDLToJava"  which is part of {JBOSS}\server\common\lib\cxf-tools-wsdlto-core.jar".

         

        But for generating WSDL from service class, I do not find any such utility like org/apache/cxf/tools/java2wsdl/JavaToWSDL.

        The only JavaToWSDL class I find is org/jboss/ws/tools/JavaToWSDL which is part of {JBOSS}\server\common\lib\jbossws-native-core.jar.

        This does not look like a CXF library.

         

        From "Apache CXF" website if I download the CXF distribution I find that org/jboss/ws/tools/JavaToWSDL is part of cxf-2.3.2.jar.

        Is there a possibility that JBoss6 does not include that jar (i.e. cxf-2.3.2.jar) ?

         

        So my question is which utility should I use to generate WSDL with CXF stack in JBoss 6?

        • 16. Re: Moving to JBossWS-CXF in AS 6 Final
          asoldano

          Regarding the NTLM authentication, that's actually mentioned in Apache CXF doc, see http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html . I'm sorry, I don't know the low level details of the Microsoft authentication system, so I can't comment on the CXF need for disabling chunk mode. Regarding the Metro behaviour on this, you might want to capture/inspect the message being sent when using it, perhaps it automatically does the same?

          • 17. Re: Moving to JBossWS-CXF in AS 6 Final
            asoldano

            Both Apache CXF (regardless of the version) and JBossWS-CXF have facilities/tools for WSDL first and code first development. The JBossWS ones implement the jbossws-spi tools interface, basically unifying the configuration for all the supported jbossws stacks. When using jbossws-cxf, the tools internally delegate to the Apache CXF tools, of course.

            See the documentation at http://community.jboss.org/wiki/JBossWS-JAX-WSTools .

            • 18. Re: Moving to JBossWS-CXF in AS 6 Final
              eric.wai2010

              I got another solution, it is not elegant, but it works.

               

              In my situation, i'm not allowed to change anything of JBoss (no library addition/deletion  to common\lib, no config change, no restart of JBoss), so i'm force to found a new solution.

               

              Initially i found a easy solution in https://community.jboss.org/thread/177864

              This method works but the speed of JBossWS is very poor (it takes more than 20s to finish a web service call while JRE can do the same thing in 3s).

              So i give up this method.

               

              After investigating Apache CXF and JRE source code, i found out a way to force JBoss to use the JRE web service provider instead of CXF's.

               

              The class that chooses web service provider is javax.xml.ws.Service, JRE contains javax.xml.ws.Service (rt.jar) and JBossWS has it's own version of javax.xml.ws.Service (common\lib\jboss-jaxws-api_2.2_spec.jar).

              When your web application invokes web service, because of class loading order mechanism, the JBossWS version of javax.xml.ws.Service is called (and bean exception is being thrown).

              To prevent JBossWS version from being called, i make my own version of javax.xml.ws.Service and put it to my web application.

               

              From the MANIFEST.MF inside jboss-jaxws-api_2.2_spec.jar, i know that the jar version is 2.2 1.0.0.Final so i download the source code from http://grepcode.com/snapshot/repository.jboss.org/nexus/content/repositories/releases/org.jboss.spec.javax.xml.ws/jboss-jaxws-api_2.2_spec/1.0.0.Final , then i modify the following code :

               

              FROM :

               

              protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {

                        delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,

                                            serviceName,

                                            this.getClass());

              }

               

               

              protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {

                        delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,

                                            serviceName,

                                            this.getClass(), features);

              }

               

              TO :

               

              private Provider getProvider() {

               

                        final Provider jreProvider = com.sun.xml.internal.ws.spi.ProviderImpl.INSTANCE;

               

                        if( jreProvider != null ) {

                                  return jreProvider;

                        }

               

                        return Provider.provider();

               

              }

               

               

              protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {

               

                        delegate = getProvider().createServiceDelegate(wsdlDocumentLocation,

                                            serviceName,

                                            this.getClass());

               

              }

               

               

              protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {

               

                        delegate = getProvider().createServiceDelegate(wsdlDocumentLocation,

                                            serviceName,

                                            this.getClass(), features);

               

              }

               

              Thanks a lot for u guys' finding on investigating this issue, so that i'm inspired to think of this solution.

               

              Hope u guys frind my solution helpful.

              • 19. Re: Moving to JBossWS-CXF in AS 6 Final
                ahmeddrira

                Hi Eric , iam

                facing the same problem and testting your solution , i am not able to resolve the roblème

                maybe i am not on the good way ,

                any suggession please i have this trace error

                 

                INFOS: The cipher suite filters have not been configured, falling back to default filters.

                juil. 02, 2015 5:40:24 PM org.apache.cxf.transport.https.SSLUtils getCiphersFromList

                INFOS: The cipher suites have been set to TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_SHA, TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS_ECDH_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_MD5, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, TLS_KRB5_WITH_3DES_EDE_CBC_SHA, TLS_KRB5_WITH_3DES_EDE_CBC_MD5, TLS_KRB5_WITH_RC4_128_SHA, TLS_KRB5_WITH_RC4_128_MD5, TLS_KRB5_WITH_DES_CBC_SHA, TLS_KRB5_WITH_DES_CBC_MD5, TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5, TLS_KRB5_EXPORT_WITH_RC4_40_SHA, TLS_KRB5_EXPORT_WITH_RC4_40_MD5. 

                Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.

                  at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:150)

                  at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:65)

                  at javax.xml.ws.Service.<init>(Service.java:77)

                  at com.alpha_eng.ws.cloudupdate.LdapCloudUpdateWSImplService.<init>(LdapCloudUpdateWSImplService.java:43)

                  at com.alpha_eng.ws.tools.CommunicationCloudUpdate.getCloudUpdateport(CommunicationCloudUpdate.java:41)

                  at com.alpha_eng.cloudupdate.ChangerPassword.ModifierPassword(ChangerPassword.java:22)

                  at com.alpha_eng.ldapcloud.MajInfosClient.main(MajInfosClient.java:63)

                Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.

                  at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:93)

                  at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:205)

                  at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:148)

                  ... 6 more

                Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.

                at [row,col,system-id]: [1,1096,"https://omcr/ldapWS/services/ldapCloudUpdate?wsdl"]

                  at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:226)

                  at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:179)

                  at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:91)

                  ... 8 more

                Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.

                at [row,col,system-id]: [1,1096,"https://omcr/ldapWS/services/ldapCloudUpdate?wsdl"]

                  at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630)

                  at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)

                  at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.java:3258)

                  at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3200)

                  at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2832)

                  at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)

                  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:908)

                  at org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:826)

                  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:868)

                  at org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:826)

                  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:868)

                  at org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:826)

                  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:868)

                  at org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:826)

                  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:868)

                  at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:755)

                  at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:217)

                  ... 10 more

                1 2 Previous Next