The user must first have installed JDK, version 5 or higher.
A client program must be created to access the service. The user can choose to use or adapt the example client provided in the following steps:
You will use the wsimport tool (install separately if not included in JDK) to generate the client side artefacts.
Assuming you are working in a directory "wsclient", to generate all the portable artefacts for the client, execute the following wsimport command:
wsclient> %JAVAPATH%\wsimport.exe -p ebi.ws.client \ -keep -target 2.1 https://www.ebi.ac.uk/europepmc/webservices/soap?wsdl
This generates the artefacts in the ebi\ws\client directory. Note: Omitting the p or package name will generate the package in uk\ac\ebi\cdb\webservice.
Write the client or use/adapt the following WSCitationImplPortClient example client program.
Refer to the
Web Services Reference Guide
for the full details of the available methods and their
inputs/outputs.
The example client shown below invokes the following methods and parameters:
Method | Parameters in Example Client |
---|---|
listSearchFields | email = testclient@ebi.ac.uk |
searchPublications |
queryString = HAS_UNIPROT:y HAS_FULLTEXT:y HAS_REFLIST:y
HAS_XREFS:y sort = cited desc cursorMark = * resultType = lite synonym = false email = testclient@ebi.ac.uk |
getDatabaseLinks |
id = for each record in searchPublications source = for each record in searchPublications database = UNIPROT offset = 0 email = testclient@ebi.ac.uk |
getCitations |
id = for each record in searchPublications source = for each record in searchPublications offset = 0 email = testclient@ebi.ac.uk |
getReferences |
id = for each record in searchPublications source = for each record in searchPublications offset = * email = testclient@ebi.ac.uk |
profilePublications |
queryString = HAS_UNIPROT:y HAS_FULLTEXT:y HAS_REFLIST:y
HAS_XREFS:y sort = cited desc profileType = pub_type synonym = false email = testclient@ebi.ac.uk |
getFullTextXML |
id = PMC3280045 source = pmc email = testclient@ebi.ac.uk |
getSupplementaryFiles |
id = PMC3253803 source = pmc email = testclient@ebi.ac.uk |
You can find an example client here
Classes in the package ebi\ws\client are from the portable artefacts generated in the previous step. WSCitationImplService is the portable artefact for the service implementation. WSCitationImpl is the Java interface for the service endpoint generated from the WSDL. The WSDL endpoint is defined inside the WSCitationImplService class. After the client retrieves the endpoint, it invokes the operation required.
The next step is to compile the client classes. The following command compiles WSCitationImplPortClient and writes the class file to the current directory.
wsclient> %JAVAPATH%\javac.exe WSCitationImplPortClient.java
From build/classes/client directory, execute the following command
wsclient> %JAVAPATH%\java.exe WSCitationImplPortClient.java