Factory XML Web Services Software XML Schema

I am trying to create an XML schema for use with the Factory web service. This is a fairly simple scheme, which is only a group of human objects. The (simplified) file for the circuit looks like this:

<?xml version="1.0" encoding="utf-8" ?> 
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
    elementFormDefault="qualified" 
    xmlns="http://tempuri.org/XMLSchema.xsd"
    xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="Persons" type="PersonsType" />

    <xs:complexType name="PersonsType">
        <xs:sequence>
            <xs:element name="Person" type="PersonType" minOccurs="0"
                maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="PersonType">
        <xs:all>
            <xs:element name="PersonName" type="xs:string" />
            <xs:element name="PersonAge" type="xs:integer" />
        </xs:all>
    </xs:complexType>

</xs:schema>

This is a simple collection of personal elements with a parent element called Person.

When I try to check my .serviceContract file, I get the error "The file name" Person.xsd "does not match the DataContactSerializer."

- , , - Factory? , , . , , WSSF, .

+3
1

?

<?xml version="1.0" encoding="utf-8" ?> 
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
  elementFormDefault="qualified" 
  xmlns="http://tempuri.org/XMLSchema.xsd"
  xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="Persons">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Person" minOccurs="0" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="PersonName" type="xs:string" />
                            <xs:element name="PersonAge" type="xs:integer" />
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
         </xs:complexType>
    </xs:element>

< xs: all > < > <Person> .

+1

Source: https://habr.com/ru/post/1731052/


All Articles