[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-c-user
Subject:    Re: [AXIS2C] |AXIS2] codegen Problem
From:       "Milinda Pathirage" <milinda.pathirage () gmail ! com>
Date:       2007-06-21 5:23:36
Message-ID: 22a059a60706202211k1588a566k5f2f156a65d789ca () mail ! gmail ! com
[Download RAW message or body]

Hi,
As you mentioned in your mail there are no input parameters to the

public float  getFloatWithNothing( )
{
    float i = 0;
    return i;
}
method.
When you use java2wsdl to generate WSDL for this service containing above
method it only generate XML Schema type to  response because there are no
input parameters. Thats why there is no generated file as
axis2_getFloatWithNothing.[ch]. If you have time please try to implement and
test the service from the generated code. Please any results you get. I
think when you send a request containing correct soap action and empty
payload Axis2/c engine will dispatch the request correctly and invoke the
getFloatWithNothing() operation.

Also attach the WSDL if you can. Then we can try this scenario.

Thanks for your interest about Axis2/C.

Milinda


On 6/20/07, Dr. Florian Steinborn <florian.steinborn@drb.insel.de> wrote:
>
> Hello group,
>
> I stumbled on a problem of the code generation machine in AXIS2/Java.
>
> A Java function
>
> public float  getFloat( float f)
> {
>     return f;
> }
>
> is generated to a wsdl
>
>
> <xs:element name="getFloat">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="param0" nillable="true" type="xs:float" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="getFloatResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:float" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> When you try to define a function that does the same but takes no
> parameter
>
> public float  getFloatWithNothing( )
> {
>      float i = 0;
>      return i;
> }
>
> you get the generation
>
> <xs:element name="getFloatWithNothingResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="xs:float" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> but the generation of something like "getFloatWithNothing" is missing.
>
> Is that normal?
>
> Curiously enough, the generation of the server side stub generates a
> services.xml, that contains the operation
>
> <operation name="getFloatWithNothing"/>
> <operation name="getFloat"/>
> </service>
>
> but the generated server stubs in C only contain an operation definition
> for "getFloat" in
> axis2_getFloat.[ch] and
> axis2_getFloatResponse.[ch]
>
> For "getFloatWithNothing" I only find
> axis2_getFloatWithNothingResponse.[ch]
>
> The Java Client stubs are generated ok, but I get a generation for the
> calling of an operation that is not implemented on the server side... Is
> this a problem of the generator or did I call something wrong?
>
> I used the
> Apache Axis2 SNAPSHOT build (May 16 2007)
> for generation.
>
> Thanks for advice,
>
> Flori
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
milinda@wso2.com
WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
http://www.milindalakmal.wordpress.com

