users@jax-rpc.java.net

Re: doubt on wscompile & header in the output message

From: Alessio Cervellin <alessio.cervellin_at_sun-cs-italy.com>
Date: Sat, 20 Nov 2004 10:50:47 +0100

Vivek Pandey wrote:

>> let's say i've a wsdl which defines a message having two parts, arg1
>> and arg2, and an operation which has arg1 in soap:body and arg2 in
>> soap:header both as input and output.
>> now wscompile -gen:client -f:explicitcontext generates an interface
>> which has one method (the above operation) which accepts two
>> parameters (arg1 and arg2) and returns only one (arg1). Is this correct?
>> I wonder how the server side port implementation class can modify and
>> then return arg2 to the client.
>> Of course it can be done using a server-side handler, but I dont' want
>> to process arg1 in a class (port impl) and arg2 in another class (port
>> handler).
>> So what i ask is: can the port impl class return in other ways both
>> arg1 and arg2 to the client?
>>
>>
> I guess you can but depends on how you defined your abstract operation.
> can you send the wsdl?

Well, attached to this email you can find the wsdl.
By feeding it to wscompile -gen:server -keep -f:explicitcontext, it
generates the following interface:

public interface TestcasePortType extends java.rmi.Remote {
     public java.lang.String newOperation(java.lang.String arg1,
testcase.holders.ComplexElement2Holder arg2) throws
          java.rmi.RemoteException;
}

what I notice is:
1- it returns only String (attr1), which i defined as soap:body output,
and it does NOT return also ComplexElement2 (attr2) which i defined as
soap:header output.
2- the second parameter type of newOperation, ComplexElement2Holder, has
no much sense because it contains only the object ComplexElement2, so
why to encapsulate it? shouldn't it just be ComplexElement2 arg2?

What I think is: shouldn't wscompile generate instead something like this:

public interface TestcasePortType extends java.rmi.Remote {
     public ComplexElement12Holder newOperation(java.lang.String arg1,
testcase.ComplexElement2 arg2) throws
          java.rmi.RemoteException;
}

it means a method which accepts two parameters (corresponding to
soap:body and soap:heder of the INPUT mesage) and returns an "holder"
which encapsulates two objects of type ComplexElement1 and
ComplexElement2 (corresponding to soap:body and soap:heder of the OUTPUT
mesage)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net