On Thu, Jul 31, 2008 at 9:32 AM, Zhuang, Guanxia (Robin) <
[EMAIL PROTECTED]> wrote:

>  i have got a wsdl file from
> http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?WSDL , and i
> want to generate the sever side code and client code from it. but axis4 1.4
> only generate five methods. it should generate 5 methods for each binding i
> think.
>
Axis2 generates the code for one portType (per service). So it generates the
code for the portType of the port it selects.
for Axis2 what ever your service should have  one port Type. So if you can
change the wsdl  to as follows and use -ap option it generates correctly.

<wsdl:service name="WeatherWebService1">
−
    −
    <wsdl:port name="WeatherWebServiceSoap"
binding="tns:WeatherWebServiceSoap">
<soap:address location="
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"/>
</wsdl:port>
−
    <wsdl:port name="WeatherWebServiceSoap12"
binding="tns:WeatherWebServiceSoap12">
<soap12:address location="
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"/>
</wsdl:port>

</wsdl:service>
<wsdl:service name="WeatherWebService2">

−
    <wsdl:port name="WeatherWebServiceHttpGet"
binding="tns:WeatherWebServiceHttpGet">
<http:address location="
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"/>
</wsdl:port>
−

<wsdl:service name="WeatherWebService3">

<wsdl:port name="WeatherWebServiceHttpPost"
binding="tns:WeatherWebServiceHttpPost">
<http:address location="
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"/>
</wsdl:port>
</wsdl:service>

thanks,
Amila.

>
>
> i try to use axis2 to generate code from other wsdl file with multiple
> binding, but it just generate part of the methods, not all of the methods.
> can anybody try this wsdl, and let me know how to generate the server side
> and the client side code from it? thanks
>
>
>
> Regards
>
> ---------------
>
> Guanxia Zhuang (Robin)
>
> Sycamore Networks (SDC)
>
> Phone: 021-24050832
>
>
>
>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to