8

Question about Core service "java client", in order to be able to connect with a java application to Tridion, a certain webservice "CoreService" should be made available on the server side, is that right?
So need to setup that on server side configuration, or the CoreService webservice is there available by default?
If yes, what is its default URL in case of SDL Tridion 2011 sp1? How will work the login/user authorization process, it goes then without SSO?

I tried as
CoreServiceFactory.setDefault("http://tridioncmdomain.com", username, password);
ICoreService client = CoreServiceFactory.getBasicHttpClient(); with core service path: String CORE_SERVICE_PATH = "/webservices/CoreService2012.svc";

also tried: "/webservices/CoreService2011.svc", without success.

Such a java client could be used to connect to Tridion from anywhere, of course from a location where the tridion server is accessible, right?

Thanks, bvl

3 Answers 3

5

Core service will be available on the Server where you have installed the SDL Tridion Content Manager. The default URL would be - http://[Content Manager Server URL]/webservices/CoreService2011.svc

You need to setup the authentication for the same in the IIS webserver on the Content Manager Server and by default it would inherit the Windows Authentication - If you are using LDAP authentication for your Content Manager, you may need to configure the Core Service as well to support the LDAP authentication as mentioned in the SDL Live Content Documentation.

You should refer the SDL Live Content Documentation to get basic idea of what core service is and how its client (.NET and Java) will work to get answers to your basic questions.

You may want to refer THIS (requires login) link.

2
  • So the reason that http://[Content Manager Server URL]/webservices/CoreService2011.svc is not available, not reachable is because the configuration settings on server side are limiting that approach? When I send to that URL an http request I get an unexpected (404) response. As our tridion instance is under "https://" instead "http://" that may also be a reason right? Thanks!
    – BVL
    Commented Sep 23, 2013 at 10:39
  • 1
    Yes that's correct. You may need to play with the web.config for the CoreService WCF service to make it available on HTTPS along with other settings Commented Sep 23, 2013 at 10:53
5

The way how Java client will authenticate depends on the IIS and WCF security settings. If IIS has Windows authentication enabled and WCF settings are also set to use Windows authentication (defaults), then Java client will always automaticaly use the current OS user credentials to authenticate. To be able to specify different user/password, the IIS basic authentication must be enabled instead, and WCF service also must be configured to use "TransportCredentialOnly" with "Basic" authentication. To set user name and password in Java client, use the following code (call it after getting the client/endpoint instance, but before first operation call):

BindingProvider provider = (BindingProvider)client;
provider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "domain\\user");
provider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "password");
1
  • In first place a response to my request going to "/webservices/CoreService2011.svc" is meaningless as seems the service is not up there and not running. Iwas even unable to start the "log in" process I assume. It may be related to HTTPS connection and server configuration we have there...
    – BVL
    Commented Sep 23, 2013 at 10:42
5

The Core Service will be there available by default on any 2011 or 2013 installation. When using .NET to connect to the SDL Tridion Core Service, we can either use the available DLL (with the proxy classes in there) or have Visual Studio generate the proxy classes for us. With Java you have to generate the proxies yourself, or use those from somebody who did the job for you.

Mihai Cădariu has been so nice to place his proxy classes in a Google code (open source) project, and he has written a few blogs about them:

Check those out and you will have everything you need to get started. Keep in mind these examples are written against SDL Tridion 2013, to have them work against version 2011, you will need to regenerate the proxies as the endpoints are different.

Additionally, if your CMS is on HTTPs, then the Core Service can also be setup on HTTPS and you will find it there. Check out the details in the online documentation (requires login).

5
  • Yes, I found these earlier, I tried to use them but still seems that I can't access CoreServices2011.svc as mentioned there... Like it's not available at all on the given URP/path.
    – BVL
    Commented Sep 23, 2013 at 10:36
  • @BVL please note that Mihai is connecting to the "CoreService2012" endpoint, which is only available on SDL Tridion 2013, if you are using 2011, you will probably need to regenerate those proxy classes with the correct endpoints. You should be able to get a response in a browser when you try tridioncmdomain.com/webservices/CoreService2011.svc if not then you have a different problem, which you should address first. Commented Sep 23, 2013 at 10:43
  • yes, I noticed that in the code. Still when I try to get a response in my browser tridioncms.domain.com/webservices/CoreService2011.svc seems that I get only NOT FOUND response...What may be wrong? Is it possible that this service is down or disabled completely? Also our domain URL is starting with HTTPS instead of HTTP. Content editing works on URL: tridioncms.domain.com/WebUI Thanks!
    – BVL
    Commented Sep 23, 2013 at 10:53
  • @BVL if your CME is installed on HTTPS and properly setup, then I believe also the Core Service will be set to HTTPS, it can't really be off, then your CMS wouldn't function properly. I'll edit my answer and add a documentation link in there regarding the HTTPS setup of the Core Service Commented Sep 23, 2013 at 11:55
  • Thanks, Bart! It may happen that it's on a different path...Will have to check this through.
    – BVL
    Commented Sep 23, 2013 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.