[vwnc] Wrong object returned from Soap call

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Wrong object returned from Soap call

frank sonnemans
After a long strugle I finally was able to communicate with the
salesforce.com wsdl service. I'm trying to see if Smalltalk would make
a good replacement for VB or C# which are well supported.

Problem I run into is that running a query can return different types
of objects. In Java or C# one would use a typecast to convert the
object to the right type. For example a query of the user table
returns User objects, which extend the generic SObject. Problem is
that the wsdlclient returns the generic SObject and not the User
object.

The WSDL code shows something like:
- <complexType name="sObject">
- <sequence>
  <element name="fieldsToNull" type="xsd:string" nillable="true"
minOccurs="0" maxOccurs="unbounded" />
  <element name="Id" type="tns:ID" nillable="true" minOccurs="0"
maxOccurs="1" />
  </sequence>
  </complexType>
- <complexType name="User">
- <complexContent>
- <extension base="ens:sObject">
- <sequence>
.........


Is there any way to get the xml marshaller to recognize the right
object type or is that beyond the vw wsdl toolkit capabilities?

Thanks,

Frank
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Wrong object returned from Soap call

Kogan, Tamara
You could take a look at XMLObjectMarshalingManager class comments.
There is #AllowDerivedTypes shared variable that allows marshaling
derived objects when a type is described with a super class marshaler.
You set the option from VW Settings->Web services->XMLObject Marshaling

HTH,
Tamara Kogan
Smalltalk development,
Cincom Systems

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
Behalf

> Of frank sonnemans
> Sent: Saturday, March 08, 2008 3:40 PM
> To: VWNC mailinglist
> Subject: [vwnc] Wrong object returned from Soap call
>
> After a long strugle I finally was able to communicate with the
> salesforce.com wsdl service. I'm trying to see if Smalltalk would make
> a good replacement for VB or C# which are well supported.
>
> Problem I run into is that running a query can return different types
> of objects. In Java or C# one would use a typecast to convert the
> object to the right type. For example a query of the user table
> returns User objects, which extend the generic SObject. Problem is
> that the wsdlclient returns the generic SObject and not the User
> object.
>
> The WSDL code shows something like:
> - <complexType name="sObject">
> - <sequence>
>   <element name="fieldsToNull" type="xsd:string" nillable="true"
> minOccurs="0" maxOccurs="unbounded" />
>   <element name="Id" type="tns:ID" nillable="true" minOccurs="0"
> maxOccurs="1" />
>   </sequence>
>   </complexType>
> - <complexType name="User">
> - <complexContent>
> - <extension base="ens:sObject">
> - <sequence>
> .........
>
>
> Is there any way to get the xml marshaller to recognize the right
> object type or is that beyond the vw wsdl toolkit capabilities?
>
> Thanks,
>
> Frank
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc