Invoking BWCE service in Cloud Foundry

Hi all

We have two simple webservices A & B configured with SOAP over HTTP binding.

Webservice A is a simple service which receives a request ,queries/inserts data into a postgres database and sends a response.

This service has been deployed on the PCF environment . we are able to test its working using SOAP ui by hitting the routable URL generated after successful deployment.

Webservice B is designed to invoke an operation in Webservice A , and for this we have configured External binding as suggested in the StockQuote example in the CloudFoundry samples bundled with the product.However this does not work.

The HTTP client resource has been configured with the HOST tab having the PCF routable url of the deployed Webservice A and default port of 80.

The Webservice B when deployed is able to start up without errors in the PCF environment, but when we try to hit the service , it gives a connection refused error while invoking the Webservice A.The project when run locally works fine and is able to get a response from the routable url of Webservice A .

Soap Fault received:
  <soapenv:Text>{com.tibco.bw.core.runtime.api.exception}BWServiceRuntimeException: com.tibco.bx.core.faults.BxException: TIBCO-BW-BINDING-SOAP-555030: Unable to send a request to the service provider for Operation [{http://www.example.org/wsdl/1462326166827}validate], SoapReferenceBinding [SOAPReferenceBinding], Application [AccountService.module.application:1.0] due to exception [com.tibco.bw.sharedresource.http.api.HTTPException]. Message Received: [java.net.ConnectException: Connection refused]
Caused by: com.tibco.bw.core.runtime.api.exception.BWServiceRuntimeException: TIBCO-BW-BINDING-SOAP-555030: Unable to send a request to the service provider for Operation [{http://www.example.org/wsdl/1462326166827}validate], SoapReferenceBinding [SOAPReferenceBinding], Application [AccountService.module.application:1.0] due to exception [com.tibco.bw.sharedresource.http.api.HTTPException]. Message Received: [java.net.ConnectException: Connection refused]
Caused by: com.tibco.bw.sharedresource.http.api.HTTPException: java.net.ConnectException: Connection refused
Caused by: java.net.ConnectException: Connection refused</soapenv:Text> 

AccountService.module.application:Name of Webservice B

SOAPReferenceBinding: Is the name of the reference bindnig used to invoke Webservice A.

Can anyone suggest how to fix this? We have also tried to replicate the same with REST binding instead of SOAP.But this gives the same result. We are not able to invoke a service within a service in the PCF environment.

(1) Answer

Login