Sunday, September 25, 2011

Customization of WSDL using bindings.xml

<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings wsdlLocation="RestaurantService.wsdl"
    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

    <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema">
        <jaxb:globalBindings choiceContentProperty="true" 
            collectionType="java.util.Set"
            generateIsSetMethod="true"
            enableJavaNamingConventions="true">
            <!--
                <jaxb:javaType name="java.util.Date"
                xmlType="xs:dateTime"
                parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
                printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
                <jaxb:javaType name="java.util.Date" xmlType="xs:date"
                parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
                printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>
            -->
        </jaxb:globalBindings>
    </jaxws:bindings>
</jaxws:bindings> 


Reference Link

No comments:

Post a Comment