• bs2
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
I have an custom apex class with  2 webservice method defined as follows( i had to define these custom methods as i need to be able to provide cleint with capability of allowing partial success or not for batch inserts)
 
Webservice static void createCustomObject(sObject[] objectsToInsert,boolean trueOrFalse) {
 
        Database.Insert(objectsToInsert,trueOrFalse);   
}   
 
Webservice static void createCustomObject(CustomObject[] objectsToInsert,boolean trueOrFalse) {
 
        Database.Insert(objectsToInsert,trueOrFalse);   
}   
 
I generated the WSDL and my generated custom objects extend the generated SObject. From the java client class I call both methods and first one fails while second one is OK. Why is this happening? I need to be able to use the first one as I can pass in any custom object and reuse same method.
Any suggestions will be greately appreciated. Thx a lot
 
  • June 06, 2008
  • Like
  • 0
I have an apex class which has a custom method taking sobject[] as argument as follows
 
webservice static insertCustomObject(sObject[] customObjects)
{
  // type of insertObjects is my custom objects in salesforce
   insert customObjects;
 
}
 
When wsdl is generated, it does not include definition of sObject and hence the java stub code generation fails. Can anyone let me know what am i missing here? There are many custom objects and hence I want to have only one webservice method which can take sObject and the caller can pass in any custom object type.
 
Thx
  • May 23, 2008
  • Like
  • 0
Is there a way that custom apex class WSDL to be  part of enterprise or partner WSDL? If not, can someone kindly let me know once the code is generated from WSDL, how can we call methods directly without logging in? I dont see any header properties that can be set on generated stub to support login.
 
 
  • May 13, 2008
  • Like
  • 0
I have the generated code from custom Apex class WSDL. The stub generated does not have any properties to set the organization URL, which is there in the stub generated from enterprise WSDL. How can a custom Apex class code be called from Java client? I would like to use both the standard and custom class methods defined in Salesforce. But when u initially login, the stibs have to be properly bound to a organization URL and there are other header settings.
 
 
  • May 13, 2008
  • Like
  • 0
I have an apex class which has a custom method taking sobject[] as argument as follows
 
webservice static insertCustomObject(sObject[] customObjects)
{
  // type of insertObjects is my custom objects in salesforce
   insert customObjects;
 
}
 
When wsdl is generated, it does not include definition of sObject and hence the java stub code generation fails. Can anyone let me know what am i missing here? There are many custom objects and hence I want to have only one webservice method which can take sObject and the caller can pass in any custom object type.
 
Thx
  • May 23, 2008
  • Like
  • 0
    Hi Folks,
                   
                        I have  a WSDL file ,when i gernerate a  class files from this it's geberated 21 classes and i want to run the following example which include import as follows(it is a example from apex code development pdf document):

package com.doc.samples;
import java.io.*;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.sforce.soap.enterprise.*;
import com.sforce.soap.enterprise.fault.ExceptionCode;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.sobject.Contact;

the imports which are in red not recogined bcz these classes are not in the jar file which i have extracted from WSDL file So what iam thinking is may be i have a wrong apex wsdl file , so can any one suggest me to download the correct apex wsdl file  to generate all classes include which are marked in red! i have a 1 month subscription developer account.


Regards,
Rajeshwar.