function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JasonRogersJasonRogers 

querying custom objects

I am having trouble querying a custom object. I get the SOAP response, but then I get and exception that boils down to this:

org.xml.sax.SAXException: No deserializer for
{urn:sobject.enterprise.soap.sforce.com}OpportunityCatalogRelationship__c

I read on the forums that this is usually a namespace issue, but I don't know how to fix it.

As part of my login I execute this code:

LoginResult loginResult = newService().getSoap().login(
userName(),
password());
Soap soap = newService().getSoap(new URL(loginResult.getServerUrl()));

The value of loginResult.getServerUrl() is "https://na1-api.salesforce.com/services/Soap/c/4.0".

Any clues how to change the namespace would be appreciated.
SuperfellSuperfell
Did you regenerate your WSDL after the custom object was added ? sounds like its not in your WSDL.
JasonRogersJasonRogers
I regenerated it and regenerated the classes. The two custom objects that I am after are in the XML:


<complexType name="Catalog__c">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="XML__c" nillable="true" minOccurs="0" type="xsd:string"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="Catalog__c" type="ens:Catalog__c"/>



AND



<complexType name="OpportunityCatalogRelationship__c">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="Catalog__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Opportunity__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="OpportunityCatalogRelationship__c" />

Message Edited by JasonRogers on 11-23-2004 03:22 PM

JasonRogersJasonRogers
I found the problem. Several months ago we introduced a replacement to the SoapBindingStub class. Our class has not been getting updated for quite a while. In SoapBindingStub's constructor the serializers and deserializers are constructed and cached.

Sorry for the confusion.
DevAngelDevAngel

Glad to know you found the problem.

 

Cheers