Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Absent Member.. Anu_Madan Absent Member..
Absent Member..
514 views

How to virtualize callbacks?

Hi,

I have the following scenario:

1. I am virtualizing a SOAP service which takes a request for an order and returns an order number in response. (synchronous)

2. After some time, it returns the status of the order and order success/failure details to the client (asynchronous) on an endpoint exposed by the client. (REST service-xml payload).

So this asynchronous response has to be sent/initiated by HPSV and should contain the order number and some details from the request served in point 1. And this should be sent to a different REST url and not sent to the client back.

e.g. Soap service endpoint: http://abc.net/processOrder

Request example:

<orderRequest><buy><transactionId>transaction_1</transactionId><product><id>1</><name>product1</name></product><returnUrl>http://xyz.com/orderStatus</returnUrl></buy></orderRequest>

Response example:

<orderResponse><orderNumber>1234567</orderNumber></orderResponse>

Callback to be initiated by HPSV and to be sent to return URL - ,http://xyz.com/orderStatus (mentioned in the request above)

Callback request example: (values marked in red to be picked from request response above)

<orderCallback><transactionId>transaction_1</transactionId><orderNumber>1234567</orderNumber><orderStatus>Success</orderStatus></orderCallback>

callback response:  No response

_______________________________________________________________

point 1 is simple and implemented as a normal SOAP virtual service using HPSV. Need help in achieving point 2.

Is this possible?

Thanks.

Anu

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

Re: How to virtualize callbacks?

So I understand what you are needing to do in concept.

So the request/response is SOAP messages

And the callback response is REST.  Are you sure that it is REST?

If the response is actually SOAP, I know it can be easily done through using Service Call Activities (SCA).   When you create a SCA you can decide if it will be called before or after the response of the virtual service response.

0 Likes
Absent Member.. Anu_Madan Absent Member..
Absent Member..

Re: How to virtualize callbacks?

Yes. the call back is REST, or I must say it is XML over http.

My doubt it over the communication. In SCA, I can virtualize a SOAP request and response and then, can HP SV initiate a POST request itself (callback) to the http URL passing an XML payload which has some values from the SOAP request/response it just served?

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: How to virtualize callbacks?

SCA (Service Call Activity) supports SOAP, MQ, JMS as of 3.7x release.  REST is on the roadmap but I don't know when that is expected to be delivered.  I do know that REST is an area of a lot of work and focus as it seems to have become more popular than SOAP in many enviroments.

An idea that you could implement would be to create a small service so you could use the SV SCA to make a SOAP call and then have the service do the actual REST.

Would that be an option for you?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.