Is it possible to set an object's Multilingual metadata via the LAPI ?
In my case, I want to set the French Name field of a Folder, in Content Server 10.
Hi Paulo,
No, it’s not possible.
As noted in the CS 10 SDK release notes, LAPI 9.7.1 is the last available version of LAPI, which has no support for any CS 10-specific features.
If you wish to manipulate multilingual metadata, you will need to use the Content Web Services API which is a core component of Content Server.
Cheers,
Kyle
Thanks for the confirmation, Kyle.
It's possible to use LAPI to set the multilingual names on a node. Normally you'd use the UpdateObjectInfo function and set the "Name" key to a string. However, you can also pass in a dictionary with key-value pairs of the language code and the language specific value. For example:
LLValue names = new LLValue().setAssoc();names.add("fr", "Value in French"); names.add("en_US", "Value in US English");
objectInfo.add("name", names)
// call UpdateObjectInfo with objectInfo
I don't think a similar workaround exists for other multilingual attribute types. However, since WebServices is actually a LAPI call in disguise, you might be able to hack together a workaround to call the WebServices code via LAPI. Attached is the com.opentext.api.LAPI_APISERVICE stub that you can use to invoke WebServices from LAPI.
Hi Chris,
CS 10 Web Services is not a LAPI call in disguise. 9.7.1 Web Services used to use LAPI binaries to issue a call into Content Server, however, 10 no longer does so.
Although it uses an APIHandler for unmarshalling an inbound request, it should not be treated as a “LAPI” call.
Please keep in mind that LAPI 9.7.1 is and continues to be the last release of LAPI.
At some point in the future, when appropriate, LAPI support from the Content Server side will cease to be.
Any new development should not rely on LAPI.
Best regards,
To clarify, you are making LAPI calls to InvokeService directly?
Again, LAPI is going away so any solution you have written in this fashion will be relatively short-lived.
When you say that you hope we “make WebServices visible without requiring a servlet engine” what are you envisioning?
A web service is a service deployed on the web server, so you need to have something to execute that service, hence the servlet and/or IIS .NET infrastructure.
The nature of web services, even outside the context of Content Server, requires the deployment of a web service within the web environment.
Perhaps what you are suggesting is you would like to be able to issue requests to Content Server, maybe not necessarily called “WebServices” per se, but some API, that does not require a middleman application?
Are you suggesting a RESTful API?
Thanks,
Interesting. I didn't know that was possible. Is there a simple way to enable the WebServices server with .NET? thanks
You don’t need to do anything special to get it going under IIS as it’s hosted as a .NET application.
I believe Jason Smith has posted a getting started guide in the Sample area of this community.
Here's the truth about LAPI.
Open Text has been saying that 9.7.1 was the last release since 9.7.1 came out, I believe in 2006. Clearly, they are not in any particular hurry to retire it, however it poses some risks for them so the party line has to be that we're all on our own.
Those risks include the fact that the .Net version is built on top of J#, which Microsoft has backed away from (not supported by a CLR > 3.5.1) and which, if any of you has tried to install recently has some serious GAC problems.
If J# won't work, Open Text can't do anything about it; meaning they can't support anything you do with LAPI while that risk is out there. That's why there is no 64 bit version and why no new Content Server features are being added... Those DLLs are staying as-is and anything we can get them to do properly is a bonus.
On the other side, Open Text is also between a rock and a hard place because they still have some modules that depend on .Net LAPI (AGA/SharePoint Web Parts for one) and by their own admission the support for Categories and Attributes is not neary as robust in the current Web Services offering.
So, my advice: If you can do what you need to do using EWS (or whatever they call it now), use EWS. If you can't or have other code that already works with LAPI; don't panic quite yet... do what you have to do. Just remember, your .Net LAPI solutions will be 32 bit and must be targeted for .Net versions lower than 4.0. Content Server can be 64 bit; it's the LAPI client you build that will have to be 32.