The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
I am trying to accomplish something from Salesforce to a .NET webservice but there may be precedent for the concepts in other languages.
Normally you would define a complex datatype in a webservice, then that datatype would be defined in the WSDL. The calling program would be developed using this WSDL to generate classes for these complex datatypes.
I want to do this the other way around. Salesforce has a datatype called sObject and provides a Partner WSDL that defines this type. I reference this WSDL in a C# project and want to create a webservice that takes an sObject as a parameter. When I run it and generate a service definition from this webservice, it contains a new definition of sObject.
The problem I am having is that when I give this definition to Salesforce, it does not recognize that it already knows this type (even though the namespace has not changed). In fact it defines a class called sObject_x.
Is there any way around this? Similar problems in other domains/languages?
Are you generating the service reference using svcutil?
If you reflect the two types (one provided by the service, one you're trying to get it to recognize), do they appear to match at the metadata level? I wouldn't be surprised if their hash codes don't line up.
The most annoying part is that when Salesforce generates classes from this, the sObject_x class is nested in a class called SobjectPartnerSoapSforceCom. I think it's also missing the "Any" property which is where the actual data is held.
Posts
If you reflect the two types (one provided by the service, one you're trying to get it to recognize), do they appear to match at the metadata level? I wouldn't be surprised if their hash codes don't line up.
I don't think they line up. I created the service reference by running the .asmx test form through firefox and tagging "?WSDL" onto the end.
I will try comparing the xml nodes. I'll post an example on here when I can.
From the wsdl generated from my webservice:
and
The most annoying part is that when Salesforce generates classes from this, the sObject_x class is nested in a class called SobjectPartnerSoapSforceCom. I think it's also missing the "Any" property which is where the actual data is held.