cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service : by reference objects

david_fryda2
Participant
0 Kudos

Hi everyone,

Is there a way to return more than one object via a web service ?

For example, can I pass 2 tables to the web service method and get those 2 tables back with some changes ?

callWebServiceMethod(ref table1, ref table2);

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186016
Active Contributor
0 Kudos

Hi,

I don't think you can return two values.

Create a class that is a wrapper for the two tables. Return this wrapper object from the method callWebServiceMethod(....)

Regards,

Ashwani Kr Sharma

david_fryda2
Participant
0 Kudos

Hi,

Lets say I create a class that wrappes those 2 objects.

The client that will call the web service will have to know what class it is.

So, if I write that wrapper in Java and there is a C# client that will use that web service, how it's gonna work ?

Thanks,

Regards.

former_member186016
Active Contributor
0 Kudos

Hi,

i am not much familiar with consumption of java web service in C# client. I replied considering the full java environment, the typical in webdynpro.

You may opt for multidimentional array also.I think that should work in the case mentioned by you.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

When you create WS based on some java code you (or tools included in nwds) describes WS in terms of WS specifications. So clients has no idea about WS implementation.

In yours case C# client will see particular ws method with input and output structures. Output structure will contain another two structurs (these structures will be mapped on your java classes when client call will be recieved)