On Nov 27, 2007 6:57 PM, Mauro Molinari <[EMAIL PROTECTED]> wrote:

> Amila Suriarachchi ha scritto:
> > First of all now I have fixed the unwrapping problem and you should be
> > able to generate the code correctly with a nighly build.
>
> Hi Amila,
> unfortunately I'm still experiencing problems: this seems not to be
> fixed...
>
> When you have empty return types, Axis2 doesn't unwrap the output to
> void, even if I specify -uw. Unwrapping of input parameters, instead,
> seems to work fine.


yes this is a known issue. I'll try it.

>
>
> I'm attaching a WSDL that shows the problem. There are two methods:
> - aMethod defines a response of an anonymous empty type; Axis2 generates
> a method that returns AMethodResponse, instead of void
> - bMethod defines a response of type EmptyType: Axis2 generates a method
> that returns EmptyType, instead of void
>
> I tried also with the latest nightly build...
>
> I also found out that this can actually be a problem, because in order
> to get parameters unwrapped by .NET correctly, it is mandatory to
> specify both request and response messages with a part with name
> "parameters". The part may refer to empty types, in order to be
> unwrapped to void by .NET. If you remove the part from the request or
> response message (so that Axis2 correctly generates void), .NET still
> generates void, but does not unwrap the output or input parameters
> respectively.
>
> For instance, suppose you have:
>
> <wsdl:message name="logoutRequest">
>   <part name="parameters" element="txsns:logout" />
> </wsdl:message>
> <wsdl:message name="logoutResponse" />
>
> in .NET this is translated to:
> public void logout(logout logout1) (where type logout is a "bean")
>
> If Axis2 could unwrap empty types correctly, it would not be a problem
> to define something like:
>
> <wsdl:message name="logoutRequest">
>   <part name="parameters" element="txsns:logout" />
> </wsdl:message>
> <wsdl:message name="logoutResponse">
>   <part name="parameters" element="txsns:logoutResponse" />
> </wsdl:message>
>
> with schema:
>
> <xsd:element name="logout">
>   <xsd:complexType>
>     <sequence>
>       <element name="ticket" type="xsd:string" />
>     </sequence>
>   </xsd:complexType>
> </xsd:element>
> <xsd:element name="logoutResponse">
>   <xsd:complexType/>
> </xsd:element>
>
> in order to get:
>
> public void logout(string ticket) => .NET
> and
> public void logout(String ticket) => Java with Axis2
>
> Thanks in advance!
>
> --
> Mauro Molinari
> Software Developer
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to