Showing results for 
Search instead for 
Did you mean: 

returning output parameters from a java web service

Former Member
0 Kudos


I'm trying to build a Java Web Service starting from a Java Class. The method I want to expose returns a string and has an output parameter:

public String method (MyParameter aParameter)

When I run the wizard, the generated Virtual Interface shows an Incoming parameter

MyParameter aParameter

and an Outcoming parameter

String Response

Is there any way to set


as an outgoing parameter ?

Moreover, are output parameters allowed in Java Web Services ? They are allowed in ABAP Web Service.


Umberto Fonda

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Umberto,

as far as I know the WebService-Standard WSDL allows more then one outgoing parameter. You take the bottom-up-tour of develoment and java doesn't allow more then one outgoing parameter.

Perhaps you could design a new object which includes the string-parameter and the MyParameter-object. Something like this:

public MyReturn method(MyParameter aParameter)

where MyReturn is

class MyReturn {
  String stringParam;
  MyParameter aParameter;



Former Member
0 Kudos

Hi Thomas,

I considered the one you proposed as my second choice, as it's not very clean from a design point of view. I'm wrapping a BAPI that returns a structure (es BAPIRETURN) containing general error status and messages, while the actual values are returned in a different structure.

The point is "java doesn't allow more then one outgoing parameter" or there is something wrong in my approach ?