dynamic wsdl generated is different for different cxf version - cxf

Using cxf-rt-frontend-jaxws 3.1.8 with jaxb-impl 2.1.13. Using cxf-rt-frontend-jaxws in pom.xml. If I use any version higher than 2.1.13 the wsdl generated is different which causes clients to send soap messages in which elements are assigned wrong namespaces
WSDL definition that work (jaxb-impl 2.2.13). See CaseCourt definition
<xs:complexType name="QueryMessageType">
<xs:complexContent>
<xs:extension base="ns3:ComplexObjectType">
<xs:sequence>
<xs:element name="SendingMDELocationID" type="ns1:IdentificationType"/>
<xs:element name="SendingMDEProfileCode" type="xs:normalizedString"/>
<xs:element name="QuerySubmitter" type="ns1:EntityType"/>
<xs:element ref="ns4:CaseCourt"
if a higher version of jaxb-impl is used the definitions in the wsdl look like below and the client or SoapUI builds messages with wrong namespaces.
<xs:complexType name="QueryResponseMessageType">
<xs:complexContent>
<xs:extension base="ns4:ComplexObjectType">
<xs:sequence>
<xs:element name="SendingMDELocationID" type="ns1:IdentificationType"/>
<xs:element name="SendingMDEProfileCode" type="xs:normalizedString"/>
<xs:element name="CaseCourt" type="ns3:CourtType"
Any idea how to build the wsdl which uses ref using higher version of jaxb-impl or cxf. Basically com.sun apis work, Jakarta messes up the request message namespaces
tried different things but nothing works.

Related

SQL Server XML schema validation; invalid content error; expecting element with minoccurs set to 0?

I have an XSD from a third party that I'm trying to use to create an XML schema collection in SQL Server and validate XML received from that third party.
Upon validation, I receive an error:
XML Validation: Invalid content. Expected element(s): 'element1','element2'. Found: element 'element3' instead. Location: /DOCUMENT[1]/:reference_data[1]/:element3[1].
The relevant XSD and XML look correct to me and I can't determine why this error is occurring. Here is the relevant XSD trimmed back to the relevant elements (the whole document is huge so I won't post here):
<xs:element name="reference_data">
<xs:complexType>
<xs:sequence>
<xs:element name="element1" minOccurs="0" maxOccurs="256">
<xs:complexType>
<xs:simpleContent>
... some other stuff
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="element2" minOccurs="0" maxOccurs="50">
<xs:complexType>
<xs:simpleContent>
... some other stuff
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0" maxOccurs="1000">
<xs:element name="element3" minOccurs="0" maxOccurs="1000">
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
Here is the relevant XML being validated:
<reference_data>
<element1>ABCD</element1>
<element3>
<associated_detail1>whatever</associated_detail1>
<associated_detail2>whatever</associated_detail2>
</element3>
</reference_data>
As you can see, element1 is there, so I don't understand why it found element3 and not element1. Element2 is not there, but it's also defined in the XSD as minoccurs=0, so why is it "expected"?
It is unusual for an XSD validator to issue incorrect validation errors - especially if the XML processor is one of the heavily-used ones (such as the one shipped with a Java VM).
However, if your XSD and XML are exactly as posted then I agree with your assessment. After seeing the first occurrence of /reference_data/element1, the allowed set of 'next tag names' is (element1,element2,element3).
Filburt's comment about the unexpected child elements under element3 is correct, but that should produce a different XSD validation error (one that relates to the content of element3)
I recommend that you re-test with the exact XSD and XML that you posted.

How to avoid CXF codegen from changing element names in schema?

