apex-codeanalysis icon indicating copy to clipboard operation
apex-codeanalysis copied to clipboard

Failing to access WSDL

Open dsmorris85-SFDC opened this issue 9 years ago • 7 comments

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 avatar Jul 08 '16 22:07 dsmorris85-SFDC

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

dsmorris85-SFDC avatar Jul 08 '16 22:07 dsmorris85-SFDC

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

Konstryktor avatar Jul 29 '16 08:07 Konstryktor

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.

afawcett avatar Oct 26 '16 22:10 afawcett

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.

Konstryktor avatar Nov 11 '16 15:11 Konstryktor

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! 👍

afawcett avatar Dec 04 '16 19:12 afawcett

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"?

Konstryktor avatar Feb 13 '17 13:02 Konstryktor

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

afawcett avatar Feb 18 '17 20:02 afawcett