You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "jimma (JIRA)" <ji...@apache.org> on 2007/04/29 08:58:15 UTC

[jira] Assigned: (CXF-607) ReflectionServiceFactoryBean generate two element with same name in same schema

     [ https://issues.apache.org/jira/browse/CXF-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jimma reassigned CXF-607:
-------------------------

    Assignee: jimma

> ReflectionServiceFactoryBean generate two element with same name in same schema
> -------------------------------------------------------------------------------
>
>                 Key: CXF-607
>                 URL: https://issues.apache.org/jira/browse/CXF-607
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Freeman Fang
>         Assigned To: jimma
>
> one problem I encounter is server side throw exception as
> org.xml.sax.SAXParseException: sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.iona.com/com.iona.test.TestInterface/xsd,getMessage'.
> when build service from class.
> I print out the schema in ReflectionServiceFactoryBean
> it's 
> <?xml version="1.0" encoding="utf-8"?>
> <xs:schema xmlns="http://www.iona.com/com.iona.test.TestInterface/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.iona.com/com.iona.test.TestInterface/xsd">
>         <xs:element name="charEl_return">
>                 <xs:complexType>
>                         <xs:sequence>
>                                 <xs:element name="varChar" type="xs:string"/>
>                                 <xs:element name="varInt" type="xs:int"/>
>                                 <xs:element name="varString" type="xs:string"/>
>                         </xs:sequence>
>                 </xs:complexType>
>         </xs:element>
>         <xs:element name="charEl_x" nillable="true" type="xs:string"/>
>         <xs:element name="charEl_y" nillable="true" type="xs:string"/>
>         <xs:element name="charEl_z" nillable="true" type="xs:string"/>
>         <xs:element name="getMessage" nillable="true" type="xs:string"/>
>         <xs:element name="getMessageResponse" nillable="true" type="xs:string"/>
>         <xs:element name="setMessage" nillable="true" type="xs:string"/>
>         <xs:element name="setMessageResponse" nillable="true" type="xs:string"/>
>         <xs:element name="getMessage" nillable="true" type="xs:string"/>
>         <xs:element name="getMessageResponse" nillable="true" type="xs:string"/>
>         <xs:element name="charEl_x" nillable="true" type="xs:string"/>
>         <xs:element name="setMessage" nillable="true" type="xs:string"/>
>         <xs:element name="setMessageResponse" nillable="true" type="xs:string"/>
> </xs:schema>
> we can see that in this schema several duplicated element. I believe the error is caused by when we generated schema element from method parameter, we didn't check if the same parameter type alreay added.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.