You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Yadav, Yogendra (IT)" <Yo...@morganstanley.com> on 2008/08/05 23:10:12 UTC

wsdl2java not generating wrapper style interface

Hi,

I am using cxf 2.1.1. Using wsdl2java for the below WSDL does not
generate wrapper style interface. Can someone tell me why ?

<?xml version="1.0" ?>
<wsdl:definitions name="DAPReporterService"
    targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
    xmlns:ns1="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
        <xs:schema attributeFormDefault="unqualified"
            elementFormDefault="unqualified"
 
targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
 
xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
            xmlns:xs="http://www.w3.org/2001/XMLSchema">
            <xs:element name="getMyFolders">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element minOccurs="0" name="UserID"
	                        type="xs:string">
	                    </xs:element>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="getMyFoldersResponse">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element ref="tns:Folders"/>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="getUserPermissions">
            	<xs:complexType>
                    <xs:sequence>
	                    <xs:element ref="tns:User"></xs:element>
                    </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="getUserPermissionsResponse">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element ref="tns:Folders"/>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="Folders">
                <xs:complexType>
	                <xs:sequence>
	                    <xs:element maxOccurs="unbounded"
ref="tns:Folder"/>
	                </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="Folder">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="folderPath"
type="xs:string"></xs:element>
                        <xs:element name="employeeName"
type="xs:string"></xs:element>
                        <xs:element name="dirId"
type="xs:string"></xs:element>
                        <xs:element name="division"
type="xs:string"></xs:element>
                        <xs:element name="department"
type="xs:string"></xs:element>
                        <xs:element name="region"
type="xs:string"></xs:element>
                        <xs:element name="city"
type="xs:string"></xs:element>
                        <xs:element name="permission"
type="xs:string"></xs:element>
                        <xs:element name="permissionAuthorizer"
type="xs:string"></xs:element>
                        <xs:element name="datePermissioned"
type="xs:string"></xs:element>
                        <xs:element name="permissionReason"
type="xs:string"></xs:element>
                        <xs:element name="permissionExpiration"
type="xs:string"></xs:element>
                        <xs:element name="acctStatus"
type="xs:string"></xs:element>
                        <xs:element name="employeeNo"
type="xs:string"></xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="User">
                <xs:complexType>
                    <xs:sequence></xs:sequence>
                    <xs:attribute name="msid"
type="xs:string"></xs:attribute>
                    <xs:attribute name="loginid"
type="xs:string"></xs:attribute>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="getMyFolders">
        <wsdl:part element="tns:getMyFolders"
name="getMyFolders"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="getUserPermissionsResponse">
        <wsdl:part element="tns:getUserPermissionsResponse"
name="getUserPermissionsResponse"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="getMyFoldersResponse">
        <wsdl:part element="tns:getMyFoldersResponse"
name="getMyFoldersResponse"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="getUserPermissions">
        <wsdl:part element="tns:getUserPermissions"
name="getUserPermissions"></wsdl:part>
    </wsdl:message>
    <wsdl:portType name="DAPReporter">
        <wsdl:operation name="getMyFolders">
            <wsdl:input message="tns:getMyFolders"
name="getMyFolders"></wsdl:input>
            <wsdl:output message="tns:getMyFoldersResponse"
name="getMyFoldersResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getUserPermissions">
            <wsdl:input message="tns:getUserPermissions"
name="getUserPermissions"></wsdl:input>
            <wsdl:output message="tns:getUserPermissionsResponse"
name="getUserPermissionsResponse"></wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DAPReporterServiceHttpBinding"
        type="tns:DAPReporter">
        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="getMyFolders">
          <soap:operation soapAction="getMyFolders" style="document"/>
            <wsdl:input name="getMyFolders">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getMyFoldersResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getUserPermissions">
          <soap:operation soapAction="getUserPermissions"
style="document"/>
            <wsdl:input name="getUserPermissions">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getUserPermissionsResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DAPReporterService">
        <wsdl:port binding="tns:DAPReporterServiceHttpBinding"
            name="DAPReporterPort">
            <soap:address
 