[Attachment #3 (text/html)]

Hi,<br>As you mentioned in your mail there are no input parameters to the \
<br><br>public float &nbsp;getFloatWithNothing( )<br>{<br> &nbsp; &nbsp; float i = \
0;<br> &nbsp; &nbsp; return i;<br>}<br>method.<br>When you use java2wsdl to generate \
WSDL for this service containing above method it only generate XML Schema type \
to&nbsp; response because there are no input parameters. Thats why there is no \
generated file as axis2_getFloatWithNothing.[ch]. If you have time please try to \
implement and test the service from the generated code. Please any results you get. I \
think when you send a request containing correct soap action and empty payload \
Axis2/c engine will dispatch the request correctly and invoke the \
getFloatWithNothing() operation. <br><br>Also attach the WSDL if you can. Then we can \
try this scenario.<br><br>Thanks for your interest about Axis2/C. \
<br><br>Milinda<br><br><br><div><span class="gmail_quote">On 6/20/07, <b \
class="gmail_sendername">Dr. Florian Steinborn </b> &lt;<a \
href="mailto:florian.steinborn@drb.insel.de" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">florian.steinborn@drb.insel.de</a>&gt; \
wrote:</span> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello group,<br><br>I \
stumbled on a problem of the code generation machine in AXIS2/Java.<br>

<br>A Java function<br><br>public float&nbsp;&nbsp;getFloat( float \
f)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;return f;<br>}<br><br>is generated to a \
wsdl<br><br><br>&lt;xs:element \
name=&quot;getFloat&quot;&gt;<br>&lt;xs:complexType&gt;<br>&lt;xs:sequence&gt; \
<br>&lt;xs:element name=&quot;param0&quot; nillable=&quot;true&quot; \
type=&quot;xs:float&quot; \
/&gt;<br>&lt;/xs:sequence&gt;<br>&lt;/xs:complexType&gt;<br>&lt;/xs:element&gt;<br>&lt;xs:element \
name=&quot;getFloatResponse&quot;&gt; \
<br>&lt;xs:complexType&gt;<br>&lt;xs:sequence&gt;<br>&lt;xs:element \
name=&quot;return&quot; nillable=&quot;true&quot; type=&quot;xs:float&quot; \
/&gt;<br>&lt;/xs:sequence&gt;<br>&lt;/xs:complexType&gt;<br>&lt;/xs:element&gt; \
<br><br>When you try to define a function that does the same but takes no \
parameter<br><br>public float&nbsp;&nbsp;getFloatWithNothing( \
)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp; float i = 0;<br>&nbsp;&nbsp;&nbsp;&nbsp; return \
i;<br>}<br><br>you get the generation<br><br>&lt;xs:element \
name=&quot;getFloatWithNothingResponse&quot;&gt; \
<br>&lt;xs:complexType&gt;<br>&lt;xs:sequence&gt;<br>&lt;xs:element \
name=&quot;return&quot; nillable=&quot;true&quot; type=&quot;xs:float&quot; \
/&gt;<br>&lt;/xs:sequence&gt;<br>&lt;/xs:complexType&gt;<br>&lt;/xs:element&gt; \
<br><br>but the generation of something like &quot;getFloatWithNothing&quot; is \
missing.<br><br>Is that normal?<br><br>Curiously enough, the generation of the server \
side stub generates a<br>services.xml, that contains the operation \
<br><br>&lt;operation name=&quot;getFloatWithNothing&quot;/&gt;<br>&lt;operation \
name=&quot;getFloat&quot;/&gt;<br>&lt;/service&gt;<br><br>but the generated server \
stubs in C only contain an operation definition<br>for &quot;getFloat&quot; in \
<br>axis2_getFloat.[ch] and<br>axis2_getFloatResponse.[ch]<br><br>For \
&quot;getFloatWithNothing&quot; I only \
find<br>axis2_getFloatWithNothingResponse.[ch]<br><br>The Java Client stubs are \
generated ok, but I get a generation for the <br>calling of an operation that is not \
implemented on the server side... Is<br>this a problem of the generator or did I call \
something wrong?<br><br>I used the<br>Apache Axis2 SNAPSHOT build (May 16 \
2007)<br>for generation. <br><br>Thanks for \
advice,<br><br>Flori<br><br>---------------------------------------------------------------------<br>To \
unsubscribe, e-mail: <a href="mailto:axis-c-user-unsubscribe@ws.apache.org" \
target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> \
axis-c-user-unsubscribe@ws.apache.org </a><br>For additional commands, e-mail: <a \
href="mailto:axis-c-user-help@ws.apache.org" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">axis-c-user-help@ws.apache.org</a><br><br></blockquote></div>
 <br><br clear="all"><br>-- <br><a href="mailto:milinda@wso2.com" target="_blank" \
onclick="return top.js.OpenExtLink(window,event,this)">milinda@wso2.com </a><br>WSO2, \
Inc: <a href="http://www.wso2.com" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">http://www.wso2.com</a> &quot;Oxygenating the \
Web Service Platform&quot;<br><a href="http://www.milindalakmal.wordpress.com" \
target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> \
http://www.milindalakmal.wordpress.com</a>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic