cancel
Showing results for 
Search instead for 
Did you mean: 

Empty field data processing in SOAP scenario

harish_babu5
Participant
0 Kudos

Hi guys

I have a scenario. It's from a websevice to CRM system.

The user clicks on a button on webservice, the webservice should call the CRM through PI and then pass all the details. They need the customer name and Customer number. If there are hundreds of customers they need all the details.

I was thinking of creating a sender data type like

DT_XYZ

     Flag

Create wsdl and give it to the webpage team.

Use proxy at target side and ask the ABAP developers to ignore the field Flag and send all customers in the target.

There is no data in the sender side.

I cannot tell them to send some dummy data in the wsdl. Will this work without any data being send in the source?

1) Is this the right approach? Or can I use REST for this?

2) Is it better to configure this a two asynchronous senarios or a synchrnous scenario?

Regards

Harish Babu

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

>>>The user clicks on a button on webservice, the webservice should call the CRM through PI and then pass all the details. They need the customer name and Customer number. If there are hundreds of customers they need all the details.

How do the CRM system knows that it should return one customer/multiple customer's? There should be some identifier right?

>>>1) Is this the right approach? Or can I use REST for this?

Approach would be same. protocol(Rest/Soap) depends on your application.

>>>2) Is it better to configure this a two asynchronous senarios or a synchrnous scenario?

Obviously it has to be a synchronous scenario. Once the user clicks a button he wait for the response. It's not like submit & track.

harish_babu5
Participant
0 Kudos

Hi Hareesh

I am doing ABAP coding in SPROXY of CRM. So there I can make it to ignore the request message and send all the customer details in the CRM system

The issue is, with the wsdl, I created with the dummy field, will the message reaches PI? There is no data in the payload

iaki_vila
Active Contributor
0 Kudos

Hi Hareesh,

I agree with all, except for:


Obviously it has to be a synchronous scenario

If the payload is huge, the communication can be stopped by timeout. I think in the sender application can implement a Refresh button in order to wait the async response. Moreover, they can assure that will not be a problem with the communication if they send a identification number that later the proxy can processed to response several messages with for example with 1.000 registers each one.

I think sync or async depends about the client requirements about to see the data in time or not. are you agree?

Regards.

former_member184720
Active Contributor
0 Kudos

Not sure but SOAP adapter might reject empty request.

However you can work with HTTP_AAE adapter & use URL parameters in case you want to read something from source.

Even if there is nothing to read just simply append a constant(flag) to URL and send the same to CRM.

former_member184720
Active Contributor
0 Kudos

>>>I think sync or async depends about the client requirements about to see the data in time or not. are you agree?

Completely agreed that it depends on the client/application.

In the question, Harish mentioned that 'user clicks' on a button to get the details' which should display the list of customer's.

I don't think there would be so much data as he mentioned that it would be customer name and customer number.

So I don't think here aysnc is a good approach/suitable approach. If it is async 'correlation b/w request n response is not so easy and webservice team should design two different approaches for handling request and response messages.

If it is like placing an order and track it later then async should be fine.

iaki_vila
Active Contributor
0 Kudos

Hi everybody,

I didn't know that SOAP sender can fail with empty payload, i was thinking if the flag Do Not Use SOAP envelope is marked then then PI won't do any parsing, may be in this way woks.

On the other hand, i think it's not a bad idea to do a dummy a field, you can give more functionality to your scenario, with for example an idclient tag, if the tag is empty you send all the clients, if the tag has an identification you send only this client.

Regards.

former_member184720
Active Contributor
0 Kudos

Hi Inaki.. Even i'm not sure so suggested an alternate solution if SOAP doesn't work

harish_babu5
Participant
0 Kudos

HI Hareesh,

I am not that familiar with HTTP_AEE scenario in single stack. Are you saying that we have to use the Flag as constant in URL? in adapter I would take POST as mesage protocol. Do I have to set ASMA, then URL Parameters, URL Param one as Flag ?

Or like plain http adapter we have to add in the url that we give to the client as query string?

Is it like when the button is clicked on the webservice, the url will be invoked, and the url will have flaf in it?

Regards

Harish

former_member184720
Active Contributor
0 Kudos

>>>Are you saying that we have to use the Flag as constant in URL? in adapter I would take POST as mesage protocol. Do I have to set ASMA, then URL Parameters, URL Param one as Flag ?

Yes

>>>Is it like when the button is clicked on the webservice, the url will be invoked, and the url will have flaf in it?

Exactly

But did you try calling the soap URL without any payload and see if that's working?

harish_babu5
Participant
0 Kudos

Hi Hareesh

It is working fine.

I created a SOAP synchronous scenario.

Created wsdl from ICO, and gave it to the web team.

I created a Data type sender with a non mandatory filed "FLAG". I mapped it with value 1 and send it to CRM system. In Proxy code, irrespective of the input, all the customers wil be sent back.

I didn't face any error and it worked perfectly.

Thanks a lot

Harish

iaki_vila
Active Contributor
0 Kudos

Hi Harish,

Only for curiosity, have you tried to send a message without payload in the SOAP adapter?

Regards.

harish_babu5
Participant
0 Kudos

Hi Inaki,

I have synchronous sender and receiver. In PO, I am able to see only the request message after mapping, and I have assigned a value 1 in mapping to the Flag field.

I added the paramters for logging synchronous messages but I guess I need them to trigger again to see the exact request message.

I think they are simply sending the payload without any value for Flag field. Like you said, I have maintained it as a non mandatory field

Regards

Harish

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Harish,

IMO:

1) Is this the right approach? Or can I use REST for this?

If you use Rest you can avoid the XML tags that involve some extra data that increase the final size. However, you should do a test first in order to know how payload will be taken.

2) Is it better to configure this a two asynchronous senarios or a synchrnous scenario?

Definitely, if the message can be bigger than 3 or 5Mb you should use two asynchronous scenarios.


I cannot tell them to send some dummy data in the wsdl. Will this work without any data being send in the source?

For your  commodity i think with a dummy field you won't need to hesitate with the request, but you can do a dummy mapping with a constant to the proxy flag and to forget the request payload.

Regards.

harish_babu5
Participant
0 Kudos

Hi Inaki,

Thanks for the help !

I was thinking of creating a sender data type like

DT_XYZ

     Flag.

Then I create wsdl and give them to the webpage. They wil just click on a button and they will not send any data. Will this work? I mean will the message reach PI?

Harish