Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8902D14E for ; Wed, 5 Dec 2012 03:23:05 +0000 (UTC) Received: (qmail 41192 invoked by uid 500); 5 Dec 2012 03:23:03 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 40725 invoked by uid 500); 5 Dec 2012 03:23:01 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 40637 invoked by uid 99); 5 Dec 2012 03:22:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 03:22:58 +0000 Date: Wed, 5 Dec 2012 03:22:58 +0000 (UTC) From: "iris ding (JIRA)" To: issues@cxf.apache.org Message-ID: <902988274.61901.1354677778841.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (CXF-4676) Partial WSDL support in CXF MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 iris ding created CXF-4676: ------------------------------ Summary: Partial WSDL support in CXF Key: CXF-4676 URL: https://issues.apache.org/jira/browse/CXF-4676 Project: CXF Issue Type: Bug Components: Services Affects Versions: 2.6.2 Reporter: iris ding Fix For: 2.6.2 I have one SEI defined as below: @WebService(wsdlLocation="WEB-INF/wsdl/AddNumbersImplPartial1Service.wsdl") public class AddNumbersImplPartial1 { public int addTwoNumbers(int number1, int number2) throws AddNegativeNumbersException { if (number1 < 0 || number2 < 0) { throw new AddNegativeNumbersException("Negative number submitted !! ", "Numbers: " + number1 + ", " + number2); } return number1 + number2; } } The WEB-INF/wsdl/AddNumbersImplPartial1Service.wsdl is not complete, it only contains to the porttype part: Now if I put the war file into tomcat and let it use CXF, the service can not be deployed successfully. In CXF, when it calls WSDLServiceFactory.create, it will simply get the service name from wsdl file and in our case, since it is empty, it will throw exception and service deployment failed. you can reference below part: javax.wsdl.Service wsdlService = definition.getService(serviceName); if (wsdlService == null) { throw new ServiceConstructionException(new Message("NO_SUCH_SERVICE_EXC", LOG, serviceName)); } But per jaxws 2.2 spec, in chapter 5.2.5.5: 5.2.5.5 Application-specified PortType No metadata document contains a definition for the sought-after service S, but a metadata document, say D, contains a definition for the WSDL portType whose qualified name, say P, matches that specified by the endpoint being published. In this case, a JAX-WS implementation MUST create a new description for S, including an appropriate WSDL binding element referencing portType P. The metadata document D MUST be imported/included so that the published contract uses the definition of P provided by D. No schema generation occurs,as P is assumed to embed or import schema definitions for all the types/elements it requires. Like in the previous case, the implementation MUST override any location and schemaLocation attributes. It is an error if more than one metadata document contains a definition for the sought-after portType P. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira