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
pradeep kumar s 1pradeep kumar s 1 

SOAP API Integration

Please any body solve this issue:
i am getting this error----" System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML' "
i don't know why iam getting this error.previously it worked well.but now it is not working properly.it shows this error.please resolve this issue.this is an urgent issue.the results are found in this community and one knowledge article is there.but iam not resolving this issue.how can i resolve this.plese explain me step by step.
PawanKumarPawanKumar
Hi Praddep,
can you please check content type is set to appropriate XML type.

Regards,
Pawan Kumar
PawanKumarPawanKumar
Hi Pradeep,
does it solve your probelm?

Regards,
Pawan Kumar
pradeep kumar s 1pradeep kumar s 1
Hi Pawan, i can not resolve this issue.where can i see the contenttype?
Do i have to see in generated apex classes ?
sorry friend i am not good at SOAP API integration.please explain me.
PawanKumarPawanKumar
Hi Pradeep,
As per your exception share , what i undersatand is that- you are getting HTML page instead soap message. We get this erro when either authentication is failing / may be your request is getting blocked some where in the middle. It could be due to any reason. So what i would suggest please log what response you are getting in System.debug(), and save logged response in file as HTML and open in browser to see what HTML it is? what kind of error it is?

Regards,
Pawan Kumar
pradeep kumar s 1pradeep kumar s 1
Thanks Pawan,but it is not executed through anonymous block and i am getting that error.i tested it but i can not see the debug logs for that response.