1 2 Previous Next 29 Replies Latest reply on May 6, 2008 11:32 AM by edelln Go to original post
      • 15. Re: Using the servicemix-cxf-se-service-unit archetype
        kelvinflow

        here you have

         

        <wsdl:binding name="OrderServiceServiceSoapBinding" type="tns:OrderService">

        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="putOrder">

        <soap:operation soapAction="" style="document"/>

        <wsdl:input name="putOrder">

        <soap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="putOrderResponse">

        <soap:body use="literal"/>

        </wsdl:output>

        </wsdl:operation>

        <wsdl:operation name="getOrderStatus">

        <soap:operation soapAction="" style="document"/>

        <wsdl:input name="getOrderStatus">

        <soap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="getOrderStatusResponse">

        <soap:body use="literal"/>

        </wsdl:output>

        </wsdl:operation>

        <wsdl:operation name="testWebMethod">

        <soap:operation soapAction="" style="document"/>

        <wsdl:input name="testWebMethod">

        <soap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="testWebMethodResponse">

        <soap:body use="literal"/>

        </wsdl:output>

        </wsdl:operation>

        </wsdl:binding>

        <wsdl:service name="OrderServiceService">

        <wsdl:port name="OrderServicePort" binding="tns:OrderServiceServiceSoapBinding">

        <soap:address location="http://localhost:9090/hello"/>

        </wsdl:port>

        </wsdl:service>

        xml bean

        <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"

        xmlns:order="http://logisticx.demo.fuse.iona.com/orderService/">

         

        <cxfbc:consumer wsdl="classpath:orderService.wsdl"

        targetService="order:OrderServiceService"

        targetInterface="order:OrderService"

        />

        </beans>

        Additionaly, i would like to tell you that if i change the service interface adding a new method for example, then i do mvn clean isntall from root and go and deploy the new stuff the changes are not reflected. I'm following the use case step by step, i don't understand

         

        Edited by: kelvinflow on Apr 29, 2008 9:01 AM

        • 16. Re: Using the servicemix-cxf-se-service-unit archetype
          edelln

          Ok - I am not sure whether that was a cut and paste issue for your xbean.xml.

           

          Also I was looking for the snippet in your wsdl file that defined the wsdl:service

           

          In the logistics demo for the cxf-se xbean.xml you should have something like

           

          <cxfse:endpoint>

                  <cxfse:pojo>

                    <bean class="com.iona.fuse.demo.logisticx.service.order.OrderServiceImpl" />

                  </cxfse:pojo>

              </cxfse:endpoint>

           

           

          Then to consume you should have set up another service unit.

           

          <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"

           

          <cxfbc:consumer wsdl="classpath:orderService.wsdl"

                            targetService="order:OrderServiceService"

                            targetInterface="order:OrderService"

                            timeout="60"/>

           

           

           

          </beans>

           

          and in your wsdl something like

           

          <wsdl:service name="OrderServiceService">

           

          Whats the soap:address in your wsdl thats generated ???

           

           

          Edell.

           

          Edited by: edelln on Apr 29, 2008 9:15 AM

          • 17. Re: Using the servicemix-cxf-se-service-unit archetype
            kelvinflow

            I edited my previous response, please check it.

            • 18. Re: Using the servicemix-cxf-se-service-unit archetype
              edelln

              Can you change the soap:address in the wsdl to the following

               

              <soap:address location="http://localhost:8192/order-service"/>

               

              Also can I verify that you have one service unit for the cxf-se and one for the cxf-bc to be the consumer.

               

              Edell.

               

              Edited by: edelln on Apr 29, 2008 9:14 AM

               

              Edited by: edelln on Apr 29, 2008 9:20 AM

               

              Edited by: edelln on Apr 29, 2008 9:21 AM

              • 19. Re: Using the servicemix-cxf-se-service-unit archetype
                kelvinflow

                Hello, i just changed it. After this ran mvn clean install in the root directory and then when to the Service assembly directory and ran mvn jbi:projectDeploy.

                Nothing happened, i try to get the wsdl from http://localhost:8192/order-service?wsdl and there is not service availabe there. i got a can not find server error in the explorer.

                My project consist of one service unit for the cxf-se and one for the cxf-bc.

                the structure is this

                order

                   |  - order-http-su   (cxf-bc)

                   |  - order-ws-su    (cxf-se)

                   |  - order-sa         (Service Assembly)

                 

                Another thing i had figured out is when i run mvn jbi:projectDeploy and i have new changes in my service interface those changes are not reflected. it seems servicemix is not updating the new deployed components. I tryied deleting isntalling artifacts but does not seem to be working. if i go to the old address in my binding http://localhost:9090/hello?wsdl  i can get a wsdl response.

                • 20. Re: Using the servicemix-cxf-se-service-unit archetype
                  edelln

                  Is it possible you can zip up your testcase and send it to me and I will take a look.

                   

                  edell.nolan@iona.com

                   

                  thanks, Edell.

                  • 21. Re: Using the servicemix-cxf-se-service-unit archetype
                    kelvinflow

                    Done.

                    Thanks for your help.

                    • 22. Re: Using the servicemix-cxf-se-service-unit archetype
                      edelln

                      hi,

                       

                      I have deployed your sa and I launch the wsdl in my browser no problem.

                       

                      but I did try to create a client and run it against it and it throws some errors.

                       

                      So just to let you know I am looking into it still.

                       

                      Edell.

                      • 23. Re: Using the servicemix-cxf-se-service-unit archetype
                        kelvinflow

                        ok, i don't understand why i can not call it from the 8192 port but seems to be working on port 9090 .

                         

                        thanks for your help

                        • 24. Re: Using the servicemix-cxf-se-service-unit archetype
                          edelln

                          Hi,

                           

                          I have managed to get my client working against your testcase.

                           

                          There was a few small changes I made. I added in the ServiceName to the @Webservice annotation in your OrderServiceImpl.java

                           

                          [ serviceName = "OrderServiceService",]

                           

                          I also added the "useJBIWrapper="false" into the xbean.xml files for the order-ws-su and order-http-su.

                           

                          The operations run fine and I get expected results.

                           

                          I have tested this against the latest 3.3.1-fuse-SNAPSHOT release - there will be 3.3.1 release hopefully this week.

                           

                          I will zip up your testcase and send it to you and give it a try and see.

                           

                          I do think there is a bug with the JBI Message Wrapper so I will continue to look at that but in the meantime try the above so that you can progress.

                           

                          Edell.

                          • 25. Re: Using the servicemix-cxf-se-service-unit archetype
                            edelln

                            Hi,

                             

                            Another thing to note is that the versions of the service units etc were different - you had 1.0 and 1.1 mixed and also the sa was using 3.3.0.6-fuse and others 3.3.0-10-fuse so this maybe the reason you were not seeing any of your updates and the sa was had a dependency on the 1.0 versions but you were changing the 1.1 versions.

                             

                            Hope this helps, Edell.

                            • 26. Re: Using the servicemix-cxf-se-service-unit archetype
                              edelln

                              Hi,

                               

                              I have found why I was getting a bug with the JBI message wrapper and its because you didn't include the directory with the generated classes and compile them into the classes directory.

                               

                              Once I add the following and do a reploy - its working for me.

                               

                              add the following into the order-ws-su pom.xml

                               

                              <plugin>

                              <groupId>org.apache.cxf</groupId>

                              <artifactId>cxf-codegen-plugin</artifactId>

                              <version>2.0.5.0-fuse</version>

                              <configuration>

                              <className>com.iona.fuse.demo.logisticx.service.order.OrderService</className>

                              <verbose>true</verbose>

                              <outputFile>

                              ${project.build.directory}/generated-sources/jaxws/orderService.wsdl

                              </outputFile>

                              <verbose>true</verbose>

                              <argline>-classdir ${project.build.directory}/classes</argline>

                              </configuration>

                              <dependencies>

                              <dependency>

                              <groupId>org.apache.cxf</groupId>

                              <artifactId>cxf-rt-frontend-jaxws</artifactId>

                              <version>2.0.5.0-fuse</version>

                              </dependency>

                              </dependencies>

                              <executions>

                              <execution>

                              <id>generate-wsdl</id>

                              <phase>process-classes</phase>

                              <goals>

                              <goal>java2wsdl</goal>

                              </goals>

                              </execution>

                              </executions>

                              </plugin>

                               

                              So all you should have to do is get all your logisticx versions correct, all servicemix-versions correct in the poms, add the above and put the serviceName into the @WebService annotation in your Implementation class.

                               

                              Hope this helps, Edell.

                              • 27. Re: Using the servicemix-cxf-se-service-unit archetype
                                kelvinflow

                                Hello Edell,

                                After all your help i have the example working properly now.

                                 

                                Thanks for all your help, you rock.

                                • 28. Re: Using the servicemix-cxf-se-service-unit archetype
                                  kelvinflow

                                  Hello Edell,

                                  i have 2 additional questions about this topic. Is regarding the wsdl to exposed by the ws component.

                                   

                                  when the plugin java2wsdl create the the wsdl files, its always create the soap address pointing to this http://localhost:9090/hello

                                  1- is there any way to change this?

                                   

                                  2- do i need to copy manually this wsdl to my BC's resource folder? or just leave it there in the ws service engine.

                                   

                                  thank you.

                                  • 29. Re: Using the servicemix-cxf-se-service-unit archetype
                                    edelln

                                    Hi,

                                     

                                    Yes! from experience I have copied it to the CXF-bc resources dir - but in generating the wsdl you can specify the output directory.

                                     

                                    If you download the FUSE-Services-Framework and look in the /tools/bin directory you will see the tools scripts in there.

                                     

                                    Do java2wsdl -help and you will get all the options.

                                     

                                    I think the option is " -outputdir"

                                     

                                    I have to check for 1) as the usage indicates no but I had a look at the tools code at cxf and it does have a CFG_ADDRESS variable in there.

                                     

                                    Will take a look and let you know.

                                     

                                    Edell.

                                    1 2 Previous Next