• dave6
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies
I'm using the Salesforce1 Reporting REST API to refesh dashboards of the admin account and this is working fine.  However we have several accounts that are linked to this account as the master/adim account and I need to refresh those accounts too.  How can I do this?  I'd much prefer to be able to refresh those accounts from this one rather than having to code to login into the linked accouts and refresh separately.  Can this be accomplished somehow?
  • August 16, 2015
  • Like
  • 0
I'm using the Enterprise WSDL and I'm getting the following error performing a query to get a Transaction__c record by record ID.  I've used this WSDL in many other Java applications with no problems, I'm not clear what could be causing this.  This is a fairly new record type we have in our WSDL but I have used it in other apps with no issues.

Some app details.  I'm using force-wsc version 31.1.0 and the same version to generate the source code from the WSDL.  The exception stack trace is below.  I'm not clear how this could happen because Transaction__c does implement XMLizable

java.lang.ClassCastException: com.sforce.soap.enterprise.sobject.Transaction__c cannot be cast to com.sforce.ws.bind.XMLizable
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:650)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:551)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:529)
at com.sforce.soap.enterprise.QueryResult.loadFields(QueryResult.java:137)
at com.sforce.soap.enterprise.QueryResult.load(QueryResult.java:121)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:651)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:527)
at com.sforce.soap.enterprise.QueryResponse_element.loadFields(QueryResponse_element.java:62)
at com.sforce.soap.enterprise.QueryResponse_element.load(QueryResponse_element.java:54)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:651)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:527)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:174)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:148)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
at com.sforce.soap.enterprise.EnterpriseConnection.query(EnterpriseConnection.java:674)

-Dave
  • August 04, 2014
  • Like
  • 0

I use the enterprise WSDL in several Salesforce integration applications and in one of them I now get the following error:

 

[UnexpectedErrorFault [ApiFault exceptionCode='INVALID_SESSION_ID'
exceptionMessage='Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: 00DE0000000ZQOG!AQkAQH_TDBC7pF0GHrjxGNih.n.G4ztF73JBrw.DEF23CoiUyomdQbsVb_ic69oR5JGppDliGL1uy6dfOSMrxBSVNJCcMWEd'
]

 

My usage pattern is to create an instance of the EnterpriseConnection passing in the ConnectorConfig with login info, make a few queries/updates, then call logout on the EnterpriseConnection  instance then it goes out of scope.  All apps do basically the same thing as far as connecting/logout just the work is different.  Only one app has this error (so far).  We use the same login for all apps.

 

What is causing this and how do I fix it?  

 

  • November 21, 2013
  • Like
  • 0

I'm implementing support for Salesforce's Outbout Messaging and it seems all the docs and examples assume the simple case where there is only one output message.  Or more exactly one output message type (one WSDL) which can carry any number of messages.

 

However I need to support multiple outgoing messages that have different WSDL's and I'm wondering what's the best way to approach this.   There does not seems to be any 'easy' way to handle this.

 

Well one 'easy' way would be to create a separate server endpoint for each outgoing message but that does not seem like the right way to do this as it does not scale.  E.g. having a separate war app for each message seems ineffecient both in processing but also in code support for N apps.

 

So ideally it seems one war should be able to handle any number of outgoing messages but I'm having lots of trouble getting that to work in practice, here are some of the issues I am running into.  (Btw, my build is Java, CXF & Maven)

 

1. Some of my outgoing messages both use the Lead object but with differing fields populated.  That means the WSDL is different.  So in my build the wsdl2java creates code in the same package that overwrites the previous one.  So how to handle that?

2. Then in my server app I need to do work with the data and call back into Salesforce with the calculated answers and I use the enterprise WSDL to do that.  But that wsdl2java build step has already generated java classes for all those types which conflict with the ones in 31.

3. So then I thought I would customize the package names used in #1 so that they each go into their own namespace so they would not conflict with eachother and with #2 but that's not possible because the shared type com.sforce.soap._2005._09.outbound.LeadNotification has to be bound to one of the Lead types.  

 

So it's a chicken and egg issue, I want to separate the packages but can't because although I want to have one server app and dispatch the messages, I can't because either all has to be in separate packages including the server or I get duplicate/overwight issues if I don't separate them.

 

Also I assume I can't modify the original WSDL as that is what Salesforce is expecting to exist in my server.

 

What am I missing here?  How can I accept muliple Salesforce messages of different types in my single Java web service app?  I have a hard time believeing I am supposed to create N war apps for N message types.

  • September 03, 2013
  • Like
  • 0

I read here http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_sobject.htm that sObject has a clone method which is what I need.

 

However I'm usign the enterprise WSDL API for Java and there is no clone method on my generated objects including the base SObject.  What am I missing?  Perhaps that above link doesn't apply to enterprise WSDL API?  

 

How can do do a shallow clone (not keeping ID)?

 

Thanks,

-Dave

  • January 06, 2013
  • Like
  • 0

I'm using the enterprise WSDL in Java and I need to query all the Opportunities a Conatct has and set the Account ID on each Opportunity found.  I see the Contact object has serveral Opportunity related methods, getOpportunities(), getOpportunity__c(), getOpportunities1__r()...getOpportunities5__r()etc.  What should I use to do this?  getOpportunities() returns a QueryResult but it seems to be always null.  How can I get this data?

 

If I could have gotten this linked/joined data when I queried for the Contact that might be okay too but I'm not sure how to get/query for joined data in SF.

 

This is probably a basic question but could really use some help...quite new to SF.

  • August 08, 2012
  • Like
  • 0
I'm using the Enterprise WSDL and I'm getting the following error performing a query to get a Transaction__c record by record ID.  I've used this WSDL in many other Java applications with no problems, I'm not clear what could be causing this.  This is a fairly new record type we have in our WSDL but I have used it in other apps with no issues.

Some app details.  I'm using force-wsc version 31.1.0 and the same version to generate the source code from the WSDL.  The exception stack trace is below.  I'm not clear how this could happen because Transaction__c does implement XMLizable

java.lang.ClassCastException: com.sforce.soap.enterprise.sobject.Transaction__c cannot be cast to com.sforce.ws.bind.XMLizable
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:650)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:551)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:529)
at com.sforce.soap.enterprise.QueryResult.loadFields(QueryResult.java:137)
at com.sforce.soap.enterprise.QueryResult.load(QueryResult.java:121)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:651)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:527)
at com.sforce.soap.enterprise.QueryResponse_element.loadFields(QueryResponse_element.java:62)
at com.sforce.soap.enterprise.QueryResponse_element.load(QueryResponse_element.java:54)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:651)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:527)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:174)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:148)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
at com.sforce.soap.enterprise.EnterpriseConnection.query(EnterpriseConnection.java:674)

-Dave
  • August 04, 2014
  • Like
  • 0

I use the enterprise WSDL in several Salesforce integration applications and in one of them I now get the following error:

 

[UnexpectedErrorFault [ApiFault exceptionCode='INVALID_SESSION_ID'
exceptionMessage='Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: 00DE0000000ZQOG!AQkAQH_TDBC7pF0GHrjxGNih.n.G4ztF73JBrw.DEF23CoiUyomdQbsVb_ic69oR5JGppDliGL1uy6dfOSMrxBSVNJCcMWEd'
]

 

My usage pattern is to create an instance of the EnterpriseConnection passing in the ConnectorConfig with login info, make a few queries/updates, then call logout on the EnterpriseConnection  instance then it goes out of scope.  All apps do basically the same thing as far as connecting/logout just the work is different.  Only one app has this error (so far).  We use the same login for all apps.

 

What is causing this and how do I fix it?  

 

  • November 21, 2013
  • Like
  • 0