You need to sign in to do that
Don't have an account?
Exception performing Query from Partner WSDL
While trying to Query against Contact, I am getting an exception from within the Axis API. Below is the SOAP that I'm sending and receiving back.
The response looks incorrect because it is defining Contact as an Enterprise object and not giving it back as an SObject. The deserializer tries to deserialize it using the Enterprise namespace/object which breaks things.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="SforceService">
<ns2:sessionId xmlns:ns2="urn:partner.soap.sforce.com">DON'T PEEK AT THIS</ns2:sessionId>
</ns1:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<query xmlns="urn:partner.soap.sforce.com">
<queryString>select Id from Contact</queryString>
</query>
</soapenv:Body>
</soapenv:Envelope>
ERROR [SalesForce.com Sync, SALESFORCE_FOLDER.ID=83109, rnd=-2001560631] (Call.java:2383) - Exception:
org.xml.sax.SAXException: No deserializer for {urn:sobject.enterprise.soap.sforce.com}Contact
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:257)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1001)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:159)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1050)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
at org.apache.axis.client.Call.invoke(Call.java:2381)
at org.apache.axis.client.Call.invoke(Call.java:2280)
at org.apache.axis.client.Call.invoke(Call.java:1741)
at com.sforce.soap.partner.SoapBindingStub.query(SoapBindingStub.java:1211)
at com.metro1.metrodex.salesforce.SFCSynchronizer.sfcGetUpdated(SFCSynchronizer.java:819)
at com.metro1.metrodex.salesforce.SFCSynchronizer.run(SFCSynchronizer.java:323)
at com.metro1.util.ThreadPool$Worker.run(ThreadPool.java:102)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<queryResponse xmlns="urn:partner.soap.sforce.com">
<result>
<done>true</done>
<queryLocator xsi:nil="true"/>
<records xsi:type="sf:Contact" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
<sf:Id>0033000000303JtAAI</sf:Id>
</records>
<records xsi:type="sf:Contact" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
<sf:Id>0033000000303JuAAI</sf:Id>
</records>
<records xsi:type="sf:Contact" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
<sf:Id>0033000000303JvAAI</sf:Id>
</records>
Hi Curtis,
Check the endpoint that you are using. If you generated stubs from the partner wsdl it should end in Soap/u/4.0, if you used the enterprise wsdl then it should end in Soap/c/4.0.