Issue while invoking IS service in a task

Hi
I am having a requirement wherein i need to invoke one IS service as soon as a new task is queued.I have used following steps to accomplish this.It works fine but issue is it internally keeps the server credentials while generating a webservice connector via the wizard available in designer.For this i followed process as mentioned below.
1.On the UI Development perspective, start the web service connector wizard from any of the following locations:
2. By clicking File > New > Web Service Connector.
3. On the Select WSDL Location page, click the arrow at the right of the WSDL field to specify if the WSDL source is a local file or an existing IS service
4. Click Choose a Web Service from a Data Provider to locate an existing IS service.
5. Continue to click Next through the remaining pages, making changes as required.
6. On the Add Managed Bean Reference Property to Other Managed Beans page, click the [TaskName] Rule Context entry for the task you want to add the service to.
7. Click Finish.

Also tried to set endpoint address in bindings view of task but that does not work.Can you let me know how to put the endpoint in this so that it can be changed easily while deployment in different environments.

Also tried below mentioned approach
Administrative dashboard → Configuration → CAF Application Runtime Configuration
Click on project for which you want to change the environmental variable
Click on the Environment Entries link
Change the value of wsclient-endpointAddress based on the format "http :///ws
as http://lonwme01:6666/ws
This also does not work and give errors in MWS logs as com.webMethods.caf.wsclient.proxy.impl.WSClientDynamicProxy: [ISS.0088.9163] Could not retrieve WSDL for service ws:, WSD not found.
SOAPException( Client: [ISS.0088.9163] Could not retrieve WSDL for service ws:, WSD not found. )

Regards
Anuj

Hi
if you want to call a WSC when the task is queued:

  • - Open your task in the Task Editor
    - Drag and drop (from the Package view into the Bindings View → Services) your WSD
    - Select the operation you need from your WSD
    - In the Events tab of the Task Editor, add an event for the event type “Queued” and as Event Action add “Invoke Service”
    - Select the service created before from the dropdown list

The endpoint address used by default is the one inside the WSDL of the service you just generated. Could be something like: [b]http://1.2.3.4:5555/ws/MyISDummyPackage.WebServiceDesc:dummyServices[/b]. You can configure the wsclient-endpointAddress property in your environment properties to be [b]http://1.2.3.4:5555/ws/[/b] and all the endpoint address bindings of the services in the project to be something like #{environment[“wsclient-endpointAddress”]}MyISDummyPackage.WebServiceDesc:dummyServices

and that should make it
best regards
Javier

Hi Javier
Thanks for your quick response.
Issue here is i used a different approach wherein i created a webservice connector.
1.On the UI Development perspective, start the web service connector wizard from any of the following locations:
2. By clicking File > New > Web Service Connector.
3. On the Select WSDL Location page, click the arrow at the right of the WSDL field to specify if the WSDL source is a local file or an existing IS service
4. Click Choose a Web Service from a Data Provider to locate an existing IS service.
5. Continue to click Next through the remaining pages, making changes as required.
6. On the Add Managed Bean Reference Property to Other Managed Beans page, click the [TaskName] Rule Context entry for the task you want to add the service to.
7. Click Finish.

This works fine for me but the problem is webservice endpoint gets set somewhere internally and when i migrate it to another environment then also it tries to invoke this IS service in old environment.It gives an option to set end Point Address in bindings view with Info as #{ManagerChecklistRuleContext.sendEmailtoManager.endpointAddress} but it does not work with any value i set in data binding.

Regards
Anuj

Hi
the way you create the WSC does not really matter (I believe). Have you configured the endpoint address in any of these: web.xml file, CAF Runtime configuration, bindings view? If you have not changed any of these, then it will take the address from the WSDL file (have a look in the src folder under com.webMethods.caf.is.wsclient.).
In my post I described how you should configure the endpoint address when you plan to deploy it in different environments. You only have to update the CAF Runtime configuration in each of them.

hope this helps,
Javier

Hi Javier
Thanks for your response.It works fine for me after setting End point Address data binding.

Regards
Anuj