You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jacob Marcus <ja...@gmail.com> on 2007/08/27 23:08:23 UTC

Generated wsdl in XFire Versus CXF

Hi all,

I notice that in CXF, the xsd elements for method names have a type
attribute. This was not the case in XFire.
Here is an example of what I am talking about. My question is, is there a
way to get CXF to spit out wsdl exactly as XFire?

Thanks,
Jacob


XFire
==========
<xsd:element name="getAsset">
    <xsd:complexType>
        <xsd:sequence>
             <xsd:element maxOccurs="1" minOccurs="1" name="in0"
nillable="true" type="xsd:string"/>
       </xsd:sequence>
</xsd:complexType>
</xsd:element>


CXF
====
<xs:element name="getAsset" type="tns:getAsset"/>
    <xs:complexType name="getAsset">
    <xs:sequence>
       <xs:element minOccurs="0" name="arg0" type="xs:string"/>
    </xs:sequence>
   </xs:complexType>

Re: Generated wsdl in XFire Versus CXF

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 27 August 2007, Jacob Marcus wrote:
> Hi all,
>
> I notice that in CXF, the xsd elements for method names have a type
> attribute. This was not the case in XFire.
> Here is an example of what I am talking about. My question is, is
> there a way to get CXF to spit out wsdl exactly as XFire?

Not that I know of.   The reasoning for outputting the schema this way 
centers around JAX-WS compliance and the JAX-WS tck.   I cannot go into 
much detail, but we did have problems when we didn't output the separate 
element.

PART of the reason is that you should get the same wsdl if your service 
is using "wrapped" mode (so the element and type are auto generated) or 
if you use a "bare" mode with a hand written class.   Since JAXB 
separates the two into an element and a type in that case, the wrapped 
case should as well.

Dan


>
> Thanks,
> Jacob
>
>
> XFire
> ==========
> <xsd:element name="getAsset">
>     <xsd:complexType>
>         <xsd:sequence>
>              <xsd:element maxOccurs="1" minOccurs="1" name="in0"
> nillable="true" type="xsd:string"/>
>        </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
>
> CXF
> ====
> <xs:element name="getAsset" type="tns:getAsset"/>
>     <xs:complexType name="getAsset">
>     <xs:sequence>
>        <xs:element minOccurs="0" name="arg0" type="xs:string"/>
>     </xs:sequence>
>    </xs:complexType>



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Generated wsdl in XFire Versus CXF

Posted by William Leung <lw...@21cn.com>.
Thanks for reply, but I tried simple front end, still not worked, same wsdl
problem.
Maybe it is microsoft's fault, but just not worked :(((


Furthermore, simple front end do not meet my requirement, since I need names
all the parameters instead of argN.



Willem2 wrote:
> 
> Hi,
> 
> You can use the simple front end[1] instead of jaxws front end[2].
> [1]http://cwiki.apache.org/CXF20DOC/simple-frontend.html
> [2]http://cwiki.apache.org/CXF20DOC/jax-ws.html
> 
> Willem.
> 
> 
> William Leung wrote:
>> I am trying setup a client in vs.net.
>>
>> So sad, that vs.net only reconized the XFire schema format but not the
>> CXF
>> one.
>>
>> >From the hello world example, the VS.net reconized the operation as:
>>
>> CXF
>> =========================
>> "HelloWorld" Description
>>
>> Methods
>> sayHi ( sayHi As sayHi ) As sayHiResponse
>>
>>
>> while XFire format is well
>>
>> XFire
>> =========================
>> "HelloWorld" Description
>>
>> Methods
>> sayHi ( sayHi As string ) As string
>>
>>
>> So can I have an option that to use the XFire format, I preferred java
>> first
>> only.
>>
>>
>>
>>
>>
>>
>> jacobmarcus20 wrote:
>>   
>>> Hi all,
>>>
>>> I notice that in CXF, the xsd elements for method names have a type
>>> attribute. This was not the case in XFire.
>>> Here is an example of what I am talking about. My question is, is there
>>> a
>>> way to get CXF to spit out wsdl exactly as XFire?
>>>
>>> Thanks,
>>> Jacob
>>>
>>>
>>> XFire
>>> ==========
>>> <xsd:element name="getAsset">
>>>     <xsd:complexType>
>>>         <xsd:sequence>
>>>              <xsd:element maxOccurs="1" minOccurs="1" name="in0"
>>> nillable="true" type="xsd:string"/>
>>>        </xsd:sequence>
>>> </xsd:complexType>
>>> </xsd:element>
>>>
>>>
>>> CXF
>>> ====
>>> <xs:element name="getAsset" type="tns:getAsset"/>
>>>     <xs:complexType name="getAsset">
>>>     <xs:sequence>
>>>        <xs:element minOccurs="0" name="arg0" type="xs:string"/>
>>>     </xs:sequence>
>>>    </xs:complexType>
>>>
>>>
>>>     
>>
>>   
> 
> 

