users@jax-rpc.java.net

XML validation in document literal WS

From: Kresimir Kers (ZG/ETK) <"Kresimir>
Date: Mon, 6 Sep 2004 11:20:48 +0200

Hello,

is it possible to validate received XML message according to schema in document literal web service. According to documentation if server WS is generated as document literal and in WSDL is set that WS is document literal wscompile should generate code that validates received XML message. I tried this but it seems that generated code does not validates received message.

I used following command to generate WS code

wscompile -gen:server -d classes -f:wsi -f:documentliteral -f:searchschema jwsdpconfig.xml

my WSDL looks like this:

<definitions xmlns:hl7="urn:hl7-org:v3" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="urn:hl7-org:v3/meta/voc" targetNamespace="urn:hl7-org:v3" name="FICR_AR060001">
        <types>
                <xsd:documentation>
                        This service defines Invoice Event Global Placer Final Generic Application Role - FICR_AR060001.
                        This service is realized as request-acknowledge. This is one way service and returns accept acknowledge to
                        acknowledge successfull reception of request message (Event Complete Notification Final Generic message - FICR_MT610101).
                </xsd:documentation>
                <xsd:schema targetNamespace="urn:hl7-org:v3">
                        <xsd:include schemaLocation="MCCI_MT000200.xsd"/>
                        <xsd:include schemaLocation="FICR_IN610101.xsd"/>
                        <xsd:element name="FICR_AR060001_Request_FICR_IN610101.Message" type="hl7:FICR_IN610101.Message"/>
                        <xsd:element name="FICR_AR060001_Request_MCCI_IN000002.Message" type="hl7:MCCI_MT000200.Message"/>
                </xsd:schema>
        </types>
        <message name="FICR_AR060001_Request_FICR_IN610101">
                <documentation>
SOAP message that defines Invoice Event Complete Notification Final Generic service request message.
                </documentation>
                <part name="body" element="hl7:FICR_AR060001_Request_FICR_IN610101.Message"/>
        </message>
        <message name="FICR_AR060001_Request_MCCI_IN000002">
                <documentation>
SOAP message that defines Accept Acknowledge message.
                </documentation>
                <part name="body" element="hl7:FICR_AR060001_Request_MCCI_IN000002.Message"/>
        </message>
        <portType name="FICR_AR060001_PortType">
                <operation name="FICR_AR060001_Request">
                        <documentation>
WS method that receives Invoice Event Complete Notification Final Generic message FICR_MT610101) and returns
Accept Acknowledge message (MCCI_IN000002)
                           </documentation>
                        <input message="hl7:FICR_AR060001_Request_FICR_IN610101"/>
                        <output message="hl7:FICR_AR060001_Request_MCCI_IN000002"/>
                </operation>
        </portType>
        <binding name="FICR_AR060001_Binding" type="hl7:FICR_AR060001_PortType">
                <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="FICR_AR060001_Request">
                        <soap:operation soapAction="urn:hl7-org:v3/FICR_AR060001_Request"/>
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
        </binding>
        <service name="FICR_AR060001_Service">
                <port name="FICR_AR060001_Port" binding="hl7:FICR_AR060001_Binding">
                        <soap:address location="http://host:port/WS/FICR_AR060001_Service"/>
                </port>
        </service>
</definitions>

I did pack WAR so it contains WSDL and XML schemas.


Kresimir Kers, B.Sc.E.E. & Comp.
System/Software Engineer Senior Specialist
E-Systems Department (ETK/OEP)
Ericsson Nikola Tesla d.d. Zagreb, Croatia
phone: +385 1 365 3911
mobile: +385 91 365 3911
fax: +385 1 365 3610
email: kresimir.kers_at_ericsson.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net