Timeline for Web service callout from salesforce to .net using SOAP service
Current License: CC BY-SA 3.0
24 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 25, 2016 at 13:13 | comment | added | Ratan Paul | @Ean yes this is not possible since it is async process. We can't get response back.. | |
Mar 25, 2016 at 13:12 | comment | added | Ean | @sfdcweb One small doubt. When using web service callout from Triggers in Salesforce is it possible to get a response back. Since we are calling future callout I think it is not possible. Correct me if i am wrong. | |
Mar 25, 2016 at 13:09 | comment | added | Ean | @sfdcweb Sure. I will do that and get back if i face any issues. Thanks for your support. | |
Mar 25, 2016 at 13:05 | comment | added | Ratan Paul | @Ean code looks good. Only one request can you please put debug at dot net side before deserliaze and check you are getting the values or not ? | |
Mar 25, 2016 at 13:03 | comment | added | Ean | @sfdcweb Check my updated question above. Is the code correct? | |
Mar 25, 2016 at 12:58 | comment | added | Ratan Paul | @Ean you can do that convert into JSON and then pass through web service.. and you can deserliaze that JSON in dot set side. check this post how to create JSON etc developer.salesforce.com/page/Getting_Started_with_Apex_JSON | |
Mar 25, 2016 at 12:50 | comment | added | Ean | @sfdcweb can the list of values be converted to json string and passed through web service callout? | |
Mar 25, 2016 at 12:38 | comment | added | Ean | @sfdcweb I am only able to understand it partially. It would be so helpful for me if you could post some sample code regarding what you explained above. | |
Mar 25, 2016 at 12:29 | comment | added | Ratan Paul |
@Ean yes so basically the idea is in salesforce end you need create a class like your dot net model PCSDetail and pass that list into your weservice method and in your webservice you need to PackageServiceSoap.UpdateDatabase method should accept the List<PCSDetail> as parameter.. This way you can send the list of values to callout and you can get those values.
|
|
Mar 25, 2016 at 12:21 | comment | added | Ean | @sfdcweb I understand the issue. I am asking you is there any other alternative way that you can suggest me. Even it needs change of whole code i am ready to do it. How does one normally pass list of values via web callout and accomplish this.? | |
Mar 25, 2016 at 12:16 | comment | added | Ratan Paul |
@Ean I can't see a way to solve your issue because your one end is in north pole and another in south pole. but problem is there is no road between them.. in your dot net end you are getting UpdateDatabase(List<PCSDetail> values) i.e. list<PCSDetail> and salesforce end you are passing List<PCS_Detail__c> but in your wsdl class your UpdateDatabase class accepting NewPetInformation.ArrayOfPCSDetail_x so you need to pass NewPetInformation.ArrayOfPCSDetail_x in obj.UpdateDatabase method.
|
|
Mar 25, 2016 at 12:12 | comment | added | Ean | @NickSFDC Updated my original code. | |
Mar 25, 2016 at 12:07 | comment | added | C0DEPirate | @Ean - Post your original code. | |
Mar 25, 2016 at 12:05 | comment | added | Ean | @sfdcweb Is there any way of accomplishing what i need. I have been stuck with this for past 2 days. | |
Mar 25, 2016 at 12:01 | comment | added | Ratan Paul |
NickSFDC ... Just for FYI: - PCSDetail class is created at dotnet server end..
|
|
Mar 25, 2016 at 11:58 | comment | added | Ean | I have updated my code but still the error which i mentioned in the question "Method does not exist or incorrect signature: [NewPetInformation.PackageServiceSoap].UpdateDatabase(List)." exists. | |
Mar 25, 2016 at 11:55 | comment | added | C0DEPirate | I dont know the syntax of declaring array of a class, but we need to pass array of PCSDetail | |
Mar 25, 2016 at 11:42 | comment | added | Ean | It says invalid type PCSDetail at line 6. Do you know why? | |
Mar 25, 2016 at 11:28 | comment | added | Ean | Do you mean that i need to modify the WSDLtoApex code and specify the getter,setter in it. | |
Mar 25, 2016 at 11:25 | comment | added | C0DEPirate | You need to pass object of this class in your web service class: public class PCSDetail { public string Id { get; set; } public string Name { get; set; } public string Breed { get; set; } public string Species { get; set; } public string Gender { get; set; } } I am not sure about .net web method | |
Mar 25, 2016 at 11:24 | history | edited | C0DEPirate | CC BY-SA 3.0 |
added 82 characters in body
|
Mar 25, 2016 at 11:23 | comment | added | Ean | I will try out your idea. Do i need to change the Web method or is it correct? | |
Mar 25, 2016 at 11:21 | comment | added | Ean | What is pcsDetail in the above code. Did you miss out any line. Also could you tell me whether the web method which i wrote in .NET is correct or not. | |
Mar 25, 2016 at 11:15 | history | answered | C0DEPirate | CC BY-SA 3.0 |