Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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("", "password", "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", "test", "testpassword");
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("", $password, "EN", "cvlizer_3_0", $data, $format);

Visual Basic

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

Dim client = New ServiceReference.SemanticExtractionClient
Dim data() As Byte
data = …
Console.Out.WriteLine(client.extractToXML("", "password", "EN", "cvlizer_3_0", data, "pdf"))

“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):

ServiceReference.SemanticExtractionClient client = new ServiceReference.SemanticExtractionClient();
byte[] data = ...
Console.Out.WriteLine(client.extractToXML("", "password", "EN", "cvlizer_3_0", data, "pdf"));

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):

from suds.client import Client
url = "https://cvlizer.joinvision.com/cvlizer/exservicesoap?wsdl"
client = Client(url)
xml = client.service.extractToXML('','password','EN','cvlizer_3_0', data, 'pdf')

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.):

require 'savon'
client = Savon.client do
  endpoint "https://cvlizer.joinvision.com/cvlizer/exservicesoap"
  namespace "http://servlets.iex.jv.com/"
end
 
content = File.read(filename)
base64_content = Base64.encode64(content)
 
response = client.call(:extractToXML, message: { username: "", password: "PASSWORD", language:"EN", model:"cvlizer_3_0",inputdata:base64_content, inputdatatype:"FORMAT" })

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:

npm install soap

An example code for converting a CV is:

var soap = require('soap');
  var fs = require("fs");
    var url = 'https://cvlizer.joinvision.com/cvlizer/exservicesoap?wsdl';
    base64 = new Buffer(BINARYDATA).toString('base64');
    if (err) throw err;
      var args = {username:'',password:'PASSWORD',language:'DE',model:'cvlizer_3_0',inputdata:base64,inputdatatype:'pdf'};
	soap.createClient(url, function(err, client) {
	    if (err) throw err;
        client.extractToXML(args, function(err, result) {
		    if (err) throw err;
            console.log(result);
        });
    });
  });

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

  • No labels