Sonic Connect : How to validate a request from the WSDL

Posted by jossebe on 06-Jul-2012 08:47

I've exposed a process as a Webservice.

I would like to validate some attribute values in a xsd defined in the WSDL.

For example :

     request extract :

          <trac:environment trac:type="test" />

                    where environment should only be : "test", "accptance" or "production".

     wsdl extract :

          ....

          <xs:complexType name="environmentType">

               <xsd:attribute name="type">

                    <xs:annotation>

                         <xs:documentation>

                              defini le type d'environnement pour lequel la trace est emise (test,

                              acceptance ou production)

                         </xs:documentation>

                    </xs:annotation>

                    <xs:restriction base="xs:string">

                         <xs:enumeration value="production"/>

                         <xs:enumeration value="acceptance"/>

                         <xs:enumeration value="test"/>

                     </xs:restriction>

               </xsd:attribute>

                   ....

How can I do that ?

Thanks

All Replies

Posted by wtam on 10-Jul-2012 08:44

You will need to edit the "spring.xml" in your project.  You can do so by clicking on "spring.xml" link in the Sonic Connect Editor in WorkBench to launch spring editor on spring.xml.

Look for cxf endpiont add the following property:


 
   

Save change and make sure you "upload all" to rebuild the CSAR archive (since the spring.xml is packaged into the CSAR archive).

Thanks.

This thread is closed