location="http://localhost:8080/DAPReporterService/"></soap:address>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Thanx
-yogen
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

RE: wsdl2java not generating wrapper style interface

Posted by Glen Mazza <gl...@gmail.com>.

Yadav, Yogendra (IT) wrote:
> 
> I wanted to switch to BARE style so I provided a bindings file like
> this:
> <jaxws:bindings
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	    wsdlLocation="DAPReporterService.wsdl"
>     xmlns="http://java.sun.com/xml/ns/jaxws"
>     xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
>     <enableWrapperStyle>false</enableWrapperStyle>
> </jaxws:bindings>
> 
> Wsdl2java *does not* generate BARE style interface, why?
> 

Could it be your interpretation of wrapper style/non-wrapper style is
confused?  (Highly possible mine is, by the way)
Please see "Note" at bottom of:
http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html

Glen

-- 
View this message in context: http://www.nabble.com/wsdl2java-not-generating-wrapper-style-interface-tp18840049p18863496.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: wsdl2java not generating wrapper style interface

Posted by Daniel Kulp <dk...@apache.org>.
It might actually be what Glen said.....

With that binding file, you should get methods like:

GetMyFoldersResponse getMyFolders(GetMyFolders req);

That is what jaxws considers a "bare" style service.


Dan




On Wednesday 06 August 2008 11:38:31 am Yadav, Yogendra (IT) wrote:
> Thank you Dan. I changed the WSDL and now wsdl2java generates WRAPPER
> style.
>
> I wanted to switch to BARE style so I provided a bindings file like
> this:
> <jaxws:bindings
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	    wsdlLocation="DAPReporterService.wsdl"
>     xmlns="http://java.sun.com/xml/ns/jaxws"
>     xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
>     <enableWrapperStyle>false</enableWrapperStyle>
> </jaxws:bindings>
>
> Wsdl2java *does not* generate BARE style interface, why?
>
>
> The changed WSDL
> <?xml version="1.0" ?>
> <wsdl:definitions name="DAPReporterService"
>     targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>     xmlns:ns1="http://schemas.xmlsoap.org/wsdl/http/"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="unqualified"
>             elementFormDefault="unqualified"
>
> targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>
> xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
>             xmlns:xs="http://www.w3.org/2001/XMLSchema">
>             <xs:element name="getMyFolders">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element minOccurs="0" name="UserID"
> 	                        type="xs:string">
> 	                    </xs:element>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getMyFoldersResponse">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element name="Folders"
> type="tns:FoldersType"/>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getUserPermissions">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element minOccurs="0" name="UserID"
> 	                        type="xs:string">
> 	                    </xs:element>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getUserPermissionsResponse">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element name="Folders"
> type="tns:FoldersType"/>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:complexType name="FoldersType">
> 	                <xs:sequence>
> 	                    <xs:element maxOccurs="unbounded"
> ref="tns:Folder"/>
> 	                </xs:sequence>
>             </xs:complexType>
>             <xs:element name="Folder">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element name="folderPath"
> type="xs:string"></xs:element>
>                         <xs:element name="employeeName"
> type="xs:string"></xs:element>
>                         <xs:element name="dirId"
> type="xs:string"></xs:element>
>                         <xs:element name="division"
> type="xs:string"></xs:element>
>                         <xs:element name="department"
> type="xs:string"></xs:element>
>                         <xs:element name="region"
> type="xs:string"></xs:element>
>                         <xs:element name="city"
> type="xs:string"></xs:element>
>                         <xs:element name="permission"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionAuthorizer"
> type="xs:string"></xs:element>
>                         <xs:element name="datePermissioned"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionReason"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionExpiration"
> type="xs:string"></xs:element>
>                         <xs:element name="acctStatus"
> type="xs:string"></xs:element>
>                         <xs:element name="employeeNo"
> type="xs:string"></xs:element>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="User">
>                 <xs:complexType>
>                     <xs:sequence></xs:sequence>
>                     <xs:attribute name="msid"
> type="xs:string"></xs:attribute>
>                     <xs:attribute name="loginid"
> type="xs:string"></xs:attribute>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="getMyFolders">
>         <wsdl:part element="tns:getMyFolders"
> name="getMyFolders"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getUserPermissionsResponse">
>         <wsdl:part element="tns:getUserPermissionsResponse"
> name="getUserPermissionsResponse"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getMyFoldersResponse">
>         <wsdl:part element="tns:getMyFoldersResponse"
> name="getMyFoldersResponse"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getUserPermissions">
>         <wsdl:part element="tns:getUserPermissions"
> name="getUserPermissions"></wsdl:part>
>     </wsdl:message>
>     <wsdl:portType name="DAPReporter">
>         <wsdl:operation name="getMyFolders">
>             <wsdl:input message="tns:getMyFolders"
> name="getMyFolders"></wsdl:input>
>             <wsdl:output message="tns:getMyFoldersResponse"
> name="getMyFoldersResponse"></wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="getUserPermissions">
>             <wsdl:input message="tns:getUserPermissions"
> name="getUserPermissions"></wsdl:input>
>             <wsdl:output message="tns:getUserPermissionsResponse"
> name="getUserPermissionsResponse"></wsdl:output>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="DAPReporterServiceHttpBinding"
>         type="tns:DAPReporter">
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="getMyFolders">
>           <soap:operation soapAction="getMyFolders" style="document"/>
>             <wsdl:input name="getMyFolders">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="getMyFoldersResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="getUserPermissions">
>           <soap:operation soapAction="getUserPermissions"
> style="document"/>
>             <wsdl:input name="getUserPermissions">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="getUserPermissionsResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="DAPReporterService">
>         <wsdl:port binding="tns:DAPReporterServiceHttpBinding"
>             name="DAPReporterPort">
>             <soap:address
>
> location="http://localhost:8080/DAPReporterService/"></soap:address>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
>
> Thanx
> -yogen
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Tuesday, August 05, 2008 5:14 PM
> To: users@cxf.apache.org
> Subject: Re: wsdl2java not generating wrapper style interface
>
> On Tuesday 05 August 2008 5:10:12 pm Yadav, Yogendra (IT) wrote:
> > Hi,
> >
> > I am using cxf 2.1.1. Using wsdl2java for the below WSDL does not
> > generate wrapper style interface. Can someone tell me why ?
>
> Section 2.3.1.2 of the JAX-WS spec:
>
> (v) The wrapper elements only contain child elements, they MUST not
> contain other structures such as wildcards (element or attribute),
> xsd:choice, substitution groups (element references are not permitted)
> or attributes; furthermore, they MUST not be nillable.
>
> You have an element reference in the response wrapper.
>
> Dan
>
> > <?xml version="1.0" ?>
> > <wsdl:definitions name="DAPReporterService"
>
> targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>
> >     xmlns:ns1="http://schemas.xmlsoap.org/wsdl/http/"
> >     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >     xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
> >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >     <wsdl:types>
> >         <xs:schema attributeFormDefault="unqualified"
> >             elementFormDefault="unqualified"
> >
> > targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
> >
> > xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
> >             xmlns:xs="http://www.w3.org/2001/XMLSchema">
> >             <xs:element name="getMyFolders">
> >             	<xs:complexType>
> > 	                <xs:sequence>
> > 	                    <xs:element minOccurs="0" name="UserID"
> > 	                        type="xs:string">
> > 	                    </xs:element>
> > 	                </xs:sequence>
> >             	</xs:complexType>
> >             </xs:element>
> >             <xs:element name="getMyFoldersResponse">
> >             	<xs:complexType>
> > 	                <xs:sequence>
> > 	                    <xs:element ref="tns:Folders"/>
> > 	                </xs:sequence>
> >             	</xs:complexType>
> >             </xs:element>
> >             <xs:element name="getUserPermissions">
> >             	<xs:complexType>
> >                     <xs:sequence>
> > 	                    <xs:element ref="tns:User"></xs:element>
> >                     </xs:sequence>
> >             	</xs:complexType>
> >             </xs:element>
> >             <xs:element name="getUserPermissionsResponse">
> >             	<xs:complexType>
> > 	                <xs:sequence>
> > 	                    <xs:element ref="tns:Folders"/>
> > 	                </xs:sequence>
> >             	</xs:complexType>
> >             </xs:element>
> >             <xs:element name="Folders">
> >                 <xs:complexType>
> > 	                <xs:sequence>
> > 	                    <xs:element maxOccurs="unbounded"
> > ref="tns:Folder"/>
> > 	                </xs:sequence>
> >                 </xs:complexType>
> >             </xs:element>
> >             <xs:element name="Folder">
> >                 <xs:complexType>
> >                     <xs:sequence>
> >                         <xs:element name="folderPath"
> > type="xs:string"></xs:element>
> >                         <xs:element name="employeeName"
> > type="xs:string"></xs:element>
> >                         <xs:element name="dirId"
> > type="xs:string"></xs:element>
> >                         <xs:element name="division"
> > type="xs:string"></xs:element>
> >                         <xs:element name="department"
> > type="xs:string"></xs:element>
> >                         <xs:element name="region"
> > type="xs:string"></xs:element>
> >                         <xs:element name="city"
> > type="xs:string"></xs:element>
> >                         <xs:element name="permission"
> > type="xs:string"></xs:element>
> >                         <xs:element name="permissionAuthorizer"
> > type="xs:string"></xs:element>
> >                         <xs:element name="datePermissioned"
> > type="xs:string"></xs:element>
> >                         <xs:element name="permissionReason"
> > type="xs:string"></xs:element>
> >                         <xs:element name="permissionExpiration"
> > type="xs:string"></xs:element>
> >                         <xs:element name="acctStatus"
> > type="xs:string"></xs:element>
> >                         <xs:element name="employeeNo"
> > type="xs:string"></xs:element>
> >                     </xs:sequence>
> >                 </xs:complexType>
> >             </xs:element>
> >             <xs:element name="User">
> >                 <xs:complexType>
> >                     <xs:sequence></xs:sequence>
> >                     <xs:attribute name="msid"
> > type="xs:string"></xs:attribute>
> >                     <xs:attribute name="loginid"
> > type="xs:string"></xs:attribute>
> >                 </xs:complexType>
> >             </xs:element>
> >         </xs:schema>
> >     </wsdl:types>
> >     <wsdl:message name="getMyFolders">
> >         <wsdl:part element="tns:getMyFolders"
> > name="getMyFolders"></wsdl:part>
> >     </wsdl:message>
> >     <wsdl:message name="getUserPermissionsResponse">
> >         <wsdl:part element="tns:getUserPermissionsResponse"
> > name="getUserPermissionsResponse"></wsdl:part>
> >     </wsdl:message>
> >     <wsdl:message name="getMyFoldersResponse">
> >         <wsdl:part element="tns:getMyFoldersResponse"
> > name="getMyFoldersResponse"></wsdl:part>
> >     </wsdl:message>
> >     <wsdl:message name="getUserPermissions">
> >         <wsdl:part element="tns:getUserPermissions"
> > name="getUserPermissions"></wsdl:part>
> >     </wsdl:message>
> >     <wsdl:portType name="DAPReporter">
> >         <wsdl:operation name="getMyFolders">
> >             <wsdl:input message="tns:getMyFolders"
> > name="getMyFolders"></wsdl:input>
> >             <wsdl:output message="tns:getMyFoldersResponse"
> > name="getMyFoldersResponse"></wsdl:output>
> >         </wsdl:operation>
> >         <wsdl:operation name="getUserPermissions">
> >             <wsdl:input message="tns:getUserPermissions"
> > name="getUserPermissions"></wsdl:input>
> >             <wsdl:output message="tns:getUserPermissionsResponse"
> > name="getUserPermissionsResponse"></wsdl:output>
> >         </wsdl:operation>
> >     </wsdl:portType>
> >     <wsdl:binding name="DAPReporterServiceHttpBinding"
> >         type="tns:DAPReporter">
> >         <soap:binding style="document"
> > transport="http://schemas.xmlsoap.org/soap/http" />
> >         <wsdl:operation name="getMyFolders">
> >           <soap:operation soapAction="getMyFolders" style="document"/>
> >             <wsdl:input name="getMyFolders">
> >                 <soap:body use="literal"/>
> >             </wsdl:input>
> >             <wsdl:output name="getMyFoldersResponse">
> >                 <soap:body use="literal"/>
> >             </wsdl:output>
> >         </wsdl:operation>
> >         <wsdl:operation name="getUserPermissions">
> >           <soap:operation soapAction="getUserPermissions"
> > style="document"/>
> >             <wsdl:input name="getUserPermissions">
> >                 <soap:body use="literal"/>
> >             </wsdl:input>
> >             <wsdl:output name="getUserPermissionsResponse">
> >                 <soap:body use="literal"/>
> >             </wsdl:output>
> >         </wsdl:operation>
> >     </wsdl:binding>
> >     <wsdl:service name="DAPReporterService">
> >         <wsdl:port binding="tns:DAPReporterServiceHttpBinding"
> >             name="DAPReporterPort">
> >             <soap:address
> >
> > location="http://localhost:8080/DAPReporterService/"></soap:address>
> >         </wsdl:port>
> >     </wsdl:service>
> > </wsdl:definitions>
> >
> > Thanx
> > -yogen
> > --------------------------------------------------------
> >
> > NOTICE: If received in error, please destroy and notify sender. Sender
> >
> > does not intend to waive confidentiality or privilege. Use of this
> > email is prohibited when received in error.
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender does
> not intend to waive confidentiality or privilege. Use of this email is
> prohibited when received in error.



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

RE: wsdl2java not generating wrapper style interface

Posted by "Yadav, Yogendra (IT)" <Yo...@morganstanley.com>.
Thank you Dan. I changed the WSDL and now wsdl2java generates WRAPPER
style.

I wanted to switch to BARE style so I provided a bindings file like
this:
<jaxws:bindings
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	    wsdlLocation="DAPReporterService.wsdl"
    xmlns="http://java.sun.com/xml/ns/jaxws"
    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
    <enableWrapperStyle>false</enableWrapperStyle>
</jaxws:bindings>

Wsdl2java *does not* generate BARE style interface, why?


The changed WSDL
<?xml version="1.0" ?>
<wsdl:definitions name="DAPReporterService"
    targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
    xmlns:ns1="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
        <xs:schema attributeFormDefault="unqualified"
            elementFormDefault="unqualified"
 
targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
 
xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
            xmlns:xs="http://www.w3.org/2001/XMLSchema">
            <xs:element name="getMyFolders">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element minOccurs="0" name="UserID"
	                        type="xs:string">
	                    </xs:element>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="getMyFoldersResponse">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element name="Folders"
type="tns:FoldersType"/>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="getUserPermissions">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element minOccurs="0" name="UserID"
	                        type="xs:string">
	                    </xs:element>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:element name="getUserPermissionsResponse">
            	<xs:complexType>
	                <xs:sequence>
	                    <xs:element name="Folders"
