8 Replies Latest reply on Oct 20, 2009 3:54 AM by sagolsb

    ERROR [AbstractWsdlContractPublisher] Failed to load WSDL co

    sagolsb

      Hi,

      I Have developed and deployed a Web service with JBossWS and is exposed through the JBossESB. Now I set up UsernameToken WS-Security, all works well. Then I configured it to be accessed through SSL; now if I access the service WSDL/Service directly it still works but if I try to access the WSDL through the 'contract' (http://localhost:8080/contract) page, I can see the links to the WSDL but if I click on it I get the following error; I have done the key store settings as far as know of but still fails. It is failing when ESB tries to load the service WSDL, seems to be related to the JBR port settings? Any hints or pointers would be highly appreciated, Thanks in advance:

      17:11:29,822 ERROR [AbstractWsdlContractPublisher] Failed to load WSDL contract information from WS Endpoint 'https://127.0.0.1:8443/SecureService/GetCredentialService?wsdl'.
      java.io.IOException: Failed to create RemoteWsdlLoader instance.
      at org.jboss.soa.esb.actions.soap.AbstractWsdlContractPublisher.getWsdl(AbstractWsdlContractPublisher.java:168)
      at org.jboss.soa.esb.actions.soap.AbstractWsdlContractPublisher.getContractInfo(AbstractWsdlContractPublisher.java:134)
      at org.apache.jsp.contract_jsp._jspService(contract_jsp.java:126)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.soa.esb.ConfigurationException: Failed to locate keystore '/keystore'.
      at org.jboss.soa.esb.http.configurators.HttpProtocol.getKeyMaterial(HttpProtocol.java:191)
      at org.jboss.soa.esb.http.configurators.HttpProtocol.configure(HttpProtocol.java:92)
      at org.jboss.soa.esb.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:82)
      at org.jboss.soa.esb.actions.soap.RemoteWsdlLoader.(RemoteWsdlLoader.java:50)
      at org.jboss.soa.esb.actions.soap.AbstractWsdlContractPublisher.getWsdl(AbstractWsdlContractPublisher.java:166)
      ... 28 more

        • 1. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
          h.wolffenbuttel

          Hi,

          Could you show your JBR port settings? it might give more insight to your problem.

          Regards,

          Hans

          • 2. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
            sagolsb

            hi Hans,

            Thanks for responding, the following is the jboss-esb settings for one service, looking forward for your feedback:


            <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
            <jms-bus busid="ssoGwChannel1">
            <jms-message-filter dest-type="QUEUE" dest-name="queue/ssoshare_webservice_gw"/>
            </jms-bus>
            <jms-bus busid="ssoEsbChannel1">
            <jms-message-filter dest-type="QUEUE" dest-name="queue/ssoshare_webservice_esb"/>
            </jms-bus>
            </jms-provider>
            <jbr-provider name="JBR-Http" protocol="http" host="localhost">
            <jbr-bus busid="Http-1" port="8766" />
            </jbr-provider>

            <jbr-provider name="JBR-Socket" protocol="socket" host="localhost">
            <jbr-bus busid="Socket-1" port="8886" />
            </jbr-provider>





            <jms-listener name="JMS-Gateway" busidref="ssoGwChannel1" is-gateway="true"/>
            <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true"/>
            <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true"/>
            <jms-listener name="JMS-ESBListener" busidref="ssoEsbChannel1"/>


            <!--


            -->


            <!--



            -->



            Regards,
            Sagol

            • 3. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
              h.wolffenbuttel

              Hi Sagol,

              I have a setup for SSL through a http-provider, but if you are using JBR you might want to try the setup from the quickstart https_2way_ssl. Looking at your exception it seems to me you could try to ad keystore attributes like in the quickstart:

               <jbr-provider name="https_2way" protocol="https" host="localhost">
               <!-- Https/SSL settings -->
               <property name="jbr-KeyStoreURL" value="@keystore@" />
               <property name="jbr-KeyStorePassword" value="https_2way_ssl_pass" />
               <property name="jbr-TrustStoreURL" value="@keystore@" />
               <property name="jbr-TrustStorePassword" value="https_2way_ssl_pass" />
               <property name="jbr-ClientAuthMode" value="need" />
               <property name="serviceInvokerTimeout" value="20000" />
              
               <jbr-bus busid="https_2way" port="9433"/>
               </jbr-provider>
              


              Also if your keystore isn't called/located at "/keystore" the exception gives this value because it didn't get a keystore from your configuration.


              Regards,

              Hans


              • 4. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
                sagolsb

                Hi Hans,

                Thanks again.

                I tried with the settings described, it starts up ok meaning that it finds the keystore but still fails with the same error message. Any thoughts?

                regards,
                Sagol

                • 5. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
                  h.wolffenbuttel

                  Hi Sagol,

                  How did you setup your SSL connection without the JBR settings you just added? It could be your configuration is triggered before the JBR settings and that's why you're still having problems.

                  Keep in mind that you can enable SSL on a JBR endpoint but also on a service. Maybe you could remove the SSL configuration from your Service as a test to see if the JBR settings are used?

                  Regards,

                  Hans

                  • 6. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
                    sagolsb

                    Hi Hans,

                    Yes if I remove the SSL configuration from the service itself it works with the JBR settings described. And this serves my requirement for now and I really appreciate for your help.

                    I was wondering if you could provide a few hints to deploy both the service and the ESB service with SSL? Even if I start the server with the ESB project and then deploy the service (to make sure the JBR is triggered first!) then also it fails.

                    Thanks again.
                    Sagol

                    • 7. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
                      h.wolffenbuttel

                      Hi Sagol,

                      I'm not sure what you want to accomplish with exposing your service both through the ESB and separate as a standalone service. Atleast if that is what you are trying to do. If you expose your service through your ESB then there is no need for an extra exposure of your service.

                      So I think you have to choose where to put your security based on your choise how to connect to your service: ESB or directly. I do not know however your JBoss setup, so i'm guessing here.

                      Regards,

                      Hans

                      • 8. Re: ERROR [AbstractWsdlContractPublisher] Failed to load WSD
                        sagolsb

                        Hi Hans,

                        As I mentioned before securing through the ESB is what I was looking for and that is achieved now, I was just curious to know how both of them could be secured, if at all possible. Thank you very much for your help. my application is working as I wanted it to be. Thanks again.

                        regards,
                        Biramani