• Cyril C.
  • NEWBIE
  • 0 Points
  • Member since 2008

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


I do the request :

Select Id FROM Contact WHERE phone like '%70'

with this code line :


Code:
try
  {
   qr = binding.query(query);
  }
  catch(Exception e)
  {

 


and i had exception :

Code:
- Exception:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - type
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java:2597)
at com.lapeyre.sfdc.metier.ClientContrat.searchClientProspect(ClientContrat.java:86)
at com.lapeyre.sfdc.metier.ClientContrat.<init>(ClientContrat.java:50)
at com.lapeyre.sfdc.LoadData.<init>(LoadData.java:74)
at com.lapeyre.sfdc.LoadData.main(LoadData.java:138)

 I suppose i had to regenerate stub from the wsdl file.
But i dont know how and where to find the enterprise.wsdl file.

What should i exactly do to download this file ? (which item menu to click) ?
Can someone give me a url explain this procedure ?


thx




Hi,

I use AXIS 1.4, JDK1.5 and enterprise.wsdl version 7

in file enterprise.wsdl i can see :

Code:
<schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:enterprise.soap.sforce.com">

            <import namespace="urn:sobject.enterprise.soap.sforce.com"/>

            <!-- Our simple ID Type -->
            <simpleType name="ID">
                <restriction base="xsd:string">
                    <length value="18"/>
                    <pattern value='[a-zA-Z0-9]{18}'/>
                </restriction>
            </simpleType>

 But no class ID in the package "enterprise.soap.sforce.com" is generated. So my java code doesnt compile any more. the line below does not compile because "com.sforce.soap.enterprise.ID can not be resolved !

Code:
contrat.setMagasin__c(new com.sforce.soap.enterprise.ID(idMag));

 How to generate the ID classe ?


thx




Hi, all

When trying to execute

Code:
      loginResult = binding.login(loginSFDC, passwordSFDC);

i have got the Exception :

CODE

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.NullPointerException
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:396)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1754)
    at com.lapeyre.sfdc.LoadData.doLogin(LoadData.java:97)
    at com.lapeyre.sfdc.LoadData.&lt;init&gt;(LoadData.java:38)
    at com.lapeyre.sfdc.LoadData.main(LoadData.java:129)


java.lang.NullPointerException
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
    at org.apache.axis.client.Call.invoke(Call.java:2251)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1754)
    at com.lapeyre.sfdc.LoadData.doLogin(LoadData.java:97)
    at com.lapeyre.sfdc.LoadData.<init>(LoadData.java:38)
    at com.lapeyre.sfdc.LoadData.main(LoadData.java:129)
Caused by: java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:396)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    ... 6 more

 Did someone Can help me ?