the problem is you have to have same portType to generate the code for all
ports. if your port type is different then actually there can not be same
interface.
Here since you have two portTypes only options is to generate the code twice
giving the service name and port name for two ports

-sn fooService -pn fooWebService_0.0.2
-sn fooService -pn fooSupportWebService_0.0.2

Amila.
On 8/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I'm using the -ap option but it still doesn't generated the second port.
> C:\axis2-1.2\bin>wsdl2java.bat -d jaxbri -uri test.wsdl -ss -g -sd -ssi
> -ap
>
>
>
>  *"keith chapman" <[EMAIL PROTECTED]>*
>
> 06/08/2007 11:02  Veuillez répondre à
> [email protected]
>
>   A
> [email protected]  cc
>
>  Objet
> Re: [Axis2 1.3] wsdl2java generate only one port
>
>
>
>
>
>
> if no endpoint is specified to WSDL2Java it pics the first SOAP 1.2endpoint. 
> To generate code for all ports use the -ap option.
>
> Thanks,
> Keith.
>
>
> On 8/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> <*
> [EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote:
>
> Hello,
> I'm using the latest Axis2 1.3 nightly build to generate code of my wsdl.
> I define two ports in my file but only one interface is generated by
> wsdl2java task.
> Here is my stripped down wsdl:
> <wsdl:definitions>
>        <wsdl:portType name="foo">
>                <wsdl:operation name="eligibilityCheck">
>                        <wsdl:input
> message="tns:eligibilityCheckRequestMessage" name="eligibilityCheckRequest"
> />
>                        <wsdl:output
> message="tns:eligibilityCheckResponseMessage"
> name="eligibilityCheckResponse" />
>                </wsdl:operation>
>        </wsdl:binding>
>        <wsdl:portType name="fooSupport">
>                <wsdl:operation name="whiteList">
>                        <wsdl:input message="tns:whiteListRequestMessage"
> name="whiteListRequest" />
>                        <wsdl:output message="tns:whiteListResponseMessage"
> name="whiteListResponse" />
>                </wsdl:operation>
>        </wsdl:portType>
>        <wsdl:binding name="fooBinding" type="tns:foo">
>                <wsdlsoap:binding style="document" transport="*
> http://schemas.xmlsoap.org/soap/http*<http://schemas.xmlsoap.org/soap/http>"
> />
>                <wsdl:operation name="eligibilityCheck">
>                        <wsdlsoap:operation soapAction="eligibilityCheck"/>
>                        <wsdl:input name="eligibilityCheckRequest">
>                                <wsdlsoap:body use="literal" />
>                        </wsdl:input>
>                        <wsdl:output name="eligibilityCheckResponse">
>                                <wsdlsoap:body use="literal" />
>                        </wsdl:output>
>                </wsdl:operation>
>        </wsdl:binding>
>        <wsdl:binding name="fooSupportBinding" type="tns:fooSupport">
>                <wsdlsoap:binding style="document" transport="*
> http://schemas.xmlsoap.org/soap/http*<http://schemas.xmlsoap.org/soap/http>"
> />
>                <wsdl:operation name="whiteList">
>                        <wsdlsoap:operation soapAction="whiteList"/>
>                        <wsdl:input name="whiteListRequest">
>                                <wsdlsoap:body use="literal" />
>                        </wsdl:input>
>                        <wsdl:output name="whiteListResponse">
>                                <wsdlsoap:body use="literal" />
>                        </wsdl:output>
>                </wsdl:operation>
>        </wsdl:binding>
>        <wsdl:service name="fooService">
>                <wsdl:port binding="tns:fooBinding"
> name="fooWebService_0.0.2">
>                        <wsdlsoap:address location="*
> http://localhost:8080/services/fooWebService*<http://localhost:8080/services/fooWebService>"
> />
>                </wsdl:port>
>                <wsdl:port binding="tns:fooSupportBinding"
> name="fooSupportWebService_0.0.2">
>                        <wsdlsoap:address location="*
> http://localhost:8080/services/fooWebService*<http://localhost:8080/services/fooWebService>"
> />
>                </wsdl:port>
>        </wsdl:service>
> </wsdl:definitions>
>
> To launch code generation, I'm using following command line:
> C:\axis2-1.2\bin>wsdl2java.bat -d jaxbri -uri test.wsdl -ss -g -sd -ssi
> -ap
>
> As a result, I get the interface file for the foo port but not for the
> fooSupport one.
> Is there something wrong in the wsdl?
>
> Thanks,
>
> Pierre
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.*
> **http://wso2.org/* <http://wso2.org/>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to