Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

The Web Service Client

Marco Brandizi edited this page Mar 20, 2014 · 13 revisions

This is the Maven module myequivalents-wscli. You can link this module into your project the same way shown above about the core package, the only difference is that 'myequivalents-core' is replaced by 'myequivalents-wscli'.

The client can be used as shown in the JUnit tests:

// /myequivalents is the application name (see previous section)
// /ws is the prefix configured by myequivalents-web/src/main/webapp/WEB-INF/web.xml 
// and in most cases there is no need to change that
EntityMappingManager mmgr = new EntityMappingWSClient ( "http://www.yourserver.net:8080/myequivalents/ws" );

EntityMappingSearchResult result = mmgr.getMappings ( false, "test.testweb.service6:acc1", "test.testweb.service6:acc2" );
// EntityMappingSearchResult is the same class shown in the other examples above

As you can see, the requests syntax for the web service is the same as the one used with the core API. As explained in the introduction, at the moment only the getMappings request is implemented.

'''TODO''': as you can see above, for the moment the managers for the web service client are created directly. This will change soon, for coherence and other practical reasons, we will change the code so that this module too will use the Spring-based approach, described elsewhere. For instance, this will allow one to configure a client that has a local cache, or some other filtering.