You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gabo Manuel <km...@solegysystems.com> on 2009/02/03 08:14:44 UTC
Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
Hi Sergey,
I'm sorry it took this long for a response. I tried using CXF2.2
snapshot. All is working fine except for the following case:
import javax.ws.rs.POST;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ws.rs.Path;
@Consumes("*/xml")
@Produces("*/xml")
@WebService(serviceName="AccountService", portName="AccountServicePort")
public class AccountService{
@POST
@Path("/")
@WebMethod
public int updateAccount(
@WebParam(name="account")
WSAccount account) {
logger.info("update Account Received: " + account);
}
}
@XmlType(name="Account")
@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlRootElement(name="Account")
public class WSAccount {
private String accountID;
@GET
@Path("/accountID")
public String getAccountID() {
return accountID;
}
public void setAccountID(String accountID) {
this.accountID = accountID;
}
}
I am using jsr311-api-1.0 as stated in the user's guide.
With the '@WebParam' the WSAccount is not properly loaded by the default
MessageBodyReader. If I remove the said annotation, the service works
fine and the object's fields are properly loaded.
Unfortunately, if I remove the said annotation, the wsdl generated for
the Soap endpoint renders the parameter's name as arg0. If there is
another way to set the parameter name to something else, that would help
too.
Again, thanks for the assistance.
Gabo Manuel
Sergey Beryozkin wrote:
> Hi Gabo
> Both snapshots have a fix. Any problems that you see ?
>
> Cheers, Sergey
>
> ----- Original Message ----- From: "Gabo Manuel"
> <km...@solegysystems.com>
> To: <us...@cxf.apache.org>
> Sent: Friday, December 12, 2008 7:50 AM
> Subject: Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the
> auto-generated wsdl
>
>
>> Hi Sergey,
>>
>> Just would like to confirm if the fix regarding this issue is
>> available to both 2.1.4-snapshot and that of 2.2-snapshot?
>>
>> Gabo
>
Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
Posted by Sergey Beryozkin <sb...@progress.com>.
Hi Gabo - no worries :-) - thanks for helping me to sort out this issue
Cheers, Sergey
----- Original Message -----
From: "Gabo Manuel" <km...@solegysystems.com>
To: <us...@cxf.apache.org>
Sent: Tuesday, February 03, 2009 7:23 AM
Subject: Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
> Hi Sergey,
>
> Sorry for that. Ignore that email. It is working now. Old versions of
> cxf and jsr were loaded in the class path. My mistake. :)
>
> Gabo
>
> Gabo Manuel wrote:
>> Hi Sergey,
>>
>> I'm sorry it took this long for a response. I tried using CXF2.2
>> snapshot. All is working fine except for the following case:
>>
>> import javax.ws.rs.POST;
>> import javax.ws.rs.Consumes;
>> import javax.ws.rs.Produces;
>> import javax.jws.WebMethod;
>> import javax.jws.WebParam;
>> import javax.jws.WebService;
>> import javax.ws.rs.Path;
>>
>> @Consumes("*/xml")
>> @Produces("*/xml")
>> @WebService(serviceName="AccountService", portName="AccountServicePort")
>> public class AccountService{
>> @POST
>> @Path("/")
>> @WebMethod
>> public int updateAccount(
>> @WebParam(name="account")
>> WSAccount account) {
>> logger.info("update Account Received: " + account);
>> }
>> }
>>
>>
>> @XmlType(name="Account")
>> @XmlAccessorType(XmlAccessType.PROPERTY)
>> @XmlRootElement(name="Account")
>> public class WSAccount {
>> private String accountID;
>>
>> @GET
>> @Path("/accountID")
>> public String getAccountID() {
>> return accountID;
>> }
>>
>> public void setAccountID(String accountID) {
>> this.accountID = accountID;
>> }
>> }
>>
>>
>> I am using jsr311-api-1.0 as stated in the user's guide.
>>
>> With the '@WebParam' the WSAccount is not properly loaded by the
>> default MessageBodyReader. If I remove the said annotation, the
>> service works fine and the object's fields are properly loaded.
>>
>> Unfortunately, if I remove the said annotation, the wsdl generated for
>> the Soap endpoint renders the parameter's name as arg0. If there is
>> another way to set the parameter name to something else, that would
>> help too.
>>
>> Again, thanks for the assistance.
>>
>> Gabo Manuel
>>
>> Sergey Beryozkin wrote:
>>> Hi Gabo
>>> Both snapshots have a fix. Any problems that you see ?
>>>
>>> Cheers, Sergey
>>>
>>> ----- Original Message ----- From: "Gabo Manuel"
>>> <km...@solegysystems.com>
>>> To: <us...@cxf.apache.org>
>>> Sent: Friday, December 12, 2008 7:50 AM
>>> Subject: Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the
>>> auto-generated wsdl
>>>
>>>
>>>> Hi Sergey,
>>>>
>>>> Just would like to confirm if the fix regarding this issue is
>>>> available to both 2.1.4-snapshot and that of 2.2-snapshot?
>>>>
>>>> Gabo
>>>
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date: 02/01/09 18:02:00
>>
>>
>
Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
Posted by Gabo Manuel <km...@solegysystems.com>.
Hi Sergey,
Sorry for that. Ignore that email. It is working now. Old versions of
cxf and jsr were loaded in the class path. My mistake. :)
Gabo
Gabo Manuel wrote:
> Hi Sergey,
>
> I'm sorry it took this long for a response. I tried using CXF2.2
> snapshot. All is working fine except for the following case:
>
> import javax.ws.rs.POST;
> import javax.ws.rs.Consumes;
> import javax.ws.rs.Produces;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> import javax.ws.rs.Path;
>
> @Consumes("*/xml")
> @Produces("*/xml")
> @WebService(serviceName="AccountService", portName="AccountServicePort")
> public class AccountService{
> @POST
> @Path("/")
> @WebMethod
> public int updateAccount(
> @WebParam(name="account")
> WSAccount account) {
> logger.info("update Account Received: " + account);
> }
> }
>
>
> @XmlType(name="Account")
> @XmlAccessorType(XmlAccessType.PROPERTY)
> @XmlRootElement(name="Account")
> public class WSAccount {
> private String accountID;
>
> @GET
> @Path("/accountID")
> public String getAccountID() {
> return accountID;
> }
>
> public void setAccountID(String accountID) {
> this.accountID = accountID;
> }
> }
>
>
> I am using jsr311-api-1.0 as stated in the user's guide.
>
> With the '@WebParam' the WSAccount is not properly loaded by the
> default MessageBodyReader. If I remove the said annotation, the
> service works fine and the object's fields are properly loaded.
>
> Unfortunately, if I remove the said annotation, the wsdl generated for
> the Soap endpoint renders the parameter's name as arg0. If there is
> another way to set the parameter name to something else, that would
> help too.
>
> Again, thanks for the assistance.
>
> Gabo Manuel
>
> Sergey Beryozkin wrote:
>> Hi Gabo
>> Both snapshots have a fix. Any problems that you see ?
>>
>> Cheers, Sergey
>>
>> ----- Original Message ----- From: "Gabo Manuel"
>> <km...@solegysystems.com>
>> To: <us...@cxf.apache.org>
>> Sent: Friday, December 12, 2008 7:50 AM
>> Subject: Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the
>> auto-generated wsdl
>>
>>
>>> Hi Sergey,
>>>
>>> Just would like to confirm if the fix regarding this issue is
>>> available to both 2.1.4-snapshot and that of 2.2-snapshot?
>>>
>>> Gabo
>>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date: 02/01/09 18:02:00
>
>
Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
Posted by Sergey Beryozkin <sb...@progress.com>.
Hi
I can't reproduce it, I've tried exactly the same AccountService and WSAccount you posted and I've no problems seeing a loaded
WSAccount instance. Perhaps the 2.2 SNAPSHOT you tried does not contain the fix ?
Can you try the latest one available from here :
http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/2.2-SNAPSHOT/ ?
Cheers, Sergey
> Hi Sergey,
>
> I'm sorry it took this long for a response. I tried using CXF2.2 snapshot. All is working fine except for the following case:
>
> import javax.ws.rs.POST;
> import javax.ws.rs.Consumes;
> import javax.ws.rs.Produces;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> import javax.ws.rs.Path;
>
> @Consumes("*/xml")
> @Produces("*/xml")
> @WebService(serviceName="AccountService", portName="AccountServicePort")
> public class AccountService{
> @POST
> @Path("/")
> @WebMethod
> public int updateAccount(
> @WebParam(name="account")
> WSAccount account) {
> logger.info("update Account Received: " + account);
> }
> }
>
>
> @XmlType(name="Account")
> @XmlAccessorType(XmlAccessType.PROPERTY)
> @XmlRootElement(name="Account")
> public class WSAccount {
> private String accountID;
>
> @GET
> @Path("/accountID")
> public String getAccountID() {
> return accountID;
> }
>
> public void setAccountID(String accountID) {
> this.accountID = accountID;
> }
> }
>
>
> I am using jsr311-api-1.0 as stated in the user's guide.
>
> With the '@WebParam' the WSAccount is not properly loaded by the default MessageBodyReader. If I remove the said annotation, the
> service works fine and the object's fields are properly loaded.
>
> Unfortunately, if I remove the said annotation, the wsdl generated for the Soap endpoint renders the parameter's name as arg0. If
> there is another way to set the parameter name to something else, that would help too.
>
> Again, thanks for the assistance.
>
> Gabo Manuel
>
> Sergey Beryozkin wrote:
>> Hi Gabo
>> Both snapshots have a fix. Any problems that you see ?
>>
>> Cheers, Sergey
>>
>> ----- Original Message ----- From: "Gabo Manuel" <km...@solegysystems.com>
>> To: <us...@cxf.apache.org>
>> Sent: Friday, December 12, 2008 7:50 AM
>> Subject: Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
>>
>>
>>> Hi Sergey,
>>>
>>> Just would like to confirm if the fix regarding this issue is available to both 2.1.4-snapshot and that of 2.2-snapshot?
>>>
>>> Gabo
>>