• wyvern
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 16
    Replies

I'm using JAX-WS 2.1.5.

 

The following is easily repeatable. (It's in my unit tests.)

 

If I append "x" to the password, LoginFault_Exception (which is generated from the WSDL) is thrown when I login(). It has a fault code of INVALID_LOGIN. This is the expected behavior.

 

However, if I append "x" to the username instead of the password, SOAPFaultException (which is part of the Java library) is thrown when I login(). Its javax.xml.soap.SOAPFault has a faultString of "INVALID_LOGIN: Invalid username or password or locked out.".

 

Why isn't LoginFault_Exception thrown when the username is bad?

  • March 11, 2009
  • Like
  • 0
I've identified a handful of problems in the documentation for the results of describeSObjects.
  1. The "writeRequiresMasterRead" attribute is listed in the documentation for 14 as part of DescribeSObjectResult, but according to the 14 partner WSDL, it's part of Field.
  2. "relationshipOrder" has the same issue as "writeRequiresMasterRead": it's documented as part of DescribeSObjectResult but the WSDL says it's in Field.
  3. "calculatedFormula" is in the WSDL definition of Field, but not documented.
  4. "externalId" is in the WSDL definition of Field, but not documented.

  • December 20, 2008
  • Like
  • 0
I'm experiencing 100% cpu usage for about 14 seconds when I make a retrieve call on 2000 lead ids with the following list of fields: (line wrapped for easier reading)

Id,IsDeleted,MasterRecordId,LastName,FirstName,Salutation,
Name,RecordTypeId,Title,Company,Street,City,State,PostalCode,
Country,Phone,MobilePhone,Fax,Email,Website,Description,
LeadSource,Status,Industry,Rating,AnnualRevenue,
NumberOfEmployees,OwnerId,HasOptedOutOfEmail,
IsConverted,ConvertedDate,ConvertedAccountId,ConvertedContactId,
ConvertedOpportunityId,IsUnreadByOwner,CreatedDate,CreatedById,
LastModifiedDate,LastModifiedById,SystemModstamp,LastActivityDate,
DoNotCall,HasOptedOutOfFax,LastTransferDate,EmailBouncedReason,
EmailBouncedDate,SICCode__c,ProductInterest__c,Primary__c,
CurrentGenerators__c,NumberofLocations__c

So, more than a few fields, but still not all that many...

All network traffic for the call is in a burst at the start of the 14 second cpu usage spike, so it appears that the CPU usage is all in the actual processing of the message. Is this normal? That would mean that the rate of converting the XML into SObjects is less than 200/s, which seems very slow. I'm on a Core 2 Duo 2.1GHz box. Any ideas what I might be doing wrong, or is it really just that slow? Should I use a different SOAP toolkit?

I'm using the Partner WSDL v13 with the JAX-WS reference implementation 2.1.4 SOAP toolkit. The soap stub objects were generated with JAX-WS's wsimport ant task. I'm using the following JAXB binding (found on these forums, actually) to work around a class name clash:
Code:
<bindings
  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://java.sun.com/xml/ns/jaxws">
  <bindings
    node="//xsd:schema[@targetNamespace='urn:partner.soap.sforce.com']">
    <jaxb:globalBindings
      underscoreBinding="asCharInWord" />
    <jaxb:schemaBindings>
      <jaxb:nameXmlTransform>
        <jaxb:typeName
          suffix="Type" />
      </jaxb:nameXmlTransform>
    </jaxb:schemaBindings>
  </bindings>
  <enableWrapperStyle>false</enableWrapperStyle>
  <enableAsyncMapping>false</enableAsyncMapping>
</bindings>

 

I'm trying to compile a project that pulls some information from salesforce but get an out of memory error during the compile.  If I put the code in a standalone project and run it in a static main it works fine.  If i add it to the existing project and call it I get the oom error when compiling the salesforce packages generated from the wsdl file.

 

I have increased my heap size: -vmargs -Xms512M -Xmx1024M  with no effect.

 

This is the error message I get in the console window of eclipse:

 

 [javac] C:\SourceControl\mysybase\web_mainline\partner_portal\webapp\src\com\sforce\soap\enterprise\SoapBindingStub.java:1096: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.Vector
    [javac] cachedSerClasses.add(cls);
    [javac] ^
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.OutOfMemoryError: Java heap space

 

 

Any help would be greatly appreciated.

I'm so frustrated! I'm trying to simple convert the wsdl file to java code. However, this is a surprisingly big pain in the but. I'm a programmer so I can handle some technical stuff, but everything seems to be going wrong for me. Please help!

I have tried to install the axis/wsdl plugin for eclipse:

dragged the folders to eclipse plugin folder restarted eclipse........nothing shows up in the wizard

tried command line :

C:\Program Files\Java\jdk1.6.0_11\bin\axis2\axis2\bin>wsdl2java
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK/JRE

C:\Program Files\Java\jdk1.6.0_11\bin\axis2\axis2\bin>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_11\bin

C:\Program Files\Java\jdk1.6.0_11\bin\axis2\axis2\bin>wsdl2java -o Enterprise.w
dl
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK/JRE

I have java_home setup i think correctly but keep getting those errors?



tried netbean plugin with no luck!



Please i'm out of options. How can i get this wsdl2java complete. I'm stuck at this process and would like to move forward.


  • January 21, 2009
  • Like
  • 0
I've identified a handful of problems in the documentation for the results of describeSObjects.
  1. The "writeRequiresMasterRead" attribute is listed in the documentation for 14 as part of DescribeSObjectResult, but according to the 14 partner WSDL, it's part of Field.
  2. "relationshipOrder" has the same issue as "writeRequiresMasterRead": it's documented as part of DescribeSObjectResult but the WSDL says it's in Field.
  3. "calculatedFormula" is in the WSDL definition of Field, but not documented.
  4. "externalId" is in the WSDL definition of Field, but not documented.

  • December 20, 2008
  • Like
  • 0
I downloaded the Enterprise WSDL, and used Axis to generate the Java classes. It all look fine, until I tried to compile said classes. I got an error saying that the constructor for Account.java had too many parameters.  Since I am not using that class, I commented out the constructor and tried to recompile. This time I got another error message saying that the system had ran out of resources.

Any pointers on how to overcome this? I only to retrieve data from some custom objects, not create new ones.
Are there any pre-compiled classes I can use?
A way to minimize the size of the WSDL?
Or another way to retrieve object data through Java?

PS: I called SFDC for support last week but no one returned my call.
  • August 14, 2008
  • Like
  • 0
I'm experiencing 100% cpu usage for about 14 seconds when I make a retrieve call on 2000 lead ids with the following list of fields: (line wrapped for easier reading)

Id,IsDeleted,MasterRecordId,LastName,FirstName,Salutation,
Name,RecordTypeId,Title,Company,Street,City,State,PostalCode,
Country,Phone,MobilePhone,Fax,Email,Website,Description,
LeadSource,Status,Industry,Rating,AnnualRevenue,
NumberOfEmployees,OwnerId,HasOptedOutOfEmail,
IsConverted,ConvertedDate,ConvertedAccountId,ConvertedContactId,
ConvertedOpportunityId,IsUnreadByOwner,CreatedDate,CreatedById,
LastModifiedDate,LastModifiedById,SystemModstamp,LastActivityDate,
DoNotCall,HasOptedOutOfFax,LastTransferDate,EmailBouncedReason,
EmailBouncedDate,SICCode__c,ProductInterest__c,Primary__c,
CurrentGenerators__c,NumberofLocations__c

So, more than a few fields, but still not all that many...

All network traffic for the call is in a burst at the start of the 14 second cpu usage spike, so it appears that the CPU usage is all in the actual processing of the message. Is this normal? That would mean that the rate of converting the XML into SObjects is less than 200/s, which seems very slow. I'm on a Core 2 Duo 2.1GHz box. Any ideas what I might be doing wrong, or is it really just that slow? Should I use a different SOAP toolkit?

I'm using the Partner WSDL v13 with the JAX-WS reference implementation 2.1.4 SOAP toolkit. The soap stub objects were generated with JAX-WS's wsimport ant task. I'm using the following JAXB binding (found on these forums, actually) to work around a class name clash:
Code:
<bindings
  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://java.sun.com/xml/ns/jaxws">
  <bindings
    node="//xsd:schema[@targetNamespace='urn:partner.soap.sforce.com']">
    <jaxb:globalBindings
      underscoreBinding="asCharInWord" />
    <jaxb:schemaBindings>
      <jaxb:nameXmlTransform>
        <jaxb:typeName
          suffix="Type" />
      </jaxb:nameXmlTransform>
    </jaxb:schemaBindings>
  </bindings>
  <enableWrapperStyle>false</enableWrapperStyle>
  <enableAsyncMapping>false</enableAsyncMapping>
</bindings>

 

I am getting error
 
"syntax error on token "enum", class expected. and "org.apache.axis cannot be resolved to a type"
 
using JDK 6 then i changed it to 1.4 - but switched the error to
 

Syntax error, 'for each' statements are only available if source level is 5.0

 
Any help please!
Hi there,

In the API documentation, version 13.0; the following snippet of sample code is posted under the  "login" method:

Code:
private boolean login() {
  LoginResult loginResult = null;
  SoapBindingStub sfdc = null;
  try {
    //    Create binding object 
    sfdc = (SoapBindingStub) new SforceServiceLocator().getSoap();
    //    login
    loginResult = sfdc.login("username", "password");
  } catch (Exception ex) {
    System.out.println("An unexpected error has occurred." + ex.getMessage());
    return false;
  }

  System.out.println("Login was successful.");

  //    Reset the SOAP endpoint to the returned server URL
  sfdc._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, loginResult.getServerUrl());

  //    Create a new session header object
  //    add the session ID returned from the login
  SessionHeader sh = new SessionHeader();
  sh.setSessionId(loginResult.getSessionId());
  //    Set the session header for subsequent call authentication
  sfdc.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(),
                       "SessionHeader", sh);

.
.
.
}


 


However, the WSDL (I'm using the partner WSDL) which contains the definitions for the SOAP binding does not contain a method called "setHeader" and the API documentation itself mentions nothing about a setHeader method except in the sample code of a number of functions.

How does one set a header then if this does not work? Or am I completely missing something?
 

I'm calling the Retrieve statement in which I'm grabbing quite a few fields, many of which are formula fields and lookup fields to other objects.

Lately I've been getting this error (QUERY_TOO_COMPLICATED) but the API documentation doesn't say exactly what makes the query too complicated.

Is there a hard number of calculated fields (or relationship queries) that can be included in a single Retrieve call?  Does it depend on the complexity of the formulas within the calculated fields?

If anyone can shed more details about what contributes to this error, I would be really grateful.

Mike