[mule-user] Salesforce connector sfdc:describe-sobject results in Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:permissionable' but found 'urn:partner.soap.sforce.com:precision'

275 views
Skip to first unread message

Alex Thieme

unread,
Oct 8, 2012, 7:38:19 PM10/8/12
to us...@mule.codehaus.org
I'm attempting to use the salesforce connector and keep running into some errors with the describe-sobject command. The describe-global command seems to work fine. Basically, I want to run describe-global, get all of the object type names, then run describe-sobject to get the details on each object. Ultimately, I want to build a directed graph that represents the relationships between types (e.g. show how Opportunity are related to Account, etc).

At any rate, when I run describe-global, I get the resulting com.sforce.soap.partner.DescribeGlobalResult and I route that to my DescribeGlobalComponent component to display info from the result. Works fine.

When I run describe-sobject (in this example, on the Account type) I get the following Exception and repeated ERROR log statements.

[10-08 19:33:51] ERROR ConnectNotifier [[sherlock-server-saas-salesforce].connector.polling.mule.default.receiver.01]: Failed to connect/reconnect: Work Descriptor. Root Exception was: Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:permissionable' but found 'urn:partner.soap.sforce.com:precision'. Type: class com.sforce.ws.ConnectionException
[10-08 19:33:51] ERROR DefaultMessagingExceptionStrategy [[sherlock-server-saas-salesforce].connector.polling.mule.default.receiver.01]:
********************************************************************************
Message : Failed to invoke describeSObject. Message payload is of type: String
Code : MULE_ERROR-29999
--------------------------------------------------------------------------------
Exception stack is:
1. Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:permissionable' but found 'urn:partner.soap.sforce.com:precision' (com.sforce.ws.ConnectionException)
com.sforce.ws.bind.TypeMapper:386 (null)
2. Failed to invoke describeSObject. Message payload is of type: String (org.mule.api.MessagingException)
org.mule.modules.salesforce.processors.DescribeSObjectMessageProcessor:128 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:permissionable' but found 'urn:partner.soap.sforce.com:precision'
at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:386)
at com.sforce.ws.bind.TypeMapper.verifyElement(TypeMapper.java:415)
at com.sforce.soap.partner.Field.loadFields(Field.java:1268)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-199]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-199]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-199]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-199]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-199]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-226]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-199]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-321]:
[10-08 19:33:51] ERROR SalesforceBayeuxClient [HttpClient-337]:

Here's my mule config. I am using Mule 3.3.0. CE. I am using the "RELEASE" version of org.mule.modules:mule-module-sfdc. I am using the 26.0.0 version of com.force.api:force-wsc and com.force.api:force-partner-api and com.force.api:force-metadata-api so that I can import SF objects in my components.

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc"
xmlns:mule="http://www.mulesoft.org/schema/mule/core"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.3/mule.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd">

<sfdc:config name="config.saas.global.salesforce" username="${salesforce.username}"
password="${salesforce.password}" securityToken="${salesforce.securityToken}"/>

<flow name="service.salesforce.describe.global">
<mule:poll frequency="30000">
<sfdc:describe-global config-ref="config.saas.global.salesforce"/>
</mule:poll>
<component class="DescribeGlobalComponent"/>
</flow>

<flow name="service.salesforce.describe.account">
<mule:poll frequency="30000">
<sfdc:describe-sobject type="Account" config-ref="config.saas.global.salesforce"/>
</mule:poll>
<component class="DescribeObjectComponent"/>
</flow>

</mule>




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Alex Thieme

unread,
Oct 10, 2012, 11:21:44 AM10/10/12
to us...@mule.codehaus.org
Sorry to be a best, but perhaps someone has a sample project containing a pom.xml using sfdc:describe-sobject. I would greatly appreciate it. At this point, I'm not sure if sfdc:describe-sobject works, or whether I have jar incompatibilities or whether I am doing something else wrong. I wonder even if this is a case of permissions required to access that SF API. On that front, all I've done is create the standard SF developer account on force.com.

Thanks in advance.

Eduardo Offermann Palma

unread,
May 27, 2014, 12:27:07 PM5/27/14
to mule...@googlegroups.com, us...@mule.codehaus.org, mu...@athieme.com, Mauricio Offermann Palma
Alex,

   Have you resolved this problem?. I have a similar problem:

Caused by: com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:restrictedPicklist' but found 'urn:partner.soap.sforce.com:queryByDistance'

 I would appreciate your help!

Robby Williams

unread,
Dec 2, 2014, 9:21:41 AM12/2/14
to mule...@googlegroups.com, us...@mule.codehaus.org, mu...@athieme.com, moffe...@gmail.com
Hey Eduardo, 
I don't know if you are still having this issue, but I was able to resolve the issue by updating my authorization url.  It seems that with each API release, the describes are subject to change in structure.  I was using version 29.0 of the API, where I needed 31.0, because Salesforce.  Anyways, I changed https://login.salesforce.com/services/Soap/u/29.0/ to https://login.salesforce.com/services/Soap/u/31.0/ , and the API picked up the mismatched tags.  I hope this helps!

Robby
Reply all
Reply to author
Forward
0 new messages