You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Felix J. Ogris" <fj...@ogris.de> on 2008/05/06 16:27:06 UTC

WSDL / void POJO functions (patch included)

Hi,

I had some issues with Axis2 1.4 and MS Visual Studio when using POJO
functions without any parameters, eg.:

public String getSomething() {
...
}

>From the WSDL, VS generated a prototype for getSomething() that returns an
instance of getSomethingResponse instead of a String. getSomethingResponse
contained one member variable, a String called return. It turned out that VS
needs an empty input element in the WSDL, eg.:

<xs:element name="getSomething">
  <xs:complexType>
    <xs:sequence/>
  </xs:complexType>
</xs:element>

My patch applies to
modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGener
ator.java. It does nothing more than removing the check whether paras.length
is greater than zero in processMethods().

Regards,
Felix


Re: WSDL / void POJO functions (patch included)

Posted by "Felix J. Ogris" <fj...@ogris.de>.
Deepal jayasinghe (deepalk@gmail.com) wrote:

> <parameter name="doclitBare">true</parameter>

Hi Deepal,

thanks for your help. I didn't find that parameter neither in the docs nor
the wiki, but in the source code :-). Is there somethink like
http://ws.apache.org/axis/java/reference.html#GlobalAxisConfiguration for
Axis2? BTW, doclitBare is not an option for us, as we have methods with
identical parameters.

Felix



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: WSDL / void POJO functions (patch included)

Posted by Deepal jayasinghe <de...@gmail.com>.
Felix J. Ogris wrote:
> Hi,
>
> I had some issues with Axis2 1.4 and MS Visual Studio when using POJO
> functions without any parameters, eg.:
>
> public String getSomething() {
> ...
> }
>
> >From the WSDL, VS generated a prototype for getSomething() that returns an
> instance of getSomethingResponse instead of a String. getSomethingResponse
> contained one member variable, a String called return. It turned out that VS
> needs an empty input element in the WSDL, eg.:
>   
Well you wont get into this problem if you use doc-lit bare styles. In 
the case of of doc-lit-wrapped this is how we generate the wsdl.

To generate doc-lit-bare try adding the following parameter into 
services.xml

<parameter name="doclitBare">true</parameter>

Thank you!
Deepal

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: WSDL / void POJO functions (patch included)

Posted by keith chapman <ke...@gmail.com>.
Hi Felix,

Would be better if you can create a Jira and attach the patch. Jira makes it
easier to keep track of changes.

Thanks,
Keith.

On Tue, May 6, 2008 at 7:57 PM, Felix J. Ogris <fj...@ogris.de> wrote:

> Hi,
>
> I had some issues with Axis2 1.4 and MS Visual Studio when using POJO
> functions without any parameters, eg.:
>
> public String getSomething() {
> ...
> }
>
> From the WSDL, VS generated a prototype for getSomething() that returns an
> instance of getSomethingResponse instead of a String. getSomethingResponse
> contained one member variable, a String called return. It turned out that
> VS
> needs an empty input element in the WSDL, eg.:
>
> <xs:element name="getSomething">
>  <xs:complexType>
>    <xs:sequence/>
>  </xs:complexType>
> </xs:element>
>
> My patch applies to
>
> modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGener
> ator.java. It does nothing more than removing the check whether
> paras.length
> is greater than zero in processMethods().
>
> Regards,
> Felix
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org