SOAP Examples

Java

Call of the extractToXML method via JAX-WS:

URL url = new URL("https://cvlizer.joinvision.com/cvlizer/exservicesoap?wsdl"); QName qname = new QName("http://servlets.iex.jv.com/", "SemanticExtractionService"); QName port = new QName("http://servlets.iex.jv.com/", "SemanticExtractionPort"); Service service = Service.create(url, qname); ISemanticExtraction ss = service.getPort(port, IsemanticExtraction.class); byte[] data = ... System.out.println(ss.extractToXML("", "token", "EN", "cvlizer_3_0", data, "pdf"));

Call of the categorize-Method via JAX-WS:

URL url = new URL("https://cvlizer.joinvision.com/cvlizer/exservicesoap?wsdl"); QName qname = new QName("http://servlets.iex.jv.com/", "SemanticExtractionService"); QName port = new QName("http://servlets.iex.jv.com/", "SemanticExtractionPort"); Service service = Service.create(url, qname); ISemanticExtraction ss = service.getPort(port, IsemanticExtraction.class); ArrayList<InputDoc> docs = new ArrayList<InputDoc>(); for ( ... all files to be categorized ...) { InputDoc idoc = new InputDoc(); byte[] data = ... idoc.setData(data); idoc.setFilename(...); docs.add(idoc); } InputDocArray ia = new InputDocArray(); ia.getItem().addAll(docs); OutputDocArray aa = ss.categorize(ia, "hr", "", "token"); for (OutputDoc doc : aa.getItem()) { ... process categorized documents ... }

PHP

Call to the extractToXML method via Soap API:

$client = new SoapClient("https://cvlizer.joinvision.com/cvlizer/exservicesoap?wsdl"); $result = $client->extractToXML("", $token, "EN", "cvlizer_3_0", $data, $format);

Visual Basic

Call of the extractToXML-Method via .NET (4.5):

“ServiceReference” is the name of the service reference class, which is auto-generated by VisualStudio when importing the service from http://cvlizer.joinvision.com/cvlizer/exservicesoap?wsdl For any older version of .NET, the generated Web Reference class is used the same way.

C#

Call of the extractToXML-Method via .NET (4.5):

C# Compatibility Issues

Newer .NET releases do not accept anonymous return values. In this case, the CVlizer WSDL has to be added as “Web Reference” to a .NET project instead of a “Service Reference”. In order to add the web service to an existing Visual Studio Solution please follow these steps:

Add a Service Reference to the Project

In the Service Reference Wizard, go to Advanced Options

In the compatibility section find the option to add a web reference

Navigate to the URL of the WSDL and confirm

You now should be able to create and use a SemanticExtractionService instance to access the web services.

Python

For Python, please utilize the “suds”-SOAP-library as follows (“data” is the binary document):

Ruby (incl. on Rails)

For Ruby, please utilize the “Savon”-gem in version 2.0 and newer the following way (“FORMAT” is the document type like “pdf” e.g.):

The function “response.body” provides a hash including the returned XML for further processing.

Node.js

Please utilize the “soap” library for node.js for accessing the service. It is installed using npm:

An example code for converting a CV is:

 

Binary data has to be converted to Base64 using “Buffer” in order to be properly processed by the API.