afawcett / apex-codeanalysis

Force.com Apex code analyser using the Tooling API and Canvas
BSD 3-Clause "New" or "Revised" License
50 stars 49 forks source link

Failing to access WSDL #2

Open dsmorris85-SFDC opened 8 years ago

dsmorris85-SFDC commented 8 years ago

Receive the following error when attempting to access Canvas App from Salesforce:

Failed to access the WSDL at: file:/tmp/build_ada2c53c8bd4854f664bb492af739e64/src/main/resources/toolingapi.wsdl. It failed with: /tmp/build_ada2c53c8bd4854f664bb492af739e64/src/main/resources/toolingapi.wsdl (No such file or directory).

--- Steps to replicate ---

  1. Download current source code
  2. Run app on Heroku
  3. Setup Salesforce Connected App, and link it to Heroku
  4. Upon encountering errors on Canvas.jsp, perform following steps to make compatible with java 1.7:
    • Add a new file called ‘system.properties’ to the root dir, with this line in it: java.runtime.version=1.7. This tells Heroku to operate on java 1.7 rather than it’s default 1.8
    • In the ‘pom.xml’ update Java to “1.7”
    • In Heroku add an environment setting ‘CANVAS_CONSUMER_SECRET’, which matches the Salesforce connected app secret.
    • Once step 4 completed, attempt to access Canvas App from with Salesforce, and observe attached error.

screen shot 2016-07-08 at 23 00 49

dsmorris85-SFDC commented 8 years ago

I've uploaded my code onto a forked copy of your repo, if it helps any!

Konstryktor commented 8 years ago

Unfortunately, I met with the same problem. And I did't find any way to run this so necessary for me application.

afawcett commented 7 years ago

Yes i recall this being an issue when i developed it. This was sometime ago though. And after some Googling i am still not recalling what it was. The trick is to get it to load the WSDL from the class path not the file system as i recall. I'll have to spend some more time on this to set it up again. Sorry no immediate answer.

Konstryktor commented 7 years ago

Thank you for your answer Andrew. Now It doesn't matter for me. But I want to say that your answer this (https://github.com/afawcett/apex-toolingapi/issues/48 and your Tooling API wrapper in this app) and your blog(https://andyinthecloud.com/2013/02/02/spring-cleaning-apex-code-with-the-tooling-api/) really help me to write my own tool for finding unused methods in Apex and even in some cases in Visualforce. Maybe, It will be interesting for you (https://github.com/Konstryktor/ApexUnusedMethodsFinder). Thanks a lot. It will be impossible without your job.

afawcett commented 7 years ago

Thanks @Konstryktor for sharing, much like ApexUML, i prefer a totally native solution which your approach brings, great job! Do you plan on making it available as a package. I am pretty sure there is a hunger from the community for this. Once again, great work! 👍

Konstryktor commented 7 years ago

Hello @afawcett . I am software engineer in EPAM Systems. I think it's a good idea to share this tool to Salesforce Community and make it available as a "free package" on https://appexchange.salesforce.com/. Some classes from your application https://github.com/afawcett/apex-umlcanvas are used in this tool. Could I use them in this "free package"?

afawcett commented 7 years ago

Sure, the BSD license used here allows this, thanks for asking though. 👍