cancel
Showing results for 
Search instead for 
Did you mean: 

Change Response in Adapter Module

Former Member
0 Kudos

Hi all,

In asynchronous senario, there would be a http status 200 response from the receiver if the message has been arrived the receiver system. I'm wondering, is it possible to change the response manually by develop a adapter module?

Thanks and B'Rgds,

YiNing

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

YiNing

Can you give more details?

This is an Asynch Scenario and you still get a response from the target system? Am not sure I followed.

thanks,

Bhavesh

Former Member
0 Kudos

I'm using a soap adapter.

Q: What should my web service return to the adapter for asynchronous calls?

A: Currently, the receiver adapter expects an HTTP 200 with a SOAP envelope with an empty content for successful delivery. Any other response will result in a XI system error and triggers retries of the message. When you want to check duplicates, you should configure your receiver channel to pass the XI message header information to the server.

Prior to SP11, a SOAP fault resulted in the application or system error, depending on whether the SOAP fault contained a detail child element or not. This behavior contradicted the communication model. Therefore, it has been changed so that the adapter generates the system error for any SOAP fault in asynchronous calls.

When you want to check duplicates in your web service, you should configure your receiver channel to pass the XI message header information to the server. When your web service indeed find a duplicate, assuming that the previous message was simply lost, your web service should return an HTTP 200 with an empty SOAP envelope.

bhavesh_kantilal
Active Contributor
0 Kudos

Yining,

That was interesting info. Now , am wondering as well.

Regards

Bhavesh

Former Member
0 Kudos

I'm really not familiar with adapter module development as well as the API with it. Actually I'm wondering whether I can get the response string in session context and then change it.

Hope someone can help us.

Also, I'll try to figure it out myself. If I can, I'll come back and let you know

bhavesh_kantilal
Active Contributor
0 Kudos

Yining,

Adapter modules are simple.

You can also test the direction of the data inside the module.

Eg: You are using a a Synchronous SOAP adapter , and in this case the module will be called for both thew request and reponse. So using the direction of the call you can write the corrsponding logic.

In your case, the issue i see is that this is an Asynch call. So, even if you write a module by checking whether this is a request or a response, when the HTTP response reached the SOAP adapter the Standard SOAP module will be first called and I think as this is an Asynch call , the Standard SOAP Ejb will not forward it to the Custom Adapter Module which we have developed.

If it does, then it will be possbile , if it does not then dont think it is possible.

Regards

Bhavesh

Former Member
0 Kudos

I start to think it is impossible.

Former Member
0 Kudos

Bhavesh, is there a way by which I can catch a certain exception throw by the adapter and cancel the message which cauz the exception?

bhavesh_kantilal
Active Contributor
0 Kudos

YiNing,

As far as I know you will have to basically strip out your SOAP adapter's code and write you own code to do this.SAP does not provide the code of its adapters.

Maybe there is a way that I am not aware of and would like to know as well,:-)

Regards

Bhavesh

Former Member
0 Kudos

yeah, I'm planning to do that.

I spent a whole afternoon to study how to develop a adapter module.

Now I have to learn how to develop a whole adapter.

Hope someone can help us. : (

Former Member
0 Kudos

Actually it is so hard.

1. Unlike ABAP, SAP don't apply the JAVA source code.

2. If I want to to copy the exsited soap adapter, I have to copy the adapter meta data, and not only the soap adapter bean itself, but also the related home, remote, local and any other beans that related.

bhavesh_kantilal
Active Contributor
0 Kudos

I know.. Developing adaptrers aint easy. if it were there would be multiple adapter devloping vendors out there.

I have zero expertise in developing adapters and so I dont think I can be of further help.

Can you actually let us know why you want to change the response in the case of the Asynch call?

Regards

Bhavesh

Former Member
0 Kudos

We are using a lot of asynchronous receiver soap adapter.

The web service provider can only give us a http 200 response since its service is asynchronous, but the XI soap receiver adapter expects it with a soap message followed.

HTTP/1.1 200 OK

Content-Type: text/xml; charset="utf-8"

<SOAP:Envelope Xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP:Body>

</SOAP:Body>

</SOAP:Envelope>

That's the problem that I'm facing.

stefan_grube
Active Contributor
0 Kudos

As workaround you can use the SOAP adapter in so-called no-SOAP mode or the plain HTTP adapter. Check the flag 'Do not use SOAP envelope' in the SOAP adapter channel. In this case you have to provide the SOAP envelope in the message by yourself. This can be done with a simple XSLT mapping.

For a webservice you have to change the content-type. Check this blog for details:

/people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi

Look at part 2 and 3.

Regards

Stefan

Former Member
0 Kudos

Hi, stefan. Thanks for your reply.

The HTTP Adapter:

The http adapter is used for connection to Integration engine. There're 2 addressing types in http receiver adapter:

1. URL Address. If this type has been chosen, only around 20 characters is permitted to enter in. The number of my web service address is more than 40 characters.

2. HTTP Destination: In this mode, the gateway and logon client must be filled.

Thus, HTTP adapter is not the key to my question.

The no-SOAP mode:

if I check the "Do not use SOAP envelope" option, I should add envelop manually by myself. Anyway, it is a soap adapter, it expects a response with a soap envelop, my problem still has not been solved.

Hope someone can help me.

Thanks and B'Rgds,

YiNing

stefan_grube
Active Contributor
0 Kudos

> 2. HTTP Destination: In this mode, the gateway and

> logon client must be filled.

> Thus, HTTP adapter is not the key to my question.

Choose a destionation of type HTTP. Not R/3.

> The no-SOAP mode:

> if I check the "Do not use SOAP envelope" option, I

> should add envelop manually by myself. Anyway, it is

> a soap adapter, it expects a response with a soap

> envelop, my problem still has not been solved.

No, the SOAP adapter in no-soap mode does not expect the response as SOAP message.

Regards

Stefan

Answers (0)