• AnnParampathoor
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Can somebody give some sample regarding how to read the QueryResult.

I got an SObject by using new QueryResult().getRecordsArray().

But I am unable to read the values from the SObject.

 

I have seen many samples by type casting the SObject to Account. But here I am using partner.wsdl and axis2 and I dont have an Account class. What I am trying to retreive is the username

I am using axis2 to generate the java classes from the partner.wsdl

While calling getUserInfo() method in the SforceStub in the partner.wsdl I am getting an exception as specified below:

 

 org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.axiom.om.OMException: java.lang.IllegalStateException

org.apache.axiom.om.OMException: java.lang.IllegalStateException
    org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:211)
    org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:127)
    org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:328)
    com.sforce.soap.partner.SforceServiceStub.toOM(SforceServiceStub.java:10726)
    com.sforce.soap.partner.SforceServiceStub.toEnvelope(SforceServiceStub.java:11176)
    com.sforce.soap.partner.SforceServiceStub.getUserInfo(SforceServiceStub.java:9555)

java.lang.IllegalStateException
    org.apache.xmlbeans.impl.store.Jsr173$XMLStreamReaderForString.next(Jsr173.java:1110)
    org.apache.xmlbeans.impl.store.Jsr173$SyncedJsr173.next(Jsr173.java:1138)
    org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
    org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:125)
    org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:127)
    org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:328)
    com.sforce.soap.partner.SforceServiceStub.toOM(SforceServiceStub.java:10726)
    com.sforce.soap.partner.SforceServiceStub.toEnvelope(SforceServiceStub.java:11176)
    com.sforce.soap.partner.SforceServiceStub.getUserInfo(SforceServiceStub.java:9555)

 

Do anyone have why this error is coming???

 

 

 

Message Edited by AnnParampathoor on 06-23-2009 10:41 PM