I am implementing a server that will receive a POST request from the client, through an API, in the header it has a callback URL where we need to send a PUT message for this callback URL later. This is to implement an Async API.
In resume the flow is:
Client --- POST ---> Server
Client <-- 202 --- Server
Client <-- PUT/CallbackURL --- Server
Client --- 200 ---> Server
Can I make Postman having a Stub server capable to receive this callback and do a 200 response?
Thanks, #adsc!
Postman has Mock Servers: learning.postman.com/docs/postman/mock-servers/setting-up-mock
Your comment fixes my problem and I didn't find it before.
https://learning.postman.com/docs/postman/mock-servers/setting-up-mock/
Related
We are using Kerberos to authenticate HTTPS request. We wish to reuse the connection for requests to same endpoint by using same curl handle. This works fine for HTTP connections. However, each rest request we sent will send two request, first will get 401 to get back authentication token and then 200 for the data. Then curl will close the connection and reconnect again for following rest request. This is extremely inefficient, is there a way to cut down all the authentication cost? Thanks a lot!
I am using gSoap and I have a similar problem. I have to program a server. The client should send a subscription request (that would include its URL). The server stores this information, and replies to the client. This is done. However, how does the server send the notifications to the client when the events take place?
I have written the rest of the services, where the server responses the requests of the client. But I have no idea about how to do the rest of the program.
I would need to create three kinds of functions:
1) A method for the client to to subscribe:
int __ns1__SubscribeToEventNotifications(
struct soap* p_soap,
_ns1__SubscribeToEventNotifications *ns1__SubscribeToEventNotifications,
_ns1__SubscribeToEventNotificationsResponse,
&ns1__SubscribeToEventNotificationsResponse
);
2) A method for the server to notify an enevent to the subscribed clients:
int __ns1__NotifyEventHappened(
struct soap* p_soap,
_ns1__EventHappened *ns1__EventHappened,
_ns1__EventHappenedResponse &ns1__NotifyEventHappenedResponse
);
3) A method for the client to unsubscribe:
int __ns1__UnsubscribeFromEventNotifications(
struct soap* p_soap,
_ns1__UnsubscribeFromEventNotifications,
*ns1__UnsubscribeFromEventNotifications,
_ns1__UnsubscribeFromEventNotificationsResponse,
&ns1__UnsubscribeFromEventNotificationssResponse
);
In SOAP web service callback architecture?, Glen Best wrote:
"You can push the notification from the server to the client if you know the client's SOAP endpoint address. The client can transfer it's SOAP endpoint address within original SOAP request payload. Sometime later the server can send a SOAP request to the client."
How is this request from server to client done?
Thanks in advance, David Marcos
Look at this scenario in a massive webserver/application server
The user sends multiple requests that get processed async and call an webservice.
How is the request response cycle?
How does the application server know which packet of response goes to which request?
I know this is a very silly question, however i am not able to find any documentation on how this is handled?
How does the application server track the request and the response?
Which HTTP Method is used to send SOAP messages?
I guess, if you are working at the servlet level,you could define the HTTP method(would there still be restrictions?).
But if all that is hidden, and I'm using a simple JAX WS webservice, which HTTP method would(should??) the request and response messages have?
I think JAX-WS and most other implementations use post for transmitting requests
you can verify it by capturing the request in TCP IP monitor
I am trying to setup very simple WSO2 ESB Proxy service. While using it, I am getting HTTP 202 response back and WSO2 ESB is not doing anything with the request beside logging it. Here is the background of my setup
My service implementation is using SOAP 1.2 over Http 1.1. When my client opens the connection to the server, it fires first request and asks for keep-alive connection. The ESB passes the request to the actual implementation and sends response back with transfer-encoding as chunked. So far it works as desired.
After the initial request response exchange, my client submits several requests in parallel and I get HTTP 202 responses for all of them. Looking at logs, it seems ESB is not sending the request to the actual implementation ever.
Is there something that I am doing wrong? How do I fix it?
What happens in this scenario is that your subsequent requests are hitting the main sequence of the WSO2 ESB. That is why you can only see a log for those requests. As you have already narrowed down this happens due to the jsessionId attached to the URL. To overcome this issue you can create a REST API with URL pattern to match the correct URL path. Please refer the following documentation.
https://docs.wso2.com/display/ESB481/Creating+APIs