You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Oliver Adler <Ol...@SYRACOM.DE> on 2003/02/10 17:57:05 UTC
schema validation
Hi all,
I'am trying to force Axis to create a SOAP body which is not only well formed but valid against a xml-schema which is referenced in the body part. Does anybody know how to force the bean-seralizer to set the namespaces correct (I miss the correct prefix in childelements) and to add the schema location ????
All I got at the moment is this:
<?xml version="1.0" encoding="UTF-8"?>
<ns2:Kunde xsi:type="ns1:Kunde" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://acme.de/encoding" xmlns:ns2="http://acme.de/Kunde.xsd">
<name>Meier</name>
<adresse>
<PLZ>54321</PLZ>
<ort>Demohausen</ort>
<strasse>Demostr. 8</strasse>
</adresse>
<nummer>4711</nummer>
<vorname>Hans-Peter</vorname>
</ns2:Kunde>
and here how I think it should be:
<?xml version="1.0" encoding="UTF-8"?>
<ns2:Kunde xsi:type="ns1:Kunde" xmlns:ns1=http://acme.de/encoding <http://acme.de/encoding> xmlns:ns2=http://acme.de/Kunde.xsd <http://acme.de/Kunde.xsd> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acme.de/Kunde.xsd <http://acme.de/Kunde.xsd> http://somewhere <http://somewhere> ...">
<ns2:name>Meier</ns2:name>
<ns2:adresse>
<ns2:PLZ>54321</ns2:PLZ>
<ns2:ort>Demohausen</ns2:ort>
<ns2:strasse>Demostr. 8</ns2:strasse>
</ns2:adresse>
<ns2:nummer>4711</ns2:nummer>
<ns2:vorname>Hans-Peter</ns2:vorname>
</ns2:Kunde>
All ideas are welcome
Thanks
Oliver