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
JesseAJesseA 

Help with implementing webservice call

Looking for some help in using a "classic asmx (net 2.0) based webservice". Was able to use wsdl2apex in SFDC so I hace the apex class now. One note from developer who saw the output was that it generated class with protocol http instead of https. Anybody have any input on this?

 

I am more interested in just how to get it to work. I can call the method via apex but i get the following response:

 

System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'

 

So I believe I need to construct an SOAP envelope to make the call in but I'm not sure how. My searches online keep pointing to the same pages and its just not clicking for me. Can somebody point me in the right direction?