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
csbaacsbaa 

Consume Biztalk Webservice from Salesforce

Hello Helper


I  have to  consume a Webservice written in Biztalk  from an apex batch class

I  have the WSDL
I  created the stub  classes
I was able to  build my bussiness logic


I am looking  for some articles or  guidabce how  to setup  Salesforce  to  be able  to call the webservice method

Do I need a Remote Access app?

How  I  manage the login?

Other things  to consider?

Thanks in advance
csbaa

 
Best Answer chosen by csbaa
kaustav goswamikaustav goswami
Hi,
Sorry for the delay in replying.

In that case you will not need a Remote Access App. The first thing you will have to do is go to setup - security controls - remote site settings and enlist the domain that you want to hit. After that comes the authentication. If you are using a certificate you will have to generate that certificate, get it signed and upload it in Salesforce. Then from code you need to invoke the proper operation and pass the certificate and the necessary request parameters.

To get a detailed look at these steps you can refer the apex developer's guide or soap webservices developer's guide. The steps are mentioned in details.

Thanks,
Kaustav

All Answers

kaustav goswamikaustav goswami
The service is in Salesforce and you are trying to invoke it from an external system? Or is it the other way round?

Thanks,
Kaustav
csbaacsbaa
Hello Kaustav

the Webservice is not in Salesforce
It is a Biztalk Webservice  and  want to invoke it from Salesforce


Regards
csaba    
kaustav goswamikaustav goswami
Hi,
Sorry for the delay in replying.

In that case you will not need a Remote Access App. The first thing you will have to do is go to setup - security controls - remote site settings and enlist the domain that you want to hit. After that comes the authentication. If you are using a certificate you will have to generate that certificate, get it signed and upload it in Salesforce. Then from code you need to invoke the proper operation and pass the certificate and the necessary request parameters.

To get a detailed look at these steps you can refer the apex developer's guide or soap webservices developer's guide. The steps are mentioned in details.

Thanks,
Kaustav
This was selected as the best answer
csbaacsbaa
Thans Kaustav

I am making progress
The Remote Site Setting  issue was sortwd  out  now
thanks

I am facing noe another problem
Any type i try to invoke  the webservice methid  I got the error:

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

I  browsed the google  and it looks like a authorisation  issue

Currently  i have  no idea how  authentificate
I do not know  what  kind of authentification  is expected by the Webservice provider
Certificate?
User/login?

I am chasing them for details 


Thanks for your support
csbaa
csbaacsbaa
Hello Kaustav


I  wonder if  i can re-open ths  topic?

In your answer  you wrote:
"After that comes the authentication. If you are using a certificate you will have to generate that certificate, get it signed and upload it in Salesforce. Then from code you need to invoke the proper operation and pass the certificate and the necessary request parameters"


Here I need some  guidance

I  got  an user  and the password  from the Biztalk webservice  provider  company
But  I  got no  information  how  to  use  it

I  guess I need an API method  to pass the credentials. True/False?
This is the responsability  of the party  who  proivded the Webservice?

you wrote "if  you are using  a certificate..."  Who  decide  which  authentificaton method to use?  The consumer or the Webservivce  provider?

"Get signed it"   ?
"Upload it in Salesforce"   ?

Can you redirect me to any  link where I can read  about these?

"Then from code you need to invoke the proper operation and pass the certificate and the necessary request parameters"
wher can I take from  the proper operation  and the necesarry  parameters ?  

The  WSDL  i received  from Biztalk  contain no methods  for login


Regards
Csaba