[ 
https://issues.apache.org/jira/browse/TUSCANY-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528445
 ] 

Raymond Feng commented on TUSCANY-1738:
---------------------------------------

The validation is producing the correct result. Here is the XSD for the 
component. Please note the implementation should come before 
service|reference|property.

    <complexType name="Component">
        <sequence>
             <choice minOccurs="0" maxOccurs="1">
                     <element ref="sca:implementation"/>
                     <any namespace="##other" processContents="lax"/>
             </choice>
             <choice minOccurs="0" maxOccurs="unbounded">
                <element name="service" type="sca:ComponentService"/>
                <element name="reference" type="sca:ComponentReference"/>
                <element name="property" type="sca:PropertyValue" />
             </choice>
             <!-- 
             <any namespace="##other" processContents="lax" minOccurs="0" 
                maxOccurs="unbounded"/>
             -->
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="autowire" type="boolean" use="optional" 
default="false"/>
        <attribute name="constrainingType" type="QName" use="optional"/>
        <attribute name="requires" type="sca:listOfQNames" use="optional"/>
        <attribute name="policySets" type="sca:listOfQNames" use="optional"/>
        <anyAttribute namespace="##any" processContents="lax"/>
    </complexType>


> WSDL validation reports errors for correct WSDL
> -----------------------------------------------
>
>                 Key: TUSCANY-1738
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1738
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.0
>         Environment: All
>            Reporter: Simon Nash
>             Fix For: Java-SCA-1.0
>
>
> I am seeing WSDL validation errors for WSDL that is correct.   The following 
> WSDL gives a validation error:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>     targetNamespace="http://helloworld";
>     xmlns:hw="http://helloworld";
>     name="helloworldws">
>     <component name="HelloWorldServiceComponent">
>         <service name="HelloWorldService">
>             <interface.java interface="helloworld.HelloWorldService"/>
>             <binding.ws uri="http://localhost:8085/HelloWorldService"/>
>         </service>
>         <implementation.java class="helloworld.HelloWorldImpl" />
>     </component>
> </composite>
> The validation error is as follows:
> 18-Sep-2007 12:10:56 
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader$1 
> error
> WARNING: XMLSchema validation problem in:
>      
> file:/H:/tuscany52/sca-1.0/itest/ws-void-args-return/target/classes/helloworldws.composite,
>  line: 30, column: 9
> cvc-complex-type.2.4.a: Invalid content was found starting with element 
> 'implementation.java'.
>     One of '{"http://www.osoa.org/xmlns/sca/1.0":service, 
> "http://www.osoa.org/xmlns/sca/1.0":reference,
>         "http://www.osoa.org/xmlns/sca/1.0":property}' is expected.
> If the <implementation.java> line is moved before the <service> line, the 
> error does not occur.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to