hi, axis does no validation !! If you want schema validation you have to implement it, (ceate a validation handler). Regards Oliver
-----Urspr�ngliche Nachricht-----
Von: Krishnakumar B [mailto:[EMAIL PROTECTED]]
Gesendet: Di 11.02.2003 11.10 Uhr
An: Axis-User@Xml. Apache. Org (E-mail)
Cc:
Betreff: Validation
hi
I have created a message style web service. I want the request validated against a XSD
Schema.
How do i do this?
The server accepts any form of XML request i send and it is not validated against the
schema in the WSDL.
My client
String namespace = "http://localhost:8080/DOMService/services/DOMService";
String wsdlURL = "http://localhost:8080/DOMService/DOMService_Modified.wsdl";
QName serviceQN = new QName(namespace, "DOMServiceService");
QName portQN = new QName(namespace, "DOMService");
Service service = new Service(new URL(wsdlURL), serviceQN);
Call call = (Call) service.createCall(portQN, "echoDoc");
Vector results = (Vector) call.invoke(
new Object[] {
new SOAPBodyElement(new ByteArrayInputStream(s.getBytes("UTF-8")))});
RPCElement doc = (RPCElement) results.get(0);
My WSDL
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:intf="http://localhost:8080/DOMService/services/DOMService"
xmlns:tns1="http://DefaultNamespace"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://localhost:8080/DOMService/services/DOMService">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://DefaultNamespace">
<complexType name="Tester">
<all>
<element name="One" nillable="true" type="xsd:string"/>
<element name="Two" nillable="true" type="xsd:string"/>
</all>
</complexType>
<element name="Tester" nillable="true" type="tns1:Tester"/>
</schema>
</wsdl:types>
<wsdl:message name="echoDocResponse">
<wsdl:part name="echoDocResponse" type="tns1:Tester"/>
</wsdl:message>
<wsdl:message name="echoDocRequest">
<wsdl:part name="echoDocRequest" type="tns1:Tester"/>
</wsdl:message>
<wsdl:portType name="DOMService">
<wsdl:operation name="echoDoc">
<wsdl:input name="echoDocRequest" message="intf:echoDocRequest"/>
<wsdl:output name="echoDocResponse" message="intf:echoDocResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DOMServiceSoapBinding" type="intf:DOMService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echoDoc">
<wsdlsoap:operation/>
<wsdl:input>
<wsdlsoap:body use="literal"
namespace="http://localhost:8080/DOMService/services/DOMService"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal"
namespace="http://localhost:8080/DOMService/services/DOMService"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DOMServiceService">
<wsdl:port name="DOMService" binding="intf:DOMServiceSoapBinding">
<wsdlsoap:address
location="http://dt675-krishnakb:8080/DOMService/services/DOMService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Regards
BKK
DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged.
Before opening attachments please check them for viruses and defects. MindTree
Consulting Private Limited (MindTree) will not be responsible for any viruses or
defects or any forwarded attachments emanating either from within MindTree or outside.
If you have received this message by mistake please notify the sender by return e-mail
and delete this message from your system. Any unauthorized use or dissemination of
this message in whole or in part is strictly prohibited. Please note that e-mails are
susceptible to change and MindTree shall not be liable for any improper, untimely or
incomplete transmission.
<<winmail.dat>>
