• bobyrne
  • NEWBIE
  • 0 Points
  • Member since 2003

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

Since the release of API 2.0 previous code written and tested with API 1.9 is failing, even with the version argument set as 1.9.  Is API 1.9 unavailable following this latest release?

The error is that the response SOAPElement seems not to have a type attribute in response to either the query or describe requests.

Any pointers are very welcome...

 

Thanks,

Brian.

 

i've downloaded the java toolkit and set everything up as instructed. when the sample program runs, i get an error after the login:

SEARCH RESULTS
java.lang.NullPointerException
        at test.api.SForce.search(SForce.java:264)
        at test.api.SForce.main(SForce.java:399)

i put a statement in the SForce class

           for (Iterator j = element.getChildElements(); j.hasNext() {
                     SOAPElement next = (SOAPElement) j.next();
                     result = SForceUtil.getObject(next, this.typeName);
                    System.out.println("result is"+result);
                 }

which prints out "result is null" when the sample is run

my understanding is that the sample searches for accounts with the word "test" in some field. i've put the word "test" in the website field of 3 accounts.

so i'm wondering what the problem is. has anyone got the toolkit to run properly? what needs to be put in the account fields?

Message Edited by pninth on 07-01-2003 10:29 AM

I'm having some trouble applying an XSL transformation to data returned from a SOAP Query to Sforce. I've included the XSL and the SOAP message below along with a chunk of ASP code that attempts the transform. 

Any ideas why this might be broken?

----------begin cases.xsl------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
 <xsl:for-each select="value/valueMap">
  <tr>
  <td><xsl:value-of select="caseNumber" /></td>
  <td><a href="#"><xsl:value-of select="subject" /></a></td>
  <td><xsl:value-of select="id" /></td>
  <td><xsl:value-of select="status" /></td>  
  </tr>
 </xsl:for-each>
</xsl:template>
</xsl:stylesheet>

----------begin soap message received from Sforce--------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="salesforce" xmlns:types="salesforce/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<soap:Header/>
<soap:Body>
<sfdc:queryResponse xmlns:sfdc="sfconnector:SalesforceConnector">
<return>
<value xsi:type="tns:array">
<valueMap xsi:type="tns:map">
   <status xsi:type="xsd:string">Closed</status>
   <subject xsi:type="xsd:string">Starting generator after electrical failure</subject>
   <caseNumber xsi:type="xsd:string">00001000</caseNumber>
   <id xsi:type="xsd:string">500300000007s4r</id>
</valueMap>
<valueMap xsi:type="tns:map">
   <status xsi:type="xsd:string">Closed</status>
   <subject xsi:type="xsd:string">Shutting down of generator</subject>
   <caseNumber xsi:type="xsd:string">00001001</caseNumber>
   <id xsi:type="xsd:string">500300000007s4s</id>
</valueMap>
</value>
</return>
</sfdc:queryResponse>
</soap:Body>
</soap:Envelope>

---------------Begin ASP Snippet------------------
  strXSLFile = "cases.xsl"
  set rootNode = xmlObj.documentElement.selectSingleNode("soap:Body/sfdc:queryResponse/return/value") 
  strRows = transformXMLwithXSL(rootNode, strXSLFile)  'this function applies the XSL to the XML

Since the release of API 2.0 previous code written and tested with API 1.9 is failing, even with the version argument set as 1.9.  Is API 1.9 unavailable following this latest release?

The error is that the response SOAPElement seems not to have a type attribute in response to either the query or describe requests.

Any pointers are very welcome...

 

Thanks,

Brian.