type="tns:FoldersType"/>
	                </xs:sequence>
            	</xs:complexType>
            </xs:element>
            <xs:complexType name="FoldersType">
	                <xs:sequence>
	                    <xs:element maxOccurs="unbounded"
ref="tns:Folder"/>
	                </xs:sequence>
            </xs:complexType>
            <xs:element name="Folder">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="folderPath"
type="xs:string"></xs:element>
                        <xs:element name="employeeName"
type="xs:string"></xs:element>
                        <xs:element name="dirId"
type="xs:string"></xs:element>
                        <xs:element name="division"
type="xs:string"></xs:element>
                        <xs:element name="department"
type="xs:string"></xs:element>
                        <xs:element name="region"
type="xs:string"></xs:element>
                        <xs:element name="city"
type="xs:string"></xs:element>
                        <xs:element name="permission"
type="xs:string"></xs:element>
                        <xs:element name="permissionAuthorizer"
type="xs:string"></xs:element>
                        <xs:element name="datePermissioned"
type="xs:string"></xs:element>
                        <xs:element name="permissionReason"
type="xs:string"></xs:element>
                        <xs:element name="permissionExpiration"
type="xs:string"></xs:element>
                        <xs:element name="acctStatus"
type="xs:string"></xs:element>
                        <xs:element name="employeeNo"
type="xs:string"></xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="User">
                <xs:complexType>
                    <xs:sequence></xs:sequence>
                    <xs:attribute name="msid"
type="xs:string"></xs:attribute>
                    <xs:attribute name="loginid"
type="xs:string"></xs:attribute>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="getMyFolders">
        <wsdl:part element="tns:getMyFolders"
name="getMyFolders"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="getUserPermissionsResponse">
        <wsdl:part element="tns:getUserPermissionsResponse"
name="getUserPermissionsResponse"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="getMyFoldersResponse">
        <wsdl:part element="tns:getMyFoldersResponse"
name="getMyFoldersResponse"></wsdl:part>
    </wsdl:message>
    <wsdl:message name="getUserPermissions">
        <wsdl:part element="tns:getUserPermissions"
name="getUserPermissions"></wsdl:part>
    </wsdl:message>
    <wsdl:portType name="DAPReporter">
        <wsdl:operation name="getMyFolders">
            <wsdl:input message="tns:getMyFolders"
name="getMyFolders"></wsdl:input>
            <wsdl:output message="tns:getMyFoldersResponse"
name="getMyFoldersResponse"></wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getUserPermissions">
            <wsdl:input message="tns:getUserPermissions"
name="getUserPermissions"></wsdl:input>
            <wsdl:output message="tns:getUserPermissionsResponse"