I am using cxf-codegen-plugin v. 3.2.4 in a maven project. WSDL refers to the schema:
<xsd:import namespace="http://mynamespace/"
schemaLocation="../schema/MySchema.xsd"/>
But when the generated Server runs, the published wsdl refers to the schema like this:
<xsd:import namespace="http://mynamespace/" schemaLocation="http://localhost:9999/?xsd=1"/>
And this generated xsd changed the argument names for a given method. The original schema has the following definition:
<xs:complexType name="myMethod">
<xs:sequence>
<xs:element name="messageHeader" type="tns:soapMessageHeader" minOccurs="0"/>
<xs:element name="myId" type="xs:string" minOccurs="0"/>
<xs:element name="mySecondId" type="xs:string" minOccurs="0"/>
<xs:element name="myThirdId" type="xs:string" minOccurs="0"/>
<xs:element name="password" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
Whereas the generated schema has the following:
<xs:complexType name="myMethod">
<xs:sequence>
<xs:element name="arg0" type="tns:soapMessageHeader" minOccurs="0"/>
<xs:element name="arg1" type="xs:string" minOccurs="0"/>
<xs:element name="arg2" type="xs:string" minOccurs="0"/>
<xs:element name="arg3" type="xs:string" minOccurs="0"/>
<xs:element name="arg4" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
It changed the element names from the defined ones to "arg0", "arg...". I need this not to be done.
My pom has this:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${source.wsdl.path}</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/MyServiceDefinition.wsdl</wsdl>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
The automatically generated interface for the service has the #WebParam annotation.
Can anyone help me, please?
In http://www.benmccann.com/web-services-tutorial-with-apache-cxf the author indicates the usage of endpointInterface annotation attribute in order to respect the annotations inside the automatically generated interface (by cxf itself):
#WebService(endpointInterface = "com.company.auth.service.AuthService",
serviceName = "corporateAuthService")
This alternative requires no additional xml configuration.
Tomcat EE documentation gives us a completed example: http://tomee.apache.org/examples-trunk/simple-webservice
Yet another stackoverflow question that could be related: jax-ws regarding endpointinterface
I have just figured it out: although the generated interface for the service has the #WebParam annotation, the respective concrete class that implements the EndPoint does not have it. I thought that wouldn't be a problem, since the interface has the annotation. Then I tried to add them to the parameters and voilá! The generated xsd suddenly comes out right and I can read the parameters!

How do I validate SQL tables data using a schema

