1 2 Previous Next 23 Replies Latest reply on Sep 5, 2008 10:01 AM by stlecho

    Error when using wise to consume a webservice

    stlecho

      Hi,

      I'm trying to contact an external webservice with the aid of JBossESB. I've based my code on the "webservice_consumer_wise" quickstart.

      When my XML requests is being treated by ESB, I'm receiving the following error: "A class/interface with the same name "it.javalinux.wise.Details" is already in use. Use a class customization to resolve this conflict.".

      I've been looking for more information about the class customization, but haven't found anything useful. Any ideas on how to solve this issue ?

      The WSDL I'm using is not publicly available. If required, I can forward it.

      Log information
      2008-09-02 14:38:10,219 INFO [STDOUT] [WARNING] src-resolve: Cannot resolve the name 'com:Version' to a(n) 'type definition' component.
      2008-09-02 14:38:10,234 INFO [STDOUT] line 475 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,234 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,234 INFO [STDOUT] line 475 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,250 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,250 INFO [STDOUT] line 496 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,250 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,250 INFO [STDOUT] line 585 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,250 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,250 INFO [STDOUT] line 672 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,250 INFO [STDOUT] [WARNING] src-resolve: Cannot resolve the name 'code:Register' to a(n) 'type definition' component.
      2008-09-02 14:38:10,250 INFO [STDOUT] line 484 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,250 INFO [STDOUT] [WARNING] src-resolve: Cannot resolve the name 'iso:Gender' to a(n) 'type definition' component.
      2008-09-02 14:38:10,250 INFO [STDOUT] line 539 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema6
      2008-09-02 14:38:10,656 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,656 INFO [STDOUT] line 705 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema7
      2008-09-02 14:38:10,672 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,672 INFO [STDOUT] line 1938 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema10
      2008-09-02 14:38:10,672 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,672 INFO [STDOUT] line 120 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema3
      2008-09-02 14:38:10,672 INFO [STDOUT] [WARNING] cos-applicable-facets: Facet 'enumeration' is not allowed by type null.
      2008-09-02 14:38:10,672 INFO [STDOUT] line 169 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema3
      2008-09-02 14:38:10,672 INFO [STDOUT] [WARNING] src-resolve: Cannot resolve the name 'con:Context' to a(n) 'type definition' component.
      2008-09-02 14:38:10,672 INFO [STDOUT] line 98 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema3
      2008-09-02 14:38:10,672 INFO [STDOUT] [WARNING] src-resolve: Cannot resolve the name 'sum:Summary' to a(n) 'type definition' component.
      2008-09-02 14:38:10,672 INFO [STDOUT] line 161 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema3
      2008-09-02 14:38:10,687 INFO [STDOUT] [WARNING] src-resolve: Cannot resolve the name 'que:query' to a(n) 'element declaration' component.
      2008-09-02 14:38:10,687 INFO [STDOUT] line 10 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=#types?schema1
      ...
      2008-09-02 14:38:16,422 INFO [STDOUT] [ERROR] A class/interface with the same name "it.javalinux.wise.Details" is already in use. Use a class customization to resolve this conflict.
      2008-09-02 14:38:16,422 INFO [STDOUT] line 752 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=
      2008-09-02 14:38:16,422 INFO [STDOUT] [ERROR] (Relevant to above error) another "Details" is generated from here.
      2008-09-02 14:38:16,453 INFO [STDOUT] line 228 of https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=
      2008-09-02 14:38:17,781 ERROR [STDERR] it.javalinux.wise.core.exceptions.WiseRuntimeException: Error occurred while consuming wsdl: https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL=
      2008-09-02 14:38:17,781 ERROR [STDERR] at it.javalinux.wise.core.exceptions.WiseRuntimeException.rethrow(WiseRuntimeException.java:44)
      2008-09-02 14:38:17,781 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:151)
      2008-09-02 14:38:17,781 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:94)
      2008-09-02 14:38:17,781 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClientFactory.getClient(WSDynamicClientFactory.java:120)
      2008-09-02 14:38:17,781 ERROR [STDERR] at org.jboss.soa.esb.actions.soap.wise.SOAPClient.process(SOAPClient.java:225)
      2008-09-02 14:38:17,781 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
      2008-09-02 14:38:17,781 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
      2008-09-02 14:38:17,781 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      2008-09-02 14:38:17,781 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      2008-09-02 14:38:17,781 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      2008-09-02 14:38:17,781 ERROR [STDERR] Caused by: java.lang.NullPointerException
      2008-09-02 14:38:17,781 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.getClassNames(WSDynamicClient.java:181)
      2008-09-02 14:38:17,781 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:127)
      2008-09-02 14:38:17,781 ERROR [STDERR] ... 8 more


      Regards, Stefan Lecho.

        • 1. Re: Error when using wise to consume a webservice
          beve

          Hi Stefano,

          I'm not sure about this one, but one thing you can try is adding the following property to 'wise-core.properties:

          wise.targetPackage=org.jboss.testing

          You can use your own specific package name instead of that one above. You'll need to redeploy and restart you server.
          Can you give that a try and let me know if that solves you issue?

          Regards,

          /Daniel

          • 2. Re: Error when using wise to consume a webservice
            beve

            Sorry for calling you Stefano! :)

            • 3. Re: Error when using wise to consume a webservice
              stlecho

              Hi Daniel(o),

              I've added the property you've suggested, but the result is unfortunately the same. I was wondering if the definition of the SOAPAction, EndPointName and serviceName properties are correctly defined with regards to the WSDL I'm using.

              WSDL extract
              <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="urn://fsb.belgium.be/fphp/v3_0" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="urn://fsb.belgium.be/fphp/v3_0">
              ...

              <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
              <operation name="findPerson">
              <soap:operation soapAction="urn://fsb.belgium.be/fphp/v3_0/findPerson" style="document"/>

              <soap:body use="literal"/>


              <soap:body use="literal"/>



              <service name="PersonQuery">
              <port name="PersonQuerySoap" binding="s0:PersonQuerySoap">
              <soap:address location="http://vilcanota:7002/fphp/3.1/ws/PersonQuery.jws"/>





              Action Definition


              <http-client-property name="file" value="/META-INF/https-fsb.properties" />

              <property name="SOAPAction" value="urn://fsb.belgium.be/fphp/v3_0/findPerson"/>
              <property name="EndPointName" value="PersonQuerySoap"/>

              <property name="serviceName" value="PersonQuery"/>


              PS: Any idea where I can find some information/documentation about the properties supported by wise-core.properties ?

              Regards, Stefan.

              • 4. Re: Error when using wise to consume a webservice
                jim.ma

                It seems JAXB complains the schema element conflict when Wise generates code for this wsdl . Can you attache this wsdl ? Please also include the imported schema files .

                • 5. Re: Error when using wise to consume a webservice
                  stlecho

                  Hi Jim,

                  In WSDynamicClient at line 180, the children array is null because wise.tmpDir does not contain any .class files.

                  String[] children = scanDir.list(filter);


                  The WSDL I'm using is rather big. Can I send it directly to you instead of posting it on the forum ?

                  PS: I've remarked that there is a newer - than the one integrated with jbossesb v4.4GA - version of jbossws available. Any plans to integrate this newer version in jbossesb ?

                  Regards, Stefan.

                  • 6. Re: Error when using wise to consume a webservice
                    maeste

                    Hi Stefan,
                    as Jim asked we need wsdl to better understand wha't happening. Please send it to me directly, you should have my mail ;)

                    • 7. Re: Error when using wise to consume a webservice
                      jim.ma

                       

                      "stlecho" wrote:
                      Hi Jim,

                      In WSDynamicClient at line 180, the children array is null because wise.tmpDir does not contain any .class files.
                      String[] children = scanDir.list(filter);



                      Yes. That's because WISE does not generate classes for this wsdl . This is an issue or an unsupported in Wise project . Am I right ? Stefano.

                      • 8. Re: Error when using wise to consume a webservice
                        jim.ma

                        I looked at your wsdl . Wise is failed to consume a wsdl which contains two
                        schema element with same name and different namespace .

                        • 9. Re: Error when using wise to consume a webservice
                          maeste

                          Jim is right..
                          The underline reason is because we set a default package name for generated classes and cause the problem.
                          I'll take a look to this issue asap. Of course if you are wsdl's owner and would mind to don't use same name for different schema element it would be a work around.
                          I'll keep you post about my progress on this issue.

                          • 10. Re: Error when using wise to consume a webservice
                            stlecho

                            I suppose that the generation process should generate classes in a package for which the name is based on the (target)namespace of the element. Thanks for keeping me informed about the evolution of this fix.

                            • 11. Re: Error when using wise to consume a webservice
                              maeste

                              Hi,
                              I just committed the fix of this issue on
                              https://jax-wise.svn.sourceforge.net/svnroot/jax-wise/projects/legacyMixed/trunk revision 335.
                              The fix passes all test, even if I haven't time to test in on ESB right now. I'll try this step probably tomorrow, but I'm confident the problem is fixed. If you have time please checkout from svn build it (default target of build.xml), get Wise-core.jar and just substitute it in soap.esb dir on esb server and give it a try. Please let me know if this patch solve your problem or not.
                              Thanks for the interest

                              • 12. Re: Error when using wise to consume a webservice
                                stlecho

                                Stefano,

                                Thanks for putting a new version at my disposal. I've build the jar, deployed it in JBossESB, cleaned the work and tmp directories, rebooted and launched my test. Unfortunately I'm receiving the same error message as before :o(.

                                PS: The SVN checkout contains 2 compilation errors in CoreIntegrationTest.java. Did you forget to do a check-in ?

                                Regards, Stefan.

                                • 13. Re: Error when using wise to consume a webservice
                                  maeste

                                  Hmm that's strange.
                                  I just noticed in a previous post beve suggest you to change wise-core.properties to add targetPackage. If you still have this property set you may experience the same problem since it forces the old behaviour (BTW it's the same to use directly wsconsume with -p option enabled. And the error would be the same also with wsconsume with this property enabled).
                                  So please remove the targetPackage property form config file and give it a try. Let me know your progress.

                                  About the compilation problem...you are right I forgot a commit. I've just done it :)

                                  • 14. Re: Error when using wise to consume a webservice
                                    stlecho

                                    I've removed the targetPackage property and now it's generating Java sources, but there is a problem when compiling them. What should I do to make com.sun.tools.javac.Main available on the classpath ?

                                    2008-09-04 11:19:01,549 INFO [STDOUT] [ERROR] com.sun.tools.javac.Main is not available in the classpath, requires Suns JDK version 5.0 or latter.
                                    2008-09-04 11:19:01,549 INFO [STDOUT] unknown location
                                    2008-09-04 11:19:01,549 INFO [STDOUT] compilation failed, errors should have been reported
                                    2008-09-04 11:19:01,549 INFO [STDOUT] Failed to invoke WsImport
                                    2008-09-04 11:19:01,549 INFO [STDOUT] java.lang.IllegalStateException: WsImport invocation failed. Try the verbose switch for more information
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:190)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at org.jboss.wsf.spi.tools.WSContractConsumer.consume(WSContractConsumer.java:189)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClient.importObjectFromWsdl(WSDynamicClient.java:170)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:125)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:94)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClientFactory.getClient(WSDynamicClientFactory.java:121)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at org.jboss.soa.esb.actions.soap.wise.SOAPClient.process(SOAPClient.java:225)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
                                    2008-09-04 11:19:01,549 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)


                                    1 2 Previous Next