name="getUserPermissionsResponse"></wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DAPReporterServiceHttpBinding"
        type="tns:DAPReporter">
        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="getMyFolders">
          <soap:operation soapAction="getMyFolders" style="document"/>
            <wsdl:input name="getMyFolders">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getMyFoldersResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getUserPermissions">
          <soap:operation soapAction="getUserPermissions"
style="document"/>
            <wsdl:input name="getUserPermissions">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getUserPermissionsResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DAPReporterService">
        <wsdl:port binding="tns:DAPReporterServiceHttpBinding"
            name="DAPReporterPort">
            <soap:address
 
location="http://localhost:8080/DAPReporterService/"></soap:address>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Thanx
-yogen


-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Tuesday, August 05, 2008 5:14 PM
To: users@cxf.apache.org
Subject: Re: wsdl2java not generating wrapper style interface

On Tuesday 05 August 2008 5:10:12 pm Yadav, Yogendra (IT) wrote:
> Hi,
>
> I am using cxf 2.1.1. Using wsdl2java for the below WSDL does not 
> generate wrapper style interface. Can someone tell me why ?

Section 2.3.1.2 of the JAX-WS spec:

(v) The wrapper elements only contain child elements, they MUST not
contain other structures such as wildcards (element or attribute),
xsd:choice, substitution groups (element references are not permitted)
or attributes; furthermore, they MUST not be nillable.

You have an element reference in the response wrapper.

Dan


