cancel
Showing results for 
Search instead for 
Did you mean: 

Exposing complete data structure in webservice

Former Member
0 Kudos

Hello Experts,

I have a scenario where a Bapi functionality(server proxy) is exposed as a webservice .

So scenario will be SOAP -> XI -> Proxy (calls a BAPI)

In our BAPI (proxy, target structure) we are having 100+ fields. Currently the WS consumer - application making SOAP call to our webservice will send only 20 (minimum required) fields. But in near future it will be updated to send all 100 fields.

Is it OK to include all 100 fields in source data type even though we will receive only 20 fields. (If i mark all of them as optional i.e. occurance 0..1) Or will it result in error?

Thanks in Advance,

XI Queries.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you mark the non-sent fields as optional, like you already mentioned, there should be no problem.

Former Member
0 Kudos

Thanks for quick reply ...2 points to you

Then I would like to know , if the SOAP call should include empty xml tags for these 80 extra fields, or it is ok with just tags for required 20 fields?

Because in this case my WSDL will contain all 100 parameters and will expect the request in similer structure. isnt it so?

former_member187339
Active Contributor
0 Kudos

Hi,

>>Because in this case my WSDL will contain all 100 parameters and will expect the request in similer structure. isnt it so?

if their minOccurs =0 then they are non mandatory and need not be sent

Regards

Suraj

Former Member
0 Kudos

Hi

If the WSDL file contains all the 100 fields thats not a problem, whatever you required the 20 fields you can send that 20 fields data that is enough.

WSDL file contains 100 fields also not a problelm

Regards

Ramesh

Answers (4)

Answers (4)

Former Member
0 Kudos

Ok, I will proceed by including all fields.

Thanks for quick replies with expert opinions.

Former Member
0 Kudos

Yes, It is good to expose web service for all 100+ fileds. You can control on required fileds in message mapping so as of now you'll map only 20 fileds but in future as per requirement you can do mappings for rest of fields. Advanatage of this is....in future no changes on consumer side are required and you can quickly enable rest of fileds in PI using mappings.

Hope this helps.

Regards,

Sach

Former Member
0 Kudos

HI,

Yes, If you know that those fileds will be there in the future, you can create it now in the datatype. It will not give you any error if you make it optional as you mentioned.

Shweta.

former_member187339
Active Contributor
0 Kudos

Hi,

>>Is it OK to include all 100 fields in source data type even though we will receive only 20 fields. (If i mark all of them as optional i.e. occurance 0..1) Or will it result in error?

yes it is ok to have all 100 fields in source even if you use only 20 fields. But later when you make them as mandatory or anything, you need to regenerate the wsdl

Regards

Suraj