My understanding is poor so really need a place to start looking for information.
I have 4 SQL tables of data. I would like to output all of them to an XML file.
I have an XML Schema to work with but no idea how to use it or where it should be used.
Long term objective is to have 30 hand off tables which we can run validation scripts against and then using the XML Scheme given generate 1 XML file for submission.
I am a novice here and learning as I go so any suggestions where to look would be appreciated.
SAMPLE XML DATA
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2013 rel. 2 sp2 (http://www.altova.com)-->
-<MSDS:MSDS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:MSDS="http://www.datadictionary.nhs.uk/messages/MSDS-v1-0" xsi:schemaLocation="http://www.datadictionary.nhs.uk/messages/MSDS-v1-0 ../Schemas/MSDSMSDS_XMLSchema-v1-0.xsd">
-<MATHDRHeader>
<Version>1.0</Version>
<OrgCodeProv>5BC</OrgCodeProv>
<OrgCodeSubmitter>YEA</OrgCodeSubmitter>
<RPStartDate>2013-01-01</RPStartDate>
<RPEndDate>2013-03-12</RPEndDate>
<FileCreationDateTime>2013-03-13T13:00:27</FileCreationDateTime>
<RecordCount>1</RecordCount>
-<MAT001MothersDemographics>
<LocalPatientIdMother>112552254</LocalPatientIdMother>
<OrgCodeLocalPatientIdMother>5BC</OrgCodeLocalPatientIdMother>
<OrgCodeRes>5BC</OrgCodeRes>
<NHSNumberMother>1111111111</NHSNumberMother>
<NHSNumberStatusMother>01</NHSNumberStatusMother>
<PersonBirthDateMother>1982-01-05</PersonBirthDateMother>
<Postcode>LS1 4HY</Postcode>
<EthnicCategoryMother>99</EthnicCategoryMother>
<PersonDeathDateTimeMother>1900-01-01T00:00:00</PersonDeathDateTimeMother>
-<MAT003GPPracticeRegistration>
<LocalPatientIdMother>112552254</LocalPatientIdMother>
<OrgCodeGMPMother>4RT</OrgCodeGMPMother>
<StartDateGMPRegistration>2012-01-06</StartDateGMPRegistration>
<EndDateGMPRegistration>1900-01-01</EndDateGMPRegistration>
<OrgCodeCommissioner>6TY</OrgCodeCommissioner>
</MAT003GPPracticeRegistration>
-<MAT101BookingAppointmentDetails>
<AntenatalAppDate>2013-03-01</AntenatalAppDate>
<LocalPatientIdMother>112552254</LocalPatientIdMother>
<EDDAgreed>2013-05-01</EDDAgreed>
<EDDMethodAgreed>01</EDDMethodAgreed>
<PregnancyFirstContactDate>2013-11-11</PregnancyFirstContactDate>
<PregnancyFirstContactCareProfessionalType>060</PregnancyFirstContactCareProfessionalType>
<LastMenstrualPeriodDate>2012-10-01</LastMenstrualPeriodDate>
<PhysicalDisabilityStatusIndMother>Y</PhysicalDisabilityStatusIndMother>
<FirstLanguageEnglishIndMother>Y</FirstLanguageEnglishIndMother>
<EmploymentStatusMother>04</EmploymentStatusMother>
<SupportStatusMother>Y</SupportStatusMother>
<EmploymentStatusPartner>06</EmploymentStatusPartner>
<PreviousCaesareanSections>0</PreviousCaesareanSections>
<PreviousLiveBirths>0</PreviousLiveBirths>
<PreviousStillBirths>0</PreviousStillBirths>
<PreviousLossesLessThan24Weeks>0</PreviousLossesLessThan24Weeks>
<SubstanceUseStatus>01</SubstanceUseStatus>
<SmokingStatus>03</SmokingStatus>
<CigarettesPerDay>0</CigarettesPerDay>
<AlcoholUnitsPerWeek>0</AlcoholUnitsPerWeek>
<FolicAcidSupplement>03</FolicAcidSupplement>
<MHPredictionDetectionIndMother>N</MHPredictionDetectionIndMother>
<PersonWeight>75.0</PersonWeight>
<PersonHeight>1.45</PersonHeight>
<ComplexSocialFactorsInd>N</ComplexSocialFactorsInd>
</MAT101BookingAppointmentDetails>
</MATHDRHeader>
</MSDS:MSDS>
SAMPLE XDS
<xs:complexType name="MSDSMAT001MothersDemographicsType">
<xs:sequence>
<xs:element name="LocalPatientIdMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>LOCAL PATIENT IDENTIFIER (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="OrgCodeLocalPatientIdMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>ORGANISATION CODE (LOCAL PATIENT IDENTIFIER (MOTHER))</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="OrgCodeRes" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>ORGANISATION CODE (RESIDENCE RESPONSIBILITY)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="NHSNumberMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>NHS NUMBER (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="NHSNumberStatusMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>NHS NUMBER STATUS INDICATOR CODE (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="PersonBirthDateMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>PERSON BIRTH DATE (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Postcode" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>POSTCODE OF USUAL ADDRESS (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="EthnicCategoryMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>ETHNIC CATEGORY (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="PersonDeathDateTimeMother" type="ST" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>PERSON DEATH DATE TIME (MOTHER)</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="MAT003GPPracticeRegistration" type="MSDSMAT003GPPracticeRegistrationType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT101BookingAppointmentDetails"
type="MSDSMAT101BookingAppointmentDetailsType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT112DatingScanProcedure" type="MSDSMAT112DatingScanProcedureType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT201BloodGroupRhesusTest" type="MSDSMAT201BloodGroupRhesusTestType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT203RubellaSusceptibilityTest"
type="MSDSMAT203RubellaSusceptibilityTestType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT205HepatitisBScreeningTest"
type="MSDSMAT205HepatitisBScreeningTestType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT210AsymptomaticBacteriuriaScreeningOffer"
type="MSDSMAT210AsymptomaticBacteriuriaScreeningOfferType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT211HaemoglobinopathyScreeningTest"
type="MSDSMAT211HaemoglobinopathyScreeningTestType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT301MaternityCarePlan" type="MSDSMAT301MaternityCarePlanType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT303DownsSyndromeScreeningTest"
type="MSDSMAT303DownsSyndromeScreeningTestType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT305FetalAnomalyScreeningTest"
type="MSDSMAT305FetalAnomalyScreeningTestType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT306AntenatalAppointment" type="MSDSMAT306AntenatalAppointmentType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT307MedicalDiag" type="MSDSMAT307MedicalDiagType" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT309MaternityObstetricDiag" type="MSDSMAT309MaternityObstetricDiagType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT310AntenatalAdmission" type="MSDSMAT310AntenatalAdmissionType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT404LabourAndDelivery" type="MSDSMAT404LabourAndDeliveryType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT408MCI" type="MSDSMAT408MCIType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="MAT501FetusOutcome" type="MSDSMAT501FetusOutcomeType" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT502BabysDemographicsAndBirthDetails"
type="MSDSMAT502BabysDemographicsAndBirthDetailsType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT602PostpartumDischarge" type="MSDSMAT602PostpartumDischargeType"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="MAT603PostpartumReadmission" type="MSDSMAT603PostpartumReadmissionType"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Appears this one is too hard as cant get a reply anywhere online on any site
Well, I cannot let this pass unchallenged :-D
too hard must be discussed... One problem is, that the schema, as well as the data you provide is not complete / invalid... In your attempts to shorten the provided sample data (which is great!) you created invalid sample data...
I would have to invest a lot of time first to understand what you really want and then to set up a mock-up project.
And now we are in the very center of too hard: I do not have the time for this... This is something you should provide. The best was a reproduceable stand-alone project. Please read How to ask a good SQL question and How to create a MCVE
SQL Server doesn't support a built-in schema check or schema related export automatisms. Therefore I told you in my first comment, that T-SQL might be the wrong tool...
You did not answer the question Are there any other tools / languages available ...
This code is a very simple C# code. It will create the internal structure of the dataset out of a schema and then load the given XML into this DataSet. This will fail, when the XML is not compatible. That might be a schema check for you.
var ds = new System.Data.DataSet("TestSchema");
ds.ReadXmlSchema(#"C:\SomePath\MotherSchema.xml");
ds.ReadXml(#"C:\SomePath\MotherData.xml");
//The above in a try-catch, wrapped in a function might be enough as schema checked
//The following code would read the data into a string to check the success (totally untested...)
var sb = new System.Text.StringBuilder();
foreach (var t in ds.Tables) {
var tbl = t as System.Data.DataTable;
foreach (var r in tbl.Rows) {
var rw = r as System.Data.DataRow;
foreach (var c in tbl.Columns) {
var cl = c as System.Data.DataColumn;
sb.AppendLine(string.Format("{0}.{1}: {2}",tbl.TableName,cl.ColumnName,rw[cl].ToString()));
}
}
}
var str = sb.ToString();
Finally (as pointed out in my comment If I understand this correctly, you do not need a schema at all) I'd create the XML using FOR XML PATH exactly the way you need it. That is roughly the same approach your complicated Access legacy code is doing: Just create a correct XML. Does the Access solution reflect any schema? Probably not... See what I mean?
UPDATE Just to give you an idea:
USE master;
GO
CREATE DATABASE TestDB;
GO
USE TestDB;
GO
--Some tiny tables with tiny data. More columns are just more of the same...
CREATE TABLE MAT001MothersDemographics(ID BIGINT, Code VARCHAR(100));
INSERT INTO MAT001MothersDemographics VALUES(1111111,'1A1')
,(222222,'2B2');
CREATE TABLE MAT003GPPracticeRegistration(ID BIGINT,MotherID BIGINT,StartDate Date);
INSERT INTO MAT003GPPracticeRegistration VALUES(1,111111,{d'2001-01-01'})
,(2,222222,{d'2002-02-02'});
--I create the innner XML without namespaces as they seem to appear in the outer most node only...
DECLARE #MotherID BIGINT=222222;
DECLARE #innerXML XML= --without namespaces
(
SELECT '1.0' AS [MVersion]
,'5BC' AS [OrgCodeProv]
,GETDATE() AS [FileCreationDateTime]
,(
SELECT ID AS LocalPatientIdMother
,Code AS OrgCodeLocalPatientIdMother
FROM MAT001MothersDemographics
WHERE ID=#MotherID
FOR XML PATH('MAT001MothersDemographics'),TYPE
)
,(
SELECT MotherID AS LocalPatientIdMother
,StartDate AS StartDateGMPRegistration
FROM MAT003GPPracticeRegistration
WHERE MotherID=#MotherID
FOR XML PATH('MAT003GPPracticeRegistration'),TYPE
)
FOR XML PATH('MATHDRHeader')
);
--This will wrap the previously created XML with the <MSDS:MSDS> node
WITH XMLNAMESPACES('http://www.w3.org/2001/XMLSchema-instance' AS xsi
,'http://www.datadictionary.nhs.uk/messages/MSDS-v1-0' AS MSDS
,'http://www.datadictionary.nhs.uk/messages/MSDS-v1-0 ../Schemas/MSDSMSDS_XMLSchema-v1-0.xsd' AS schemaLocation)
SELECT #innerXML
FOR XML PATH('MSDS:MSDS');
--Clear Up
GO
USE master;
GO
DROP DATABASE TestDB;
GO
The result for this tiny portion look pretty much the way you need it:
<MSDS:MSDS xmlns:schemaLocation="http://www.datadictionary.nhs.uk/messages/MSDS-v1-0 ../Schemas/MSDSMSDS_XMLSchema-v1-0.xsd" xmlns:MSDS="http://www.datadictionary.nhs.uk/messages/MSDS-v1-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MATHDRHeader>
<MVersion>1.0</MVersion>
<OrgCodeProv>5BC</OrgCodeProv>
<FileCreationDateTime>2017-04-21T10:45:57.590</FileCreationDateTime>
<MAT001MothersDemographics>
<LocalPatientIdMother>222222</LocalPatientIdMother>
<OrgCodeLocalPatientIdMother>2B2</OrgCodeLocalPatientIdMother>
</MAT001MothersDemographics>
<MAT003GPPracticeRegistration>
<LocalPatientIdMother>222222</LocalPatientIdMother>
<StartDateGMPRegistration>2002-02-02</StartDateGMPRegistration>
</MAT003GPPracticeRegistration>
</MATHDRHeader>
</MSDS:MSDS>

How can one force a specific serialization order with the SimpleXML Framework?

I am still experimenting with the SimpleXML framework. As a first step I am parsing a larger XML file and then immediately emitting it as XML again, i.e. my test-program so far looks like:
Persister serializer = new Persister(new TypeMatcher());
File source = new File(filenameIn);
List myList = serializer.read(List.class, source);
serializer.write(myList, outfile);
This works all fine, however, what I noticed is, that the fields of the List are emitted in the wrong order!
The schema that my List has to follow reads:
<xs:element name="list">
<xs:complexType>
<xs:sequence>
<xs:element name="properties" type="Properties" maxOccurs="1" minOccurs="1" />
<xs:element name="columns" type="Columns" maxOccurs="unbounded" minOccurs="1" />
<xs:element name="items" type="Items" maxOccurs="unbounded" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
When the list is written, however, the sequence that I get is:
<list>
<items>
...
</items>
<properties ...>
...
</properties>
<columns>
...
</columns>
</list>
i.e. the items, which should come last, are emitted first. That causes error on later reading again, since the items refer to data that are define in the columns, which are then still undefined, if that order is not maintained.
M.
For maintaining order on serialization the #Order annotation can be used (see this tutorial).
Also, in the specific context of serializing with simple-framework, Java List does not usually guarantee order, but you can use LinkedList for that matter.

Return an Array of Arrays via PHP WSDL based web service

I'm struggling with the following problem:
I have a PHP-based web service which needs to be consumed by various
clients. As long as I keep things simple, everything works fine. I figured that Axis2 and .NET don't like soapenc:array definitions in WSDL, so I created list types for mapping object arrays:
<xsd:complexType name="CourseList">
<xsd:sequence>
<xsd:element name="Courses" type="tns:Course" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
Now, if I include something like a List of CourseLists (using the same WSDL procedure), .NET fails as Axis2 (ADB) does with handling this data.
I checked the XML that comes over the wire with soapUI; it looks reasonable.
I'm really on the ropes with this one. Any hint would be highly appreciated.
TIA
KB22
This question is older than sin, but it's never been answered, and I struggled to find an answer myself when I recently ran into the same problem. There might be a better way to do this, but what I ultimately ended up doing was something like this.
This is actually even a level further, a 3-d array, but the general principle is the same.
<xs:element name="myOtherArray">
<xs:complexType>
<xs:sequence>
<xs:element name="someInsideArrayProperty" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:element name="myArray">
<xs:complexType>
<xs:sequence>
<xs:element name="someArrayProperty" type="xs:string"/>
<xs:element name="yetAnotherArray" maxOccurs="unbounded" type="ns:myOtherArray"/>
</xs:sequence>
</xs:complexType>
<xs:element name="myResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="myResponseArray" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="someProperty" type="xs:int"/>
<xs:element name="someOtherProperty" type="xs:string"/>
...
<xs:element name="anotherArray" type="ns:myArray" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>

Resources