Fórumok

Liferay Salesforce.com integration

Nicolas Raoul, módosítva 13 év-val korábban

Liferay Salesforce.com integration

New Member Bejegyzések: 2 Csatlakozás dátuma: 2010.07.02. Legújabb bejegyzések
Hello all,

Is there any way to integrate Salesforce.com into a Liferay portal without writing code?

If not, a solution would be to create a new portlet that calls Salesforce.com's Web Services, but I am wondering if anything already exists that I could just reuse.

I am not asking for perfect integration of everything, but if you know of a portlet that shows some data or allows any Salesforce.com action that would be great already :-)

Thank you!
Nicolas Raoul
thumbnail
Amos Fong, módosítva 13 év-val korábban

RE: Liferay Salesforce.com integration

Liferay Legend Bejegyzések: 2047 Csatlakozás dátuma: 2008.10.07. Legújabb bejegyzések
Hi Nicolas,

I'm not aware of any SalesForce integration portlets. If you write one, it would great if you share it with the community! I would be very interested in seeing how you do it =).
thumbnail
Brian Ko, módosítva 12 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 70 Csatlakozás dátuma: 2010.02.11. Legújabb bejegyzések
Hi Nicolas,

Have you finished the project? Then, I wonder how you handled user authentication.

Brian
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: Liferay Salesforce.com integration

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
I haven't tested this out, but there's a salesforce portlet in the svn incubation trunk:

http://svn.liferay.com/repos/public/plugins/incubation/portlets/salesforce-portlet/
thumbnail
Brian Ko, módosítva 12 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 70 Csatlakozás dátuma: 2010.02.11. Legújabb bejegyzések
Thank you Hitoshi,

Even if the portlet does not work (or does not have useful piece), it shows how to use salesforce API with user security token.

Brian
thumbnail
Rick Osborn, módosítva 11 év-val korábban

RE: Liferay Salesforce.com integration

New Member Bejegyzések: 14 Csatlakozás dátuma: 2011.05.24. Legújabb bejegyzések
Nicolas Raoul:

Is there any way to integrate Salesforce.com into a Liferay portal without writing code?

If not, a solution would be to create a new portlet that calls Salesforce.com's Web Services, but I am wondering if anything already exists that I could just reuse.

I am not asking for perfect integration of everything, but if you know of a portlet that shows some data or allows any Salesforce.com action that would be great already :-)


Just wondering if anyone has worked with the new 6.1 EE Salesforce port let. I logged into it, and am now unsure
what to do with it. Don't see any docs anywhere.
thumbnail
Brian Ko, módosítva 11 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 70 Csatlakozás dátuma: 2010.02.11. Legújabb bejegyzések
I heard that sales force portlet is more mature and out of incubator. You can download it from community plugin site?

Brian
thumbnail
Rick Osborn, módosítva 11 év-val korábban

RE: Liferay Salesforce.com integration

New Member Bejegyzések: 14 Csatlakozás dátuma: 2011.05.24. Legújabb bejegyzések
Brian Ko:
I heard that sales force portlet is more mature and out of incubator. You can download it from community plugin site?

Brian


Liferay 6.1 EE has a salesforce port let for download. I don't see any configuration instructions though.
I've authenticated it against my salesforce account and don't see anything else.
Xav NYC, módosítva 11 év-val korábban

RE: Liferay Salesforce.com integration

New Member Bejegyzések: 23 Csatlakozás dátuma: 2012.09.27. Legújabb bejegyzések
Hi,
I'd like to know if the salesforce portlet is now available. I checked the Liferay market place and can't find anything.
Any documentation about what it does would also be useful.
Thanks.
X.
Kartheek Paidipati, módosítva 10 év-val korábban

RE: Liferay Salesforce.com integration

