8 Replies Latest reply on Mar 7, 2013 9:16 PM by tadayosi

    Having problems testing from Quick Start Guide

    moraleslos

      Hi,

       

      I'm new to switchyard and am going through the quick start tutorial here: https://docs.jboss.org/author/display/SWITCHYARD/Quick+Start

       

      I've done everything up to "Test the Deployed Service".  Everything prior to this checks out.  However when I try to test the WS using the Web Services Explorer I get this error:

       

      IWAB0135E An unexpected error has occurred.

      404

      Not Found

       

       

      I'm not sure what the issue is or how to debug it.  Any ideas?

        • 1. Re: Having problems testing from Quick Start Guide
          mageshbk

          Could you check what is the endpoint address that is shown in your Web Services explore? Is that the same address as shown in the server's deployment? To further assist, please attach a screenshot showing the error and also the server console log.

          • 2. Re: Having problems testing from Quick Start Guide
            moraleslos

            Yes.  WSDL / deployment matches the Web Services explorer endpoint address.  See attached screen shots.wsdl.pngws explorer.png

            • 3. Re: Having problems testing from Quick Start Guide
              kcbabo

              The soap:address in the WSDL is not used for endpoint binding in SY.  We integrate with JBossWS in AS 7, so the host:port will match what the http-listener in JBoss AS is using (localhost:8080 will work by default).  The context root and path are based on your binding configuration and service name.  One way to find out the complete endpoint URL is by checking the console log for your server.  You'll see something like this when the application is deployed:

               

              11:53:37,043 INFO  [org.switchyard.common.camel.SwitchYardCamelContext] (MSC service thread 1-4) Route: direct:{urn:switchyard-quickstart:bean-service:0.1.0}OrderService started and consuming from: Endpoint[direct://%7Burn:switchyard-quickstart:bean-service:0.1.0%7DOrderService]
              11:53:37,117 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-4) Add Service
               id=org.switchyard.component.soap.endpoint.BaseWebService
               address=http://localhost:8080/quickstart-bean/OrderService
               implementor=org.switchyard.component.soap.endpoint.BaseWebService
               invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker
               serviceName={urn:switchyard-quickstart:bean-service:1.0}OrderService
               portName={urn:switchyard-quickstart:bean-service:1.0}OrderServicePort
               wsdlLocation=vfs:/content/switchyard-quickstart-bean-service.jar/wsdl/OrderService.wsdl
               mtomEnabled=false
              

               

              hth,

              keith

              • 4. Re: Having problems testing from Quick Start Guide
                moraleslos

                That was it!  JBossAS was showing http://localhost:8080/HelloService/HelloService.  Now I guess my question from all of this is where is this configuration for changing the context root and path?  Say I want to change the context root to MyServices and maybe change the service name to MyHelloService.  So it would look something like this:  http://localhost:8080/MyServices/MyHelloService.  This is assuming I keep everything the same-- class names, etc.

                • 5. Re: Having problems testing from Quick Start Guide
                  rcernich

                  There's a context path property on the soap binding.  By default, this is set to the project name (I think).

                  • 6. Re: Having problems testing from Quick Start Guide
                    tadayosi

                    Hi Keith,

                     

                    Let me ask you a related question. So what does the <socketAddr> in the SOAP Binding work for?  Please note switchyard.xml in the bean-service QS looks like this:

                                <binding.soap xmlns="urn:switchyard-component-soap:config:1.0">

                                    <wsdl>wsdl/OrderService.wsdl</wsdl>

                                    <socketAddr>:18001</socketAddr>

                                    <contextPath>quickstart-bean</contextPath>

                                </binding.soap>

                     

                    Is this just an outdated parameter?

                     

                    Thanks,

                    Tadayoshi

                    • 7. Re: Having problems testing from Quick Start Guide
                      kcbabo

                      It's used for standalone/test environments, but not when deployed to AS or OpenShift.  The main use case for it is if you are running a server on the same machine as your unit tests are running, socketAddr allows you to specify a different port from the default of 8080.

                      • 8. Re: Having problems testing from Quick Start Guide
                        tadayosi

                        Ah, I see. Thanks for your explanation, Keith!