>
> <?xml version="1.0" ?>
> <wsdl:definitions name="DAPReporterService"
>
targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>     xmlns:ns1="http://schemas.xmlsoap.org/wsdl/http/"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="unqualified"
>             elementFormDefault="unqualified"
>
> targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>
> xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
>             xmlns:xs="http://www.w3.org/2001/XMLSchema">
>             <xs:element name="getMyFolders">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element minOccurs="0" name="UserID"
> 	                        type="xs:string">
> 	                    </xs:element>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getMyFoldersResponse">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element ref="tns:Folders"/>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getUserPermissions">
>             	<xs:complexType>
>                     <xs:sequence>
> 	                    <xs:element ref="tns:User"></xs:element>
>                     </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getUserPermissionsResponse">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element ref="tns:Folders"/>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="Folders">
>                 <xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element maxOccurs="unbounded"
> ref="tns:Folder"/>
> 	                </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="Folder">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element name="folderPath"
> type="xs:string"></xs:element>
>                         <xs:element name="employeeName"
> type="xs:string"></xs:element>
>                         <xs:element name="dirId"
> type="xs:string"></xs:element>
>                         <xs:element name="division"
> type="xs:string"></xs:element>
>                         <xs:element name="department"
> type="xs:string"></xs:element>
>                         <xs:element name="region"
> type="xs:string"></xs:element>
>                         <xs:element name="city"
> type="xs:string"></xs:element>
>                         <xs:element name="permission"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionAuthorizer"
> type="xs:string"></xs:element>
>                         <xs:element name="datePermissioned"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionReason"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionExpiration"
> type="xs:string"></xs:element>
>                         <xs:element name="acctStatus"
> type="xs:string"></xs:element>
>                         <xs:element name="employeeNo"
> type="xs:string"></xs:element>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="User">
>                 <xs:complexType>
>                     <xs:sequence></xs:sequence>
>                     <xs:attribute name="msid"
> type="xs:string"></xs:attribute>
>                     <xs:attribute name="loginid"
> type="xs:string"></xs:attribute>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="getMyFolders">
>         <wsdl:part element="tns:getMyFolders"
> name="getMyFolders"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getUserPermissionsResponse">
>         <wsdl:part element="tns:getUserPermissionsResponse"
> name="getUserPermissionsResponse"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getMyFoldersResponse">
>         <wsdl:part element="tns:getMyFoldersResponse"
> name="getMyFoldersResponse"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getUserPermissions">
>         <wsdl:part element="tns:getUserPermissions"
> name="getUserPermissions"></wsdl:part>
>     </wsdl:message>
>     <wsdl:portType name="DAPReporter">
>         <wsdl:operation name="getMyFolders">
>             <wsdl:input message="tns:getMyFolders"
> name="getMyFolders"></wsdl:input>
>             <wsdl:output message="tns:getMyFoldersResponse"
> name="getMyFoldersResponse"></wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="getUserPermissions">
>             <wsdl:input message="tns:getUserPermissions"
> name="getUserPermissions"></wsdl:input>
>             <wsdl:output message="tns:getUserPermissionsResponse"
> name="getUserPermissionsResponse"></wsdl:output>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="DAPReporterServiceHttpBinding"
>         type="tns:DAPReporter">
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="getMyFolders">
>           <soap:operation soapAction="getMyFolders" style="document"/>
>             <wsdl:input name="getMyFolders">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="getMyFoldersResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="getUserPermissions">
>           <soap:operation soapAction="getUserPermissions"
> style="document"/>
>             <wsdl:input name="getUserPermissions">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="getUserPermissionsResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="DAPReporterService">
>         <wsdl:port binding="tns:DAPReporterServiceHttpBinding"
>             name="DAPReporterPort">
>             <soap:address
>
> location="http://localhost:8080/DAPReporterService/"></soap:address>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
>
> Thanx
> -yogen
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender

> does not intend to waive confidentiality or privilege. Use of this 
> email is prohibited when received in error.



--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

Re: wsdl2java not generating wrapper style interface

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 05 August 2008 5:10:12 pm Yadav, Yogendra (IT) wrote:
> Hi,
>
> I am using cxf 2.1.1. Using wsdl2java for the below WSDL does not
> generate wrapper style interface. Can someone tell me why ?

Section 2.3.1.2 of the JAX-WS spec:

(v) The wrapper elements only contain child elements, they MUST not 
contain other structures such as wildcards (element or attribute), 
xsd:choice, substitution groups (element references are not permitted) 
or attributes; furthermore, they MUST not be nillable.

You have an element reference in the response wrapper.

Dan


>
> <?xml version="1.0" ?>
> <wsdl:definitions name="DAPReporterService"
>     targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>     xmlns:ns1="http://schemas.xmlsoap.org/wsdl/http/"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="unqualified"
>             elementFormDefault="unqualified"
>
> targetNamespace="http://xml.ms.com/ns/reporting/service/dapreporter"
>
> xmlns:tns="http://xml.ms.com/ns/reporting/service/dapreporter"
>             xmlns:xs="http://www.w3.org/2001/XMLSchema">
>             <xs:element name="getMyFolders">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element minOccurs="0" name="UserID"
> 	                        type="xs:string">
> 	                    </xs:element>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getMyFoldersResponse">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element ref="tns:Folders"/>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getUserPermissions">
>             	<xs:complexType>
>                     <xs:sequence>
> 	                    <xs:element ref="tns:User"></xs:element>
>                     </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="getUserPermissionsResponse">
>             	<xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element ref="tns:Folders"/>
> 	                </xs:sequence>
>             	</xs:complexType>
>             </xs:element>
>             <xs:element name="Folders">
>                 <xs:complexType>
> 	                <xs:sequence>
> 	                    <xs:element maxOccurs="unbounded"
> ref="tns:Folder"/>
> 	                </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="Folder">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element name="folderPath"
> type="xs:string"></xs:element>
>                         <xs:element name="employeeName"
> type="xs:string"></xs:element>
>                         <xs:element name="dirId"
> type="xs:string"></xs:element>
>                         <xs:element name="division"
> type="xs:string"></xs:element>
>                         <xs:element name="department"
> type="xs:string"></xs:element>
>                         <xs:element name="region"
> type="xs:string"></xs:element>
>                         <xs:element name="city"
> type="xs:string"></xs:element>
>                         <xs:element name="permission"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionAuthorizer"
> type="xs:string"></xs:element>
>                         <xs:element name="datePermissioned"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionReason"
> type="xs:string"></xs:element>
>                         <xs:element name="permissionExpiration"
> type="xs:string"></xs:element>
>                         <xs:element name="acctStatus"
> type="xs:string"></xs:element>
>                         <xs:element name="employeeNo"
> type="xs:string"></xs:element>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="User">
>                 <xs:complexType>
>                     <xs:sequence></xs:sequence>
>                     <xs:attribute name="msid"
> type="xs:string"></xs:attribute>
>                     <xs:attribute name="loginid"
> type="xs:string"></xs:attribute>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="getMyFolders">
>         <wsdl:part element="tns:getMyFolders"
> name="getMyFolders"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getUserPermissionsResponse">
>         <wsdl:part element="tns:getUserPermissionsResponse"
> name="getUserPermissionsResponse"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getMyFoldersResponse">
>         <wsdl:part element="tns:getMyFoldersResponse"
> name="getMyFoldersResponse"></wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getUserPermissions">
>         <wsdl:part element="tns:getUserPermissions"
> name="getUserPermissions"></wsdl:part>
>     </wsdl:message>
>     <wsdl:portType name="DAPReporter">
>         <wsdl:operation name="getMyFolders">
>             <wsdl:input message="tns:getMyFolders"
> name="getMyFolders"></wsdl:input>
>             <wsdl:output message="tns:getMyFoldersResponse"
> name="getMyFoldersResponse"></wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="getUserPermissions">
>             <wsdl:input message="tns:getUserPermissions"
> name="getUserPermissions"></wsdl:input>
>             <wsdl:output message="tns:getUserPermissionsResponse"
> name="getUserPermissionsResponse"></wsdl:output>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="DAPReporterServiceHttpBinding"
>         type="tns:DAPReporter">
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="getMyFolders">
>           <soap:operation soapAction="getMyFolders" style="document"/>
>             <wsdl:input name="getMyFolders">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="getMyFoldersResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="getUserPermissions">
>           <soap:operation soapAction="getUserPermissions"
> style="document"/>
>             <wsdl:input name="getUserPermissions">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="getUserPermissionsResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="DAPReporterService">
>         <wsdl:port binding="tns:DAPReporterServiceHttpBinding"
>             name="DAPReporterPort">
>             <soap:address
>
> location="http://localhost:8080/DAPReporterService/"></soap:address>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
>
> Thanx
> -yogen
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender does
> not intend to waive confidentiality or privilege. Use of this email is
> prohibited when received in error.



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog