It's technically not a valid wsdl. The wsdl2java should likely just reject it with an error. If you check the spec at:
http://www.w3.org/TR/wsdl#_request-response The two that we support are: 2.4.1 - One-way Operation These will have an input and no output or faults 2.4.2 Request-response Operation These MUST have an input AND and output and may have any number of faults. Your wsdl doesn't meet either of those. Actually, if you run the wsdl2java with the -validate flag, does it flag that? Dan On Thursday 20 January 2011 8:22:57 am Nordine Boussedra wrote: > We use wsdl2java (CXF 2.3.1) to generate classes from a wsdl. > > Here is the definition of the operation in the PortType: > > <wsdl:operation name="creerCongeSansRetour"> > <wsdl:input name="creerCongeSansRetourRequest" > message="tns:creerCongeSansRetourRequest" /> > <wsdl:fault name="UtilisateurInexistantException" > message="tns:UtilisateurInexistantException"> > </wsdl:fault> > </wsdl:operation> > > Binding: > > <wsdl:operation name="creerCongeSansRetour"> > <soap:operation soapAction="creerCongeSansRetour" > style="document" /> > <wsdl:input name="creerCongeSansRetourRequest"> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:fault name="UtilisateurInexistantException"> > <soap:fault name="UtilisateurInexistantException" > use="literal" /> > </wsdl:fault> > </wsdl:operation> > > /The JAX-WS specification says: > > Only java methods whose return type is void that have no parameters that > implement holder and that do not throw any checked exception can be > mapped to one way operations. > ... > automatic choice between two ways and one way mapping is not possible./ > > But when we generate java classes from WSDL we have the @oneWay > annotation above the method > > @Oneway > @WebMethod(action = "creerCongeSansRetour") > public void creerCongeSansRetour( > @WebParam(partName = "creerCongeSansRetourRequest", name = > "CreerCongesSansRetourRequest", targetNamespace = > "http://toto.titi.fr/gestion/conge/objets/v1/") CreerCongeRequest > creerCongeSansRetourRequest) > throws UtilisateurInexistantException; > > is it a bug in CXF or an error in my wsdl ? > > thanx for the help. > > > > Ce message est protégé par les règles relatives au secret des > correspondances. Il est donc établi à destination exclusive de son > destinataire. Celui-ci peut donc contenir des informations > confidentielles. La divulgation de ces informations est à ce titre > rigoureusement interdite. Si vous avez reçu ce message par erreur, merci > de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de > détruire le message ainsi que toute pièce jointe. > > This message is protected by the secrecy of correspondence rules. > Therefore, this message is intended solely for the attention of the > addressee. This message may contain privileged or confidential > information, as such the disclosure of these informations is strictly > forbidden. If, by mistake, you have received this message, please return > this message to the addressser whose e-mail address is written above and > destroy this message and all files attached. -- Daniel Kulp [email protected] http://dankulp.com/blog
