+ Start a Discussion
Terence VibanTerence Viban 

Integration wookbook error: invalid application.xml, no declaration can be found for element 'fss:oauth'

Hi all,

I am working my way through the integration wookbook. The basic scenerio is, the application is written using spring mvc and hosted in heroku. One way integration from salesforce via REST API works fine. Now we want the app on heroku to integrate with salesforce an be able to update our data model. For this we need to enable OAuth so the heroku app can authenticate remotely before accessing data on Salesforce (Tutorial 3 in the wookbook).

At this step, I get the following error

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 30 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 30; columnNumber: 16; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'fss:oauth'.

I have found a couple of resources online which try to explain this scenario and offer possible solutions 


There is this explaination and solution that makes absolute sense


Basically that the xsd file in which "fss:oauth" should be defined is missing which is true, because the xsi:schemaLocation in the application.xml http://media.developerforce.com/schema/force-springsecurity-1.3.xsd gives me this error.

<Message>Access Denied</Message>

This URL in the xsi:schemaLocation http://www.salesforce.com/schema/springsecurity also points to a path that is no longer available

I tried this xsd file http://force-spring.herokuapp.com/force-springsecurity-1.2.xsd hosted on git which seems to have the right definition for fss:oauth. But this didn't help.
I have tried all the other suggested workarounds such as modifying my pom.xml file and nothing has helped. I am stuck at this point. I even destroyed and recreated my project from scratch while trying various solutions and I get stuck at thesame spot.

I am not at all versed with the Spring MVC framework but I have read enough to understand what application.xml and pom.xml do. Any more insights on this issue will be highly appreciated.

Ray Zhao 3Ray Zhao 3
This is my <beans... bracket for the applicationContext.xml file.  I just tried it yesterday and it worked for me. 
<beans xmlns="http://www.springframework.org/schema/beans"
        xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
                http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
                http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
                http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
        http://www.salesforce.com/schema/springsecurity http://force-spring.herokuapp.com/force-springsecurity-1.2.xsd
        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">

Hope this helps!  Thanks to "iandrosov" for hosting the force-springsecurity-1.2.xsd file!
jaco polet 18jaco polet 18
For me this one helped