Web Service Client Implementation

(Under construction...)

Web Service Client Development under OSGi + Spring Environment

Building an OSGi-based web service client is a bit tricky. The following is the note from my experience.

Tools for Web Service Development

For building service/client for Cytoscape 3, I recommend to use JAX-WS.

Generate Java classes from WSDL

First step to create a web service client is generating Java classes from WSDL. This can be automated by using Apache Maven and Apache CXF plugin.

The following is an example to generate Java code from NCBI Entrez Utilities web service WSDL:

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-codegen-plugin</artifactId>
      <version>2.1.3</version>
      <executions>
        <execution>
          <id>generate-sources</id>
          <phase>generate-sources</phase>
          <configuration>
          <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
          <wsdlOptions>
            <wsdlOption>
              <wsdl>
                http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/eutils.wsdl
              </wsdl>
            </wsdlOption>
          </wsdlOptions>
        </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
      </execution>
    </executions>
  </plugin>
  </plugins>
</build>

Generate bundle

Outdated_Cytoscape_3.0/WebServiceImpl (last edited 2011-02-24 15:40:39 by PietMolenaar)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux