Return-Path: Delivered-To: apmail-tuscany-dev-archive@www.apache.org Received: (qmail 28183 invoked from network); 1 Oct 2009 15:23:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Oct 2009 15:23:58 -0000 Received: (qmail 1468 invoked by uid 500); 1 Oct 2009 15:23:58 -0000 Delivered-To: apmail-tuscany-dev-archive@tuscany.apache.org Received: (qmail 1438 invoked by uid 500); 1 Oct 2009 15:23:58 -0000 Mailing-List: contact dev-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list dev@tuscany.apache.org Received: (qmail 1430 invoked by uid 99); 1 Oct 2009 15:23:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 15:23:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 15:23:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 897FB234C004 for ; Thu, 1 Oct 2009 08:23:23 -0700 (PDT) Message-ID: <230004232.1254410603549.JavaMail.jira@brutus> Date: Thu, 1 Oct 2009 08:23:23 -0700 (PDT) From: "Simon Laws (JIRA)" To: dev@tuscany.apache.org Subject: [jira] Assigned: (TUSCANY-3283) Generated WSDL not WS-I compliant in some cases In-Reply-To: <796278379.1253880256015.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TUSCANY-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Laws reassigned TUSCANY-3283: ----------------------------------- Assignee: Simon Laws > Generated WSDL not WS-I compliant in some cases > ----------------------------------------------- > > Key: TUSCANY-3283 > URL: https://issues.apache.org/jira/browse/TUSCANY-3283 > Project: Tuscany > Issue Type: Bug > Components: Java SCA Axis Binding Extension > Affects Versions: Java-SCA-1.5.1 > Environment: All > Reporter: Simon Laws > Assignee: Simon Laws > > Discussed here - http://www.mail-archive.com/dev%40tuscany.apache.org/msg09543.html > For an interface such as.. > package service; > import org.osoa.sca.annotations.Service; > @Service(SomeService.class) > public class SomeServiceImpl implements SomeService { > public AnObject getUsingString(String stringParam) { > System.out.println("Param value:" + stringParam); > return getAnObject(stringParam); > } > private AnObject getAnObject(String stringParam) { > return new AnObject(stringParam + "123", 123); > } > public AnObject getUsingMoreComplexObject(MoreComplexObject > moreComplexParam) { > System.out.println("Param value:" + moreComplexParam.getStringParam()); > return getAnObject(moreComplexParam.getStringParam()); > } > } > Tuscany generates the WSDL types... > > targetNamespace="http://service/" xmlns:tns="http://service/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/"> > > > > > > > > > > > > > > > > > elementFormDefault="unqualified" targetNamespace="http://service/" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > > > > type="xs:string" /> > > > > > > > type="anObject" /> > > > > > > > type="moreComplexObject" /> > > > > > > > type="anObject" /> > > > > > > However the wsgen JAXWS tooling generates the following schema for the WSDL... > > xmlns:tns="http://service/" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > type="tns:getUsingMoreComplexObject"/> > type="tns:getUsingMoreComplexObjectResponse"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Note that difference is that the schema types anObject and > moreComplexObject are generated into a namespace for wsgen and not > for Tuscany. > Now looking back at various related specs... > WS-I [1] says... > R2105 All xsd:schema elements contained in a wsdl:types element of a > DESCRIPTION MUST have a targetNamespace attribute with a valid and > non-null value, UNLESS the xsd:schema element has xsd:import and/or > xsd:annotation as its only child element(s) > And JAX-WS 2.1 I believe is intended to be WS-I compliant. > The wrinkle then seems to be that the JAXB spec defines a default Java > to XSD mapping where types are not placed in a namespace unless you > configure the Java class with annotations. The spec does talk of > "customizations" and I guess this is what the wsgen tool is doing but > I can't find any explicit statement about what these customizations > might be other than those provided by code annotations. This page [3] > suggests that it's sneaking behind the public JAXB API to make this > happen. > I found that the subject of the JAXB mapping had been discussed > before, e.g. [2], and I do remember testing that the no namespace > schema inclusion was actually valid. However I can't put my finger on > anything to do with customizing the mapping that has been discussed > here and why we aren't doing it. > Anyone know how to get JAXB to generate schema that are WS-I compliant > in this case? > I note that Axis have witten their own generator but I remember a long > time ago we used the Axis code and the stopped using it in favour of > the JAXB code for some reason. Anyone remember why (am searching the > ML also of course). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.