skimhub / salesforce-python-toolkit

Automatically exported from code.google.com/p/salesforce-python-toolkit
GNU Lesser General Public License v3.0
0 stars 0 forks source link

suds.WebFault: Server raised fault: 'INVALID_TYPE: Must send a concrete entity type.' #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using salesforce-python-toolkit SVN trunk r10
Python 2.5.4 Win32
suds==0.4

The example in README to log in and create a new lead fails with 

suds.WebFault: Server raised fault: 'INVALID_TYPE: Must send a concrete entity 
type.'

Here's the whole trace:

>>> h = 
sforce.enterprise.SforceEnterpriseClient(r"file:///C:/Users/jlaughlin/Documents/
tmp/enterprise.wsdl.xml")
>>> h.login('jlaughlin@northernpower.com', '*snip*', '*snip*')
(LoginResult){
   metadataServerUrl = "https://na7-api.salesforce.com/services/Soap/m/20.0/00DA0000000Kj0e"
   passwordExpired = False
   sandbox = False
   serverUrl = "https://na7-api.salesforce.com/services/Soap/c/20.0/00DA0000000Kj0e/0DFA0000000LSX2"
   sessionId = "*snip*"
   userId = "005A0000000F6krIAC"
   userInfo =
      (GetUserInfoResult){
         accessibilityMode = False
         currencySymbol = "$"
         orgDefaultCurrencyIsoCode = "USD"
         orgDisallowHtmlAttachments = False
         orgHasPersonAccounts = False
         organizationId = "00DA0000000Kj0eMAC"
         organizationMultiCurrency = False
         organizationName = "Northern Power Systems Inc"
         profileId = "00eA0000000oRShIAM"
         roleId = "00EA0000000QDUWMA4"
         userDefaultCurrencyIsoCode = None
         userEmail = "jlaughlin@northernpower.com"
         userFullName = "Jeffrey Laughlin"
         userId = "005A0000000F6krIAC"
         userLanguage = "en_US"
         userLocale = "en_US"
         userName = "jlaughlin@northernpower.com"
         userTimeZone = "America/Los_Angeles"
         userType = "Standard"
         userUiSkin = "Theme2"
      }
 }
>>> lead = h.generateObject('Lead')
>>> lead.FirstName = 'Joe'
>>> lead.LastName = 'Moke'
>>> lead.Company = 'Jamoke, Inc.'
>>> lead.Email = 'joe@example.com'
>>> result = h.create(lead)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\python25\lib\site-packages\sforce-trunk.dev_r10-py2.5.egg\sforce\enterprise.py", line 33, in create
    return super(SforceEnterpriseClient, self).create(xml)
  File "c:\python25\lib\site-packages\sforce-trunk.dev_r10-py2.5.egg\sforce\base.py", line 361, in create
    return self._handleResultTyping(self._sforce.service.create(sObjects))
  File "build\bdist.win32\egg\suds\client.py", line 542, in __call__
  File "build\bdist.win32\egg\suds\client.py", line 602, in invoke
  File "build\bdist.win32\egg\suds\client.py", line 649, in send
  File "build\bdist.win32\egg\suds\client.py", line 702, in failed
  File "build\bdist.win32\egg\suds\bindings\binding.py", line 265, in get_fault
suds.WebFault: Server raised fault: 'INVALID_TYPE: Must send a concrete entity 
type.'
>>>

Original issue reported on code.google.com by jeff.lau...@gmail.com on 29 Dec 2010 at 1:49

GoogleCodeExporter commented 8 years ago
FWIW I can confirm this issue does NOT occur with Suds 0.3.9.

Of course installing suds 0.3.9 required hunting down the correct trunk 
revision number from their release history page and checking it out. Kind of 
sucks that they don't tag their releases in SVN, or make old releases available 
on their wiki or on the pypi page. 

If anybody else get's hung up on this, here's the command to check out the 
right version:
svn co -r 658 http://svn.fedorahosted.org/svn/suds/trunk suds-0.3.9

the do the usual python setup.py install or roll an egg or whatever.

Original comment by jeff.lau...@gmail.com on 29 Dec 2010 at 2:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
They (Python SUDS) must have fixed the download archive.  First, performing 
"svn co -r 658 ..." results in "no version 658".  Second, the main archive they 
had a few weeks ago was "python-suds-0.4.tar.gz" - that's gone now, replaced 
with "python-suds-0.3.9.tar.gz".  After removing 0.4 and replacing with 0.3.9 - 
the problem went away.

Original comment by cw10...@gmail.com on 11 Jan 2011 at 9:48

GoogleCodeExporter commented 8 years ago
Sorry, I've been away over the holidays, this is a duplicate of issue 4, there 
were some changes to the internals of Suds in 0.4.0 that I haven't allowed for 
yet.  Thank you both for the comments, I added a link to 0.3.9 and a notice to 
the top of the homepage.

Original comment by dlanst...@gmail.com on 12 Jan 2011 at 9:34

GoogleCodeExporter commented 8 years ago

Original comment by dlanst...@gmail.com on 12 Jan 2011 at 9:35

GoogleCodeExporter commented 8 years ago
Installing suds 0.3.9 should be piece of cake with easy_install:
easy_install "suds==0.3.9"

Original comment by Mariano....@gmail.com on 12 Jan 2011 at 9:46

GoogleCodeExporter commented 8 years ago
Thanks!  Just updated the homepage.

Original comment by dlanst...@gmail.com on 12 Jan 2011 at 9:55