New Member Bejegyzések: 3 Csatlakozás dátuma: 2012.02.23. Legújabb bejegyzések
SalesForce can easily do a hand shake with any external applications( for data push and pull...using REST API & OAuth will be easy...
thumbnail
Jaynil A Bagdai, módosítva 10 év-val korábban

RE: Liferay Salesforce.com integration

Regular Member Bejegyzések: 119 Csatlakozás dátuma: 2012.03.03. Legújabb bejegyzések
Hi there,

I know that this post is too old.
Are you still looking for a portlet with Salesforce Integration in Liferay?
If yes I can develop one and can share to community.

Let me know.
thumbnail
Kathryn Brewer, módosítva 9 év-val korábban

RE: Liferay Salesforce.com integration

New Member Bejegyzések: 2 Csatlakozás dátuma: 2014.01.09. Legújabb bejegyzések
We are looking for a Salesforce.com/Liferay portlet. Our client has a contact page with various contact form options and each captures data that needs to be written back to various SalesForce databases depending upon the product type.

What do you need to quote and how long would it take to develop this?

Kathryn Brewer
Xav NYC, módosítva 8 év-val korábban

Re: [Liferay Forums][General] RE: Liferay Salesforce.com integration

New Member Bejegyzések: 23 Csatlakozás dátuma: 2012.09.27. Legújabb bejegyzések
Hi,
Thanks for your message. I no longer work on that project so I have no immediate needs for it. However if you develop it I would be happy to help test it.
Regards.
X.
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "Jaynil A Bagdai from liferay.com" <forums@liferay.com>
Date: Thu, 21 Nov 2013 12:37:10
To: forums@liferay.com<forums@liferay.com>
Reply-To: "forums@liferay.com" <forums@liferay.com>
Subject: [Liferay Forums][General] RE: Liferay Salesforce.com integration



Hi there,

I know that this post is too old.
Are you still looking for a portlet with Salesforce Integration in Liferay?
If yes I can develop one and can share to community.

Let me know.

To view the thread, follow the link below:
https://www.liferay.com/community/forums/-/message_boards/view_message/31738451
--
Liferay.com <https://www.liferay.com>
thumbnail
Naresh Reddy Kallamadi, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Regular Member Bejegyzések: 120 Csatlakozás dátuma: 2014.07.09. Legújabb bejegyzések
Hi Nicolas Raoul,

Did you find any solution to integrate liferay with salesforce. I am working to load data from salesforce to liferay.


Thanks,
Naresh.
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi.
A few weeks ago I released the "OSGi" bundle of the SOAP connector for Salesforce.com and a sample application of SOAP APIs via the Gogo Shell command on Liferay 7:
Salesforce SOAP API Client OSGi Bundle
Liferay 7 Gogo Shell Salesforce Client
Liferay 7: Demo Salesforce Gogo Shell Command

Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio Musarra,

I am working with Liferay and Salesforce right now? could you please give some suggestion?

Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
The only integration experience between Liferay 7 and Salesforce is what I mentioned earlier, specifically designed to write a series of articles for my blog and to help my colleague who needed to integrate Liferay 7 and Salesforce, so that a new Liferay user becomes registered as lead Salesforce.

API usage is very simple and well-documented. In my case I preferred to use APIs via SOAP. For more info read Salesforce APIs – What They Are & When to Use Them

I do not know if only this can help you.

Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your suggestion, I will follow your post to implement integrated salesforce to liferay.

It is very helpful for me, thank you very much!

Best regards,
Hung Tran
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

I have a question, can I use Enterprise WSDL SOAP API WSDLs, if yes, how can I do that?

Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hello Hung.
Yes, of course. When generating your Stubs using the WSC tool you must input the WSDL Enterprise.

Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you so much for your reply.

Actually I am a beginner with liferay and salesforce, so can you please tell me more detail about what I need to do?

Thank you in advanced!
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hello Hung.
You can try this Force.com Web Service Connector (WSC).
Sorry, but now I have to go, I'm in vacation.
As soon as possible I will try to make a post on my blog.

Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antinio,

Thank you very much for your help!

I will follow as you suggested.
Best regards,
Hung Tran
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your post, I built up my program successfully by your suggestion.
I used the following add the following line to build.gradle:

compile group: 'com.force.api', name: 'force-wsc', version: '40.1.1'
compile group:'it.dontesta.labs.liferay.salesforce.client.soap', name:'salesforce-client-soap', version:'1.0.1'

And build up is ok, but I have 1 remaning problem, I want to use Enterprise WSDL SOAP API instead of partner WSDLs , I followed you guide on https://github.com/forcedotcom/wsc to generate outputjarfile as you mentioned, but I dont know how to import it into my liferay 7 portlet project. I did as below to import it into library,
-In Eclipse, go to Project > Properties > Java Build Path > Libraries > Add External JARs, then add the generated JAR to this list.

The java source code is ok until i use gradle build to build project, the following error occur:

error: package com.sforce.soap.enterprise does not exist import com.sforce.soap.enterprise.EnterpriseConnection;
error: package com.sforce.soap.enterprise does not exist import com.sforce.soap.enterprise.QueryResult;
error: package com.sforce.soap.enterprise does not exist import com.sforce.soap.enterprise.SaveResult;

Please give me any ideal to solve this problem.

Thank you in advanced!
Best regards,
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
I recently released version 1.0.2 of Salesforce SOAP client that also includes the Enterprise part.

Try changing the version from 1.0.1 to 1.0.2 and make the build, it should be successful.

Remember to install the new bundle 1.0.2 on your Liferay instance.

Best Regards.
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
I've updated the project salesforce-client-gogoshell-command with the new version 1.0.2 of the salesforce-client-soap, which now also includes the enterprise part.

The loginEnterprise and getNewestAccountEnterprise method, using the enterprise feature of the Salesforce SOAP API Connector.

I hope that with this other example you can solve.

Best Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you so much for your valuable time for spending on my issues.

As you mentioned before, I changed the version from 1.0.1 to 1.0.2, and it solved some error lines in my portlet, but remaining some line that use com.sforce.soap.enterprise.sobject.*. Could you please give me any ideal. I do not know what is this because I receive this jar library from another partner, so I think I need to import jar library locally so that I can use in my application.

I tried with guide from: https://web.liferay.com/web/user.26526/blog/-/blogs/osgi-module-dependencies for all option but my portlet cannot detect imported libraries.

Thank you in advanced!
Best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
Can you share the project?
So maybe I can help you better.

Best regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your help!

Actually this is a private library from our partner, so I cannot share this, but it is also a Enterprise WSDL SOAP jar library, and add some more functions, I just want to add it into my project and use it for my portlet, but I could not.

I followed this guide: https://web.liferay.com/web/user.26526/blog/-/blogs/osgi-module-dependencies many times but still not success to add it into my project as I mentioned above.

I think there was some lack steps in above guide, can you please suggest me for lacked steps for any option in above guide?

My skype account is hungtran211190, If you can, please contact me directly for more convenience.

Thank you and best regards,
Hung Tran
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your helps!

Finally I think I have to implement an OSGI bundle by my self to meet our requirement, maybe it is same as your "Salesforce SOAP API Client OSGi Bundle", but some different content.

I refered to write the first OSGI bundle: http://proliferay.com/writing-your-first-osgi-service-in-liferay-7/

But the difficult one is Enterprise WSDL is a jar file that was generated from xml file and salesforce library, so I dont know how to get it's content and pack it into my OSGI service bundle, can you please give some suggestions about this solution and the way I am going to do?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hello Hung.
If you want include the jar into OSGi bundles then add compileInclude in build.gradle and you specify your jar.

dependencies {
   ...
   compileInclude files('lib/ucp-12.2.0.1.0.jar')
   ...
}


This directive includes the jar inside your bundle and also manifests MANIFEST correctly. You should, if necessary, declare additional exports to the bdn. You can see the images below that show the result obtained.

Bundle OSGi with other jar included by compileInclude of Gradle

Add Jar in lib Liferay Project directory

If you remember well, in the answers to Stackoverflow Liferay 7 add salesforce jar library error I mentioned the compileInclude directive

I think this is what you would like to get.

Best Regards,
Antonio
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your answers!

I am sorry that I read your answer in Stackoverflow but I am a beginner on Liferay, Gradle, bnd... So I did not get meaning of that answer, but now it is ok.

I applied your suggestion and I build success project module, but when I deploy it into tomcat server then the error below occur:
ERROR [http-nio-8080-exec-3][JSONWebServiceServiceAction:97] Access denied to com.liferay.portal.workflow.kaleo.service.KaleoDefinitionService#getKaleoDefinitions

So my portlet is show as a error one, and it is not displayed on the add menu. Is it relate to my external classes? I searched by google by this error message but no suitable result for these key word. Do you have any ideal?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hello Hung.
You can try to access to Gogo Shell via
telnet localhost 11311 
and type the
diag
command, in this way you could see if any errors. You can see also the state of the your bundle typing the
lb
command.

Best Regards,
Antonio.
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hello Hung.
If you want now you can also build Salesforce SOAP API OSGi bundle with its own Web Services Enterprise WSDL.

Best Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you so much for the guide how to build osgi bundle!

I am sorry to reply you late because I lost time to try with some option to solve new issue but I cannot.

I have solved this problem by add "lib" folder under project, copy jar library into it, then add below lines into build.gradle. but another issue occur when I use gogo shell command line "diag":
"Unresolved requirement: Import-Package: com.google.appengine.api.urlfetch".

I added below line to build.gradle:
compileInclude group: 'com.google.appengine', name: 'appengine-api-1.0-sdk', version: '1.9.54'
new issue occur:
"Unresolved requirement: Import-Package: com.google.api".

Then I added:
compileInclude group: 'com.google.api-client', name: 'google-api-client', version: '1.22.0'
new issue occur again.

I m trying to add required libraries, but It take a long time, and I am not sure that it can be fixed by that solution. Do you have any ideal?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hello Hung.
If this package not using then add exclusion from Import-Package directive on bnd (you can see example at https://github.com/amusarra/salesforce-client-gogoshell-command/blob/master/bnd.bnd)

Best Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Many thanks for your suggestion!

I added below line to bnd.bnd:
Import-Package: \
!com.google.api,\

Maybe the issue with google api gone, but I have new issue with liferay its self:
ERROR [Framework Event Dispatcher: Equinox Container: f06c5e9e-3e7e-0017-1398-d87296d3c0f7][SalesforceAPIAccess:97] FrameworkEvent ERROR
org.osgi.framework.ServiceException: Exception in org.apache.felix.scr.impl.manager.SingleComponentManager.getService()
...

Caused by: java.lang.NoClassDefFoundError: com/liferay/portal/kernel/portlet/bridges/mvc/MVCPortlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

Then i add below line to bnd.bnd (some lib I use in my portlet):
Import-Package: \
!com.google.api,\*

Then again new error from another package of com.google.common occur on error message that cannot import that package.

I am trying to exclude required packed as you suggested but I think it cannot solve my problem, do you have any ideal?
currently it is:
Import-Package: \
!com.google.*,\
!com.sforce.ws.shade.org.apache.commons.collections.*,\
!org.apache.*,\
!org.joda.*,\
*

Looking forward to hear from you.
Thank you in advanced!
Best regards,
Hung Tran
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your helps!

Finally I solved my issue by excluded some required libraries that osgi show error when I deploy portlet.

But I think there was some risk with this solution, can you please give me any advice?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

I am trying to build Salesforce SOAP API OSGi bundle with its own Web Services Enterprise WSDL as you suggested, but it has error:
Error: Unable to find compiler. Make sure that tools.jar is in your classpath: java.lang.ClassNotFoundException: com.sun.tools.javac.Main

Im tried to add more parameter to [wsc-partner] execution to specify the absolute path of tools.jar, but then the error message: no manifest found error message occur.

Do you have any ideal for this?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
Check if all Java environment it's ok (JAVA_HOME, PATH).

In CI env and my local env the build it's correct. You can check at https://travis-ci.org/amusarra/salesforce-client-soap

Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much!

But I tried to generate the stubs successfully by java compiler below:
java -classpath force-wsc-40.1.1-uber.jar;js.jar;ST-4.0.8.jar;tools.jar com.sforce.ws.tools.wsdlc Enterprise.wsdl enterprise_stub.jar

while all of above libraries are in same folder.

But by maven it is failed as you suggested, I am finding a method to add classpath parameter to maven command to generate stubs, but still not success.

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
Which operating system you use? Which Maven version you use? Which maven command you use?

Where do you run maven? From IDE or command line?

Try to run maven command with -X option and you report the output.

I'm pretty sure the problem is related to the configuration of your local environment.

Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank for your reply!

I use windows 8.1, apache-maven-3.5.0, and the below commands is what I tried:
I set JAVA_HOME is C:\Program Files\Java\jdk1.8.0_121, M2_HOME is C:\apache-maven-3.5.0
Path: C:\Program Files\Java\jdk1.8.0_121;C:\Program Files\Git\cmd;%M2_HOME%\bin;

I ran command line from GIT BASH:

mvn -Dsalesforce.wsdl.enterprise.path=C:/SOAP/code/Enterprise_WSDL.wsdl clean package
also
mvn -Dsalesforce.wsdl.enterprise.path=C:\SOAP\code\Enterprise_WSDL.wsdl clean package

The error show:
java.lang.ClassNotFoundException: com.sun.tools.javac.Main
Error: Unable to find compiler. Make sure that tools.jar is in your classpath: java.lang.ClassNotFoundException: com.sun.tools.javac.Main

Out put of: mvn -Xsalesforce.wsdl.enterprise.path=C:\SOAP\code\Enterprise_WSDL.wsdl clean package

[ERROR] No plugin found for prefix 'salesforce.wsdl.enterprise.path=C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Tran\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'salesforce.wsdl.enterprise.path=C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Tran\.m2\repository), central (https://repo.maven.apache.org/maven2)]

Btw, temporary I solved this issue by add following lines to bnd.bnd, I detected that they are not existed libraries from google, but I dont know how and why the Unresolved requirement: Import-Package error occur

Import-Package: \
!com.google.appengine.repackaged.com.google.common.annotations,\
!com.google.appengine.repackaged.com.google.common.logging,\
!com.google.appengine.repackaged.com.google.common.html,\
!com.google.appengine.repackaged.com.google.common.math,\
!com.google.appengine.repackaged.com.google.common.parameterset,\
!com.google.appengine.repackaged.com.google.common.*,\*

I exclude them and my program run normally, can you please tell me why it is occurred? And if I use maven to generate SOAP client successfully, then do I need to use the exclude commands?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
I've been able to replicate your issue on Windows 8.1. To fix this problem you need to make the correct PATH environment variable export for java, you have missing a part of the path, the correct path C:\Program Files\Java\jdk1.8.0_121\bin. The java path must precede all the others.

$ export PATH=/C/Program\ Files/Java/jdk1.8.0_121/bin:$PATH


Attached is the output of the successful build maven on windows. You also find the screenshot of the error that I was able to replicate the cause.

P.S: Do you remember to vote for my response to Stackoverflow?

Best Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your answer!

I did as you suggested (correct java path, and put it at first), but nothing change, I ran with -X option then I saw that in output:

Maven home: C:\SWSetup\apache-maven-3.5.0
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_92\jre
Default locale: ja_JP, platform encoding: MS932
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "windows"

I dont know why is it jre, I am finding away to fix it but still cannot.

Btw can you please explain to me about OSGI issue, or how can I investigate it, I really want to understand but I dont know how to.

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung.
It seems strange that even you will not be able to make a successful build. Attached is the build maven output with the debug option and the WSDL file specification. Also the environment of my local environment.

The command maven:

mvn -X -Dsalesforce.wsdl.enterprise.path=/C/Salesforce/enterprise_antonio_musarra_blog.wsdl  clean package


The important line to monitoring:

[DEBUG] Executing command line: [C:\Program Files\Java\jdk1.8.0_144\bin\java.exe, -DcompileTarget=1.8, -jar, C:\Users\Antonio\salesforce-client-soap/libs/force-wsc-40.1.1-uber.jar, C:/Salesforce/enterprise_antonio_musarra_blog.wsdl, C:\Users\Antonio\salesforce-client-soap/libs/enterprise-1.0.3-SNAPSHOT.jar]
[WSC][wsdlc.main:71]Generating Java files from schema ...


The my PATH env:

PATH=/C/Program Files/Java/jdk1.8.0_144/bin/:/C/apache-maven-3.5.0/bin/:/c/Users/Antonio/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Antonio/bin:/c/ProgramData/Oracle/Java/javapath:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/cmd:/usr/bin/vendor_perl:/usr/bin/core_perl
PS1=\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$


Try to make a comparison and you will see that you will be able to solve it.

Best Regards,
Antonio
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your suggest!

But I have to deal with OSGI and Google API first, then I will back to this issue, because the priority task.

Thank you very much and hope to receive more support from you for next issue.

Best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Hi Hung,
I remember you solved the Google APIs after my suggestion to exclude them, and then you've successfully deployed your portlet.

Now what problem do you have? In the OSGi context I have never used the Google APIs.

Package exclusions are a very common practice in the OSGi environment, especially when using external libraries that are not OSGi bundles.

If you have no experience on OSGi, I recommend reading the OSGi in Action book.

Best Regards,
Antonio.
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your recommendation, I will read that book to understand more about OSGI.

I need to investigate so that is there any impact of that exclusion command to my program to make sure that my program can run well.

I am reading some guideline about OSGI, but it seems be hard to investigate the impact, right? Do you have any fast way to investigate them by your experience?

Update:
I found another way to fix this issue, I used runtime group in build.group instead of compileInclude group, and the resolution:=optional in bnd.bnd, and my program can run well. do you have any ideal for this approach?

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Hung Tran, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2017.07.20. Legújabb bejegyzések
Hello Antonio,

Thank you very much for your valuable time for spending my issue, finally I closed the SOAP issue.

But currently I have another issue with back button, I described it in another post (below link), could you please give me any suggestion on that:
https://web.liferay.com/community/forums/-/message_boards/message/93454097

Looking forward to hear from you.
Thank you and best regards,
Hung Tran
thumbnail
Antonio Musarra, módosítva 6 év-val korábban

RE: Liferay Salesforce.com integration

Junior Member Bejegyzések: 66 Csatlakozás dátuma: 2011.08.09. Legújabb bejegyzések
Dear Sandeep.
Try to see the project Salesforce Liferay Gogo Shell Command Client. In this sample project, I have developed a series of Gogo Shell commands to interact with Salesforce. Conceptually it does not change anything compared to what you want to get.

On your MVC portlet module you need add the dependency of the salesforce-client-soap bundle. For Maven:

<dependency>
	<groupid>it.dontesta.labs.liferay.salesforce.client.soap</groupid>
	<artifactid>salesforce-client-soap</artifactid>
	<version>1.0.1</version>
</dependency>


for Gradle:

compile group:'it.dontesta.labs.liferay.salesforce.client.soap', name:'salesforce-client-soap', version:'1.0.1'


After adding this dependency you can start writing your code using for Salesforce API. However, remember to install the Salesforce OSGi Client SOAP bundle on your Liferay instance. You can follow the instructions given here How to install in Liferay 7 CE/DXP

At this point you should have your integration with Salesforce :-)

I hope I was clear.

Regards,
Antonio.