-- 
View this message in context: http://www.nabble.com/Generated-wsdl-in-XFire-Versus-CXF-tf4338370.html#a13132953
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Generated wsdl in XFire Versus CXF

Posted by Willem Jiang <ni...@iona.com>.
Hi,

You can use the simple front end[1] instead of jaxws front end[2].
[1]http://cwiki.apache.org/CXF20DOC/simple-frontend.html
[2]http://cwiki.apache.org/CXF20DOC/jax-ws.html

Willem.


William Leung wrote:
> I am trying setup a client in vs.net.
>
> So sad, that vs.net only reconized the XFire schema format but not the CXF
> one.
>
> >From the hello world example, the VS.net reconized the operation as:
>
> CXF
> =========================
> "HelloWorld" Description
>
> Methods
> sayHi ( sayHi As sayHi ) As sayHiResponse
>
>
> while XFire format is well
>
> XFire
> =========================
> "HelloWorld" Description
>
> Methods
> sayHi ( sayHi As string ) As string
>
>
> So can I have an option that to use the XFire format, I preferred java first
> only.
>
>
>
>
>
>
> jacobmarcus20 wrote:
>   
>> Hi all,
>>
>> I notice that in CXF, the xsd elements for method names have a type
>> attribute. This was not the case in XFire.
>> Here is an example of what I am talking about. My question is, is there a
>> way to get CXF to spit out wsdl exactly as XFire?
>>
>> Thanks,
>> Jacob
>>
>>
>> XFire
>> ==========
>> <xsd:element name="getAsset">
>>     <xsd:complexType>
>>         <xsd:sequence>
>>              <xsd:element maxOccurs="1" minOccurs="1" name="in0"
>> nillable="true" type="xsd:string"/>
>>        </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>>
>>
>> CXF
>> ====
>> <xs:element name="getAsset" type="tns:getAsset"/>
>>     <xs:complexType name="getAsset">
>>     <xs:sequence>
>>        <xs:element minOccurs="0" name="arg0" type="xs:string"/>
>>     </xs:sequence>
>>    </xs:complexType>
>>
>>
>>     
>
>   

RE: Generated wsdl in XFire Versus CXF

Posted by Benson Margulies <bi...@basistech.com>.
 I tried fussing with the part names and didn't have any impact on the
wsdl.exe.

maxOccurs='unbounded' triggers a bug in wsdl.exe. It would be nice if we
could suppress it.

I have a service request open to Microsoft to find out how get
'unwrapped' method signatures.

> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Wednesday, October 10, 2007 4:16 PM
> To: cxf-user@incubator.apache.org
> Cc: William Leung
> Subject: Re: Generated wsdl in XFire Versus CXF
> 
> 
> We had to change the format of the generated WSDL to meet the
> requirements of the various TCK's.
> 
> I think the major differences are:
> 
> 1) The "part" names in the messages
> 
> 2) The nillable and minOccurs=0 things in the elements in the wrappers
> 
> 3) Using a names complexType instead of an anonymousType in the
wrapper
> element.
> 
> Is there any way you could  "play" with the CXF wsdl to see which of
the
> above is causing the .NET issue?   (My gut feeling says #3, I would
> start with that.)   I don't have a Windows box so it's not something I
> can try.    If you can figure out which it is, we can probably add a
> configuration setting to make it output the way that is needed.
> 
> Dan
> 
> 
> On Wednesday 10 October 2007, William Leung wrote:
> > I am trying setup a client in vs.net.
> >
> > So sad, that vs.net only reconized the XFire schema format but not
the
> > CXF one.
> >
> > From the hello world example, the VS.net reconized the operation as:
> >
> > CXF
> > =========================
> > "HelloWorld" Description
> >
> > Methods
> > sayHi ( sayHi As sayHi ) As sayHiResponse
> >
> >
> > while XFire format is well
> >
> > XFire
> > =========================
> > "HelloWorld" Description
> >
> > Methods
> > sayHi ( sayHi As string ) As string
> >
> >
> > So can I have an option that to use the XFire format, I preferred
java
> > first only.
> >
> > jacobmarcus20 wrote:
> > > Hi all,
> > >
> > > I notice that in CXF, the xsd elements for method names have a
type
> > > attribute. This was not the case in XFire.
> > > Here is an example of what I am talking about. My question is, is
> > > there a way to get CXF to spit out wsdl exactly as XFire?
> > >
> > > Thanks,
> > > Jacob
> > >
> > >
> > > XFire
> > > ==========
> > > <xsd:element name="getAsset">
> > >     <xsd:complexType>
> > >         <xsd:sequence>
> > >              <xsd:element maxOccurs="1" minOccurs="1" name="in0"
> > > nillable="true" type="xsd:string"/>
> > >        </xsd:sequence>
> > > </xsd:complexType>
> > > </xsd:element>
> > >
> > >
> > > CXF
> > > ====
> > > <xs:element name="getAsset" type="tns:getAsset"/>
> > >     <xs:complexType name="getAsset">
> > >     <xs:sequence>
> > >        <xs:element minOccurs="0" name="arg0" type="xs:string"/>
> > >     </xs:sequence>
> > >    </xs:complexType>
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog

Re: Generated wsdl in XFire Versus CXF

Posted by Daniel Kulp <dk...@apache.org>.
We had to change the format of the generated WSDL to meet the 
requirements of the various TCK's.   

I think the major differences are:

1) The "part" names in the messages

2) The nillable and minOccurs=0 things in the elements in the wrappers

3) Using a names complexType instead of an anonymousType in the wrapper 
element.

Is there any way you could  "play" with the CXF wsdl to see which of the 
above is causing the .NET issue?   (My gut feeling says #3, I would 
start with that.)   I don't have a Windows box so it's not something I 
can try.    If you can figure out which it is, we can probably add a 
configuration setting to make it output the way that is needed.

Dan


On Wednesday 10 October 2007, William Leung wrote:
> I am trying setup a client in vs.net.
>
> So sad, that vs.net only reconized the XFire schema format but not the
> CXF one.
>
> From the hello world example, the VS.net reconized the operation as:
>
> CXF
> =========================
> "HelloWorld" Description
>
> Methods
> sayHi ( sayHi As sayHi ) As sayHiResponse
>
>
> while XFire format is well
>
> XFire
> =========================
> "HelloWorld" Description
>
> Methods
> sayHi ( sayHi As string ) As string
>
>
> So can I have an option that to use the XFire format, I preferred java
> first only.
>
> jacobmarcus20 wrote:
> > Hi all,
> >
> > I notice that in CXF, the xsd elements for method names have a type
> > attribute. This was not the case in XFire.
> > Here is an example of what I am talking about. My question is, is
> > there a way to get CXF to spit out wsdl exactly as XFire?
> >
> > Thanks,
> > Jacob
> >
> >
> > XFire
> > ==========
> > <xsd:element name="getAsset">
> >     <xsd:complexType>
> >         <xsd:sequence>
> >              <xsd:element maxOccurs="1" minOccurs="1" name="in0"
> > nillable="true" type="xsd:string"/>
> >        </xsd:sequence>
> > </xsd:complexType>
> > </xsd:element>
> >
> >
> > CXF
> > ====
> > <xs:element name="getAsset" type="tns:getAsset"/>
> >     <xs:complexType name="getAsset">
> >     <xs:sequence>
> >        <xs:element minOccurs="0" name="arg0" type="xs:string"/>
> >     </xs:sequence>
> >    </xs:complexType>



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Generated wsdl in XFire Versus CXF

Posted by William Leung <lw...@21cn.com>.
I am trying setup a client in vs.net.

So sad, that vs.net only reconized the XFire schema format but not the CXF
one.

>From the hello world example, the VS.net reconized the operation as:

CXF
=========================
"HelloWorld" Description

Methods
sayHi ( sayHi As sayHi ) As sayHiResponse


while XFire format is well

XFire
=========================
"HelloWorld" Description

Methods
sayHi ( sayHi As string ) As string


So can I have an option that to use the XFire format, I preferred java first
only.






jacobmarcus20 wrote:
> 
> Hi all,
> 
> I notice that in CXF, the xsd elements for method names have a type
> attribute. This was not the case in XFire.
> Here is an example of what I am talking about. My question is, is there a
> way to get CXF to spit out wsdl exactly as XFire?
> 
> Thanks,
> Jacob
> 
> 
> XFire
> ==========
> <xsd:element name="getAsset">
>     <xsd:complexType>
>         <xsd:sequence>
>              <xsd:element maxOccurs="1" minOccurs="1" name="in0"
> nillable="true" type="xsd:string"/>
>        </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> 
> 
> CXF
> ====
> <xs:element name="getAsset" type="tns:getAsset"/>
>     <xs:complexType name="getAsset">
>     <xs:sequence>
>        <xs:element minOccurs="0" name="arg0" type="xs:string"/>
>     </xs:sequence>
>    </xs:complexType>
> 
> 

-- 
View this message in context: http://www.nabble.com/Generated-wsdl-in-XFire-Versus-CXF-tf4338370.html#a13131774
Sent from the cxf-user mailing list archive at Nabble.com.