This looks like there is potentially different versions of JAXB in play here, 
but I'm not really sure.    If you look at the schemas for the requests, in 
one case you see:

            <xs:complexType name="getCarrier">
                <xs:sequence>
                    <xs:element minOccurs="0" ref="ns1:username"/>
                    <xs:element minOccurs="0" ref="ns1:carrierID"/>
                </xs:sequence>
            </xs:complexType>

and in the other case you see:


            <xsd:complexType name="getCarrier">
                <xsd:sequence>
                    <xsd:element form="qualified" minOccurs="0" 
name="username" type="xsd:string"/>
                    <xsd:element form="qualified" minOccurs="0" 
name="carrierID" type="xsd:long"/>
                </xsd:sequence>
            </xsd:complexType>


One refers to global elements via ref and one doesn't.   Honestly, I'm not 
sure how the java2ws version is doing that?   Do you have XmlElementRef 
annotations on the interface or something?


In anycase, it is likely the jaxb version.   Using the bat/shell scripts in 
the distribution, we endorse the 2.2 versions, but at runtime, if you don't 
endorse them, you may be getting the 2.1 versions.   Not really sure.

In anycases, I think you can add -allowElementReferences  to wsdl2java to have 
it consider element references when unwrapping.

Dan



On Wednesday, October 19, 2011 12:19:39 PM Mordecus wrote:
> Hi,
> 
> I have a code-to-wsdl CXF webservice
> 
> I used the java2ws plugin to generate a WSDL file for the webservice and I
> am specifying this wsdl file when I wire up the webservice in Spring; i.e.:
> 
> <jaxws:endpoint
>         id="webService"
>         implementor="#didManagerService"
> 
> implementorClass="com.thinkingphones.didmanager.server.webservices.DIDManage
> rWebServiceImpl" address="/DIDManagerService"
>         wsdlLocation="WEB-INF/wsdl/DIDManagerService.wsdl"
>         />
> 
> I then use the cxf-codegen plugin to generate the client against this WSDL.
> However,it refuses to generate the unwrapped style; even when I specify
> <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> in the JAXB
> Binding file.
> 
> 
> If, however, I take the wsdlLocation argument out of the spring file;
> allowing CXF to generate the wsdl file on the fly based on the SEI and
> Implementor annotations; and then use THAT wsdl to generate the client, the
> client gets generated with unwrapped style without problems.
> 
> It's not clear to me why this is happening - the two wsdls are extremely
> similar (although there are small differences) and in any case - should the
> java2ws plugin and the cxf runtime not generate the same wsdl against the
> same SEI/Implementor?
> 
> Java2WS generated WSDL:
> http://www.filehosting.org/file/details/277581/java2ws.wsdl java2ws.wsdl
> On the fly generated WSDL:
> http://www.filehosting.org/file/details/277578/onfly.wsdl onfly.wsdl
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Unwrapped-client-problem-tp4919103p4919103.
> html Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to