find out HTTP response code in Service

Hi
I have a consumer and a provide SOAP web service created from Webservice descriptors in Designer . I am trying to get the HTTP response code whe this services are called.

ARe there any built in services to use them for this purpose?
Thanks

Peter – Your question is quite not clear, you try to make use of pub.client:http

Thanks,

Hi, thanks

In Webservice Descriptors generally , there are no calls for the pub.client.http. but for the pub.soap.client.
I need a kind of feauture, which gives me the message context in whole which is in the IS runtime at the HTTP communication level (I think so ?)

Hi Peter,

did you introspect the response document being returned by the soap call?

There should be a header document containing the http response.

Regards,
Holger

hi Holger
Let give an example and say, I will create a generic service which can be reused in any service. This feature should be added to any Flow (Web service Descriptor consumer, Provider) and provides the HTTP response details for this Web service.

Hi Peter,

can you explain this a bit more in detail please.

Additionally you can check for the pub.flow:getTransportInfo.

Regards,
Holger

a-We have few Web services
b-some of them works on fire and forget principal
b-I need for these services provide a custom response
So I can check the Http code returned to say what happened on the call
d-and log this response in a DB

when you use the WSDL file to generate the client code, the generated service under the connectors folder is actually doing the WS call. you can open connector service, edit it, the very last steps in the service, the header is dropped, you can remove the dropping step, so the http header will be kept when you call the service.

Hi, thank
I wont to manipulate the generated codes, but have a service, add it to the flow (the flwo which calls the connector or the provider descriptor) providing header information.
?

Hi,

Why do you want to manipulate the generated header codes? while Tong says the header is dropped in the connector services …so you can remove the dropping step in order for http header will be kept when you call the service and downstream you can utilize it for your logging etc… is that make sense?

HTH,
RMG

Hi Peter,

your approach will only work with Consumer Services.

But in this case you will still have to follow Tongs and RMGs suggestion otherwise the header data is not available outside of the generated connector service.

For Provider Services they are invoked in reverse order:
The generated provider service invokes your custom service.

Regards,
Holger

Hi
Meantime I have some progress by using the consumer and using getTransportInfo
But I have another issue regarding using http POST method in pub.client.http
In successful cases there is no a status code / string in the response

??

Hi Peter,

there are 2 types of Status-values:

  • Soap-Status
  • Http-Status

If Soap-Status is 0, then Http-Status is 200, meaning complete success.
If Soap-Status is 1, then Http-Status is 200, meaning transport success, but Soap-Fault.
If Soap-Status is 2, then Http-Status has a meaningful value for Http-Transport error.

The http-information can be found under the header-structure of the reponse.

Regards,
Holger

Thanks guys,
I got the idea how to create the helper service
BestRg