Results 1 to 7 of 7

Thread: Build a Web service Client with XFire and Spring 2.0

  1. #1
    Join Date
    Aug 2007
    Posts
    14

    Default Build a Web service Client with XFire and Spring 2.0

    Hi,

    I want to use XFire and Spring Framework 2.0 to make a web service client. In the book "Spring in action", I have read that I have to use a bean with this configuration:

    <?xml version="1.0" encoding="UTF-8"?>
    <bean id="testWebService" class="org.codehaus.xfire.spring.remoting.XFireCli entFactoryBean">
    <property name="wsdlDocumentUrl"> <value>http://localhost:8080/Citation/servivces/citation?WSDL</value>
    </property>
    <property name="serviceInterface">
    <value>com.tickettodrive.CitationService</value>
    </property>
    </bean>

    Ok, fine, but I have only the wsdl file, so how can I generate the serviceInterface from the wsdl ?

    This information is never wrote in the book or in the spring tutorial (http://static.springframework.org/sp...-jaxrpc-access)

    It could be useful to add some new information about this subject.

    Which tool should I use (wsdl2java from Axis or Xfire, or a tool from Spring ?)

    Thanks for your help.

  2. #2

    Default

    Hi Oliver,

    I did not use xfire with Spring so far. But if it is just for generating the classes, you can probably use the Eclipse plugin:
    http://xfire.codehaus.org/Eclipse+Plugin

    Tobias

  3. #3
    Join Date
    Aug 2007
    Posts
    14

    Default

    Thanks for the link, I will try the XFire Eclipse plugin, but I think there is maybe another solution inside the spring framework, perhaps a tool exists in the spring web service subproject.

  4. #4

    Default

    Oliver,

    from my point of view Spring-WS rather an alternative to xFire because it actually provides the whole web service stack. So for me it would not be clear how to put the two together. But it would be interesting to see if someone can shad more light on that.

    Regards,

    Tobias

  5. #5
    Join Date
    Aug 2007
    Posts
    14

    Default

    Tobias,

    I agree with you, Spring web service is an alternative to XFire and Axis, so this project should offer a tool to generate java classes from a wsdl file, but I didn't find it in the documentation.

    Any information about this subject will be useful.

    Regards.

    Oliver

  6. #6

    Default

    Olivier,

    I am not so sure about that. You see when you take xfire or axis you usually get a default object binding framework like jaxb or xmlbeans and the WS Stack generates the objects as well as the proxy for you.
    This is quite convinient but can have drawbacks in large scale projects.
    Anyhow in SprinWS you are free to use a lot of different ways to get the data into java. You can use old fashioned parsing, you can use object binding and object mapping.
    In any case you make use of the projects like jibx, jax-ws, xfire and so on. So you need to use the tools that come with them.

    But again I am quite new to spring-ws myself so I am not certain.

    Tobias

  7. #7
    Join Date
    Aug 2007
    Posts
    14

    Default

    Tobias,

    I agree with you when you say that Spring WS is a web service stack.
    I also agree with you when you say that jibx, jax-ws, xfire and so on are object data binding framework.

    But I think that Spring Framework helps users to write a web service client, but nothing is specified in the Spring documentation about the generation by the user of the service interface with an object data binding framework like xfire.

    So I think that Spring Framework (and not the Spring Web Service sub-project) should use a default object data binding framework (xfire for example) to generate the service interface and the complex java beans used by the interface.

    what do you think about this idea ?

    Regards.

    Oliver

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •