Find your content:

Search form

You are here

How to generate stub listener in salesforce

 
Share

I need to know how to generate a stub listener in Salesforce. My exact requirement is to call a web service, written in APEX in one org, through an outbound message in another org.

I found below link about building a listener, but it doesn't explain how to do it in Salesforce.

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_om_outboundmessaging_listener.htm

Thanks in advance! Inshar


Attribution to: Inshar

Possible Suggestion/Solution #1

I think I just had a bit of a brain freeze there (apologies), I don't reckon there is a way to generate a Web Service from a WSDL in Salesforce. (The import wsdl generates classes to call out to a service)

What you might be able to do is use WSDL2Java and since Java is pretty close to Apex, you can then paste the generated service into your IDE as a new Class and then you will need to trim away some bits and change for Syntax differences. (eg add @Webservice annotation, etc But this will be quite a bit of work !)

java org.apache.axis.wsdl.WSDL2Java -s -o ./ <WSDLName>

Although to be honest, it would probably be easier just to write your own web service to respond to that notification. (You can use the Import WSDL to generate the Request and Response Classes : Setup > Develop > Class > Generate from WSDL, and then use them to write your own webservice)


Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4131

My Block Status

My Block Content