Ben,

This won't do what you think.   The DEFAULT is to enable wrapper style.   
The customization you are referring two will allow all operations to be 
generated in the "bare" style.   In your case, the verifyTerm would be 
changed to match the other item:
VerifyTermResponse verifyTerm(VerifyTermRequest req);

If the schema does not match the rules in 2.3.1.2, there is nothing that 
can be done to get it unwrapped.   

Dan


On Thursday 24 January 2008, Benjamin Coiffe wrote:
> Ok, thanks, I found it. An I found this as well:
>
> Conformance (Disabling wrapper style): An implementation MUST support
> use of the jaxws:enable-
> WrapperStyle binding declaration to enable or disable the wrapper
> style mapping of operations (see section
> 8.7.3).
>
> How can I get this working for the dynamic client?
>
> Thanks,
>
> Ben
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: 24 January 2008 17:05
> To: cxf-user@incubator.apache.org
> Cc: Benjamin Coiffe
> Subject: Re: [Dynamic Client, TypeClassInitializer, Wrapped operation]
> problem
>
>
> It's the JAX-WS spec (which our tools implement) found at:
>
> http://jcp.org/en/jsr/detail?id=224
>
> Specifically, it's section 2.3.1.2.   The first table in there, item 5
> says:
> (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.
>
>
> Dan
>
> On Thursday 24 January 2008, Benjamin Coiffe wrote:
> > Do you have the link to the document you are quoting?
> > I am reading the Basic Profile
> > (http://www.ws-i.org/Profiles/BasicProfile-1_2(WGAD).html) and can't
> > really find what you are mentioning.
> >
> > Thanks, Ben
> >
> > -----Original Message-----
> > From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> > Sent: 24 January 2008 16:09
> > To: cxf-user@incubator.apache.org
> > Cc: Benjamin Coiffe
> > Subject: Re: [Dynamic Client, TypeClassInitializer, Wrapped
> > operation] problem
> >
> >
> > According to the JAXWS spec, wrapper types are NOT allowed to
> > contain wildcards.    The xs:any is considered a wildcard.   Thus,
> > it's not unwrappable.
> >
> > That said, wsld2java is still broken for this case as it's
> > generating a void return instead of a GetApprovedTermsResponse
> > return .   That's really not good.   Off to log a bug for that.
> >
> > Dan
> >
> > On Thursday 24 January 2008, Benjamin Coiffe wrote:
> > > Hi,
> > >
> > >
> > >
> > > The WSDL pasted at the end of this email contains two methods:
> > > getApprovedTerms, verifyTerm. There signatures are very close,
> > > yet, verifyItem is wrappable and getApprovedTerms isn't...Can
> > > somebody please explain me why?
> > >
> > > I am working with CXF 2.0.1 patched. I did update
> > > TypeClassSerializer to fix a couple of bugs.
> > >
> > > When I execute this code:
> > >
> > >
> > >
> > >       DynamicClientFactory dynamicClientFactory =
> > > DynamicClientFactory.newInstance(bus);
> > >
> > >       Client client = dynamicClientFactory.createClient(wsdl);
> > >
> > >       ServiceInfo model =
> > > client.getEndpoint().getService().getServiceInfos().get(0);
> > >
> > >       InterfaceInfo interfaceInfo = model.getInterface();
> > >
> > >       Collection<OperationInfo> operationInfos =
> > > interfaceInfo.getOperations();
> > >
> > >       for(OperationInfo operationInfo:operationInfos){
> > >
> > >             MessageInfo outputMessageInfo =
> > > operationInfo.getInput();
> > >
> > >             Map<QName,MessagePartInfo>  map =
> > > outputMessageInfo.getMessagePartsMap();
> > >
> > >             for(Entry<QName,MessagePartInfo> entry :
> > > map.entrySet()){
> > >
> > >                   MessagePartInfo messagePartInfo =
> > > entry.getValue();
> > >
> > >                   if(messagePartInfo.getTypeClass() == null){
> > >
> > >                         throw new Exception("Should not
> > > happened!!")
> > >
> > > }
> > >
> > > }
> > >
> > > }
> > >
> > > }
> > >
> > >
> > >
> > > The Exception is unfortunately thrown:-( and should not be. I
> > > tried to find a way to fix it myself but I am running out of
> > > ideas!
> > >
> > > My patched TypeClassInitializer is the latest code from the source
> > > repository.
> > >
> > >
> > >
> > > Any Help would be really appreciated.
> > >
> > > Thanks,
> > >
> > >
> > >
> > > BEnjamin
> > >
> > >
> > >
> > >
> > >
> > > <?xml version='1.0' encoding='UTF-8'?>
> > >
> > > <definitions name="cvServiceDefinitions"
> > > targetNamespace="http://sii.gri.roche.com";
> > > xmlns="http://schemas.xmlsoap.org/wsdl/";
> > > xmlns:s0="http://sii.gri.roche.com";
> > > xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/";>
> > >
> > >   <types>
> > >
> > >     <xs:schema attributeFormDefault="unqualified"
> > > elementFormDefault="qualified"
> > > targetNamespace="http://sii.gri.roche.com";
> > > xmlns:s0="http://sii.gri.roche.com";
> > > xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/";
> > > xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> > >
> > >       <xs:element name="getApprovedTerms">
> > >
> > >         <xs:complexType>
> > >
> > >           <xs:sequence>
> > >
> > >             <xs:element name="domainName" type="xs:string"/>
> > >
> > >             <xs:element name="appName" type="xs:string"/>
> > >
> > >             <xs:element name="viewName" type="xs:string"/>
> > >
> > >           </xs:sequence>
> > >
> > >         </xs:complexType>
> > >
> > >       </xs:element>
> > >
> > >       <xs:element name="getApprovedTermsResponse">
> > >
> > >         <xs:complexType>
> > >
> > >           <xs:sequence>
> > >
> > >             <xs:any/>
> > >
> > >           </xs:sequence>
> > >
> > >         </xs:complexType>
> > >
> > >       </xs:element>
> > >
> > > <xs:element name="verifyTerm">
> > >
> > >         <xs:complexType>
> > >
> > >           <xs:sequence>
> > >
> > >             <xs:element name="domainName" type="xs:string"/>
> > >
> > >             <xs:element name="termName" type="xs:string"/>
> > >
> > >             <xs:element name="appName" type="xs:string"/>
> > >
> > >             <xs:element name="viewName" type="xs:string"/>
> > >
> > >           </xs:sequence>
> > >
> > >         </xs:complexType>
> > >
> > >       </xs:element>
> > >
> > >       <xs:element name="verifyTermResponse">
> > >
> > >         <xs:complexType>
> > >
> > >           <xs:sequence>
> > >
> > >             <xs:element name="ReturnVerifyTerm"
> > > type="xs:boolean"/>
> > >
> > >           </xs:sequence>
> > >
> > >         </xs:complexType>
> > >
> > >       </xs:element>
> > >
> > >     </xs:schema>
> > >
> > >
> > >
> > >   </types>
> > >
> > >   <message name="verifyTerm">
> > >
> > >     <part element="s0:verifyTerm" name="parameters"/>
> > >
> > >   </message>
> > >
> > >   <message name="verifyTermResponse">
> > >
> > >     <part element="s0:verifyTermResponse" name="parameters"/>
> > >
> > >   </message>
> > >
> > >   <message name="getApprovedTerms">
> > >
> > >     <part element="s0:getApprovedTerms" name="parameters"/>
> > >
> > >   </message>
> > >
> > >   <message name="getApprovedTermsResponse">
> > >
> > >     <part element="s0:getApprovedTermsResponse"
> > > name="parameters"/>
> > >
> > >   </message>
> > >
> > >   <portType name="cvPortType">
> > >
> > >
> > >
> > >     <operation name="getApprovedTerms"
> > > parameterOrder="parameters">
> > >
> > >       <input message="s0:getApprovedTerms"/>
> > >
> > >       <output message="s0:getApprovedTermsResponse"/>
> > >
> > >     </operation>
> > >
> > > <operation name="verifyTerm" parameterOrder="parameters">
> > >
> > >       <input message="s0:verifyTerm"/>
> > >
> > >       <output message="s0:verifyTermResponse"/>
> > >
> > >     </operation>
> > >
> > >   </portType>
> > >
> > >   <binding name="cvServiceSoapBinding" type="s0:cvPortType">
> > >
> > >     <s1:binding style="document"
> > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > >
> > >     <operation name="getApprovedTerms">
> > >
> > >       <s1:operation soapAction="" style="document"/>
> > >
> > >       <input>
> > >
> > >         <s1:body parts="parameters" use="literal"/>
> > >
> > >       </input>
> > >
> > >       <output>
> > >
> > >         <s1:body parts="parameters" use="literal"/>
> > >
> > >       </output>
> > >
> > >     </operation>
> > >
> > >     <operation name="verifyTerm">
> > >
> > >       <s1:operation soapAction="" style="document"/>
> > >
> > >       <input>
> > >
> > >         <s1:body parts="parameters" use="literal"/>
> > >
> > >       </input>
> > >
> > >       <output>
> > >
> > >         <s1:body parts="parameters" use="literal"/>
> > >
> > >       </output>
> > >
> > >     </operation>
> > >
> > >   </binding>
> > >
> > >   <service name="cvService">
> > >
> > >     <port binding="s0:cvServiceSoapBinding"
> > > name="cvPortTypeSoapPort">
> > >
> > >       <!--<s1:address
> > > location="http://rnuuspr12.tot.roche.com:8080/cv/cvService"/>-->
> > >
> > >                 <s1:address location="http://localhost:9000"/>
> > >
> > >     </port>
> > >
> > >   </service>
> > >
> > > </definitions>



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to