Re: wsdl2java and faults

2007-08-31 Thread Daniel Kulp

Benson,

The message parameter is used to set the faultString element in the 
on the wire fault.It should be set to something useful.   That said, 
I THINK we could add a constructor that doesn't have it, you would just 
get some default behavior in the faultString. (whatever the default 
Exception.getMessage() returns, I think the class name?)

Feel free to log a bug request.  (and a patch would be nice too ;-)

Dan

On Thursday 30 August 2007, Benson Margulies wrote:
 I was hoping for one more constructor on the exception object


 FaultException(FaultObject, Throwable);

 If that's not consistent with the standard, then I won't waste
 everyone's time with a JIRA. It would never be something important.

  -Original Message-
  From: James Mao [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 30, 2007 10:43 PM
  To: cxf-user@incubator.apache.org
  Subject: Re: wsdl2java and faults
 
  Hi,
 
  The artifacts generated by wsdl2java is JAX-WS 2.0 compliant, so
  everything generated by the tool is defined in the spec.
  Not really know the exact request here.
  Do you mind send your sample wsdl, and tell us what kind of
  artifacts you're looking for
 
  If there's bug to fix or improvements we can make, you are welcomed
  to file jira on https://issues.apache.org/jira/browse/CXF
 
  Regards,
  James
 
   The objects generated by wsdl2java for faults seem unnecessarily

 clumsy.

   I get a POJO + annotations that corresponds to the fault type.
   Call

 it

   'X'.
  
  
  
   Then I get XFault.
  
  
  
   To construct an XFault over a Throwable, I need to provide a
   message

 ---

   (String message, X x, Throwable cause)
  
  
  
   Could there not be no-message constructor? All the information I

 want to

   transmit is inside the x object.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: wsdl2java and faults

2007-08-31 Thread Benson Margulies
I was feeling somewhat overwhelmed by three copies of the same string.
My fault object was designed to carry the contents of a java exception,
and then I have to come up with that string, and then I pass the
throwable and get the contents again.

I think we should just write this up to my being cranky at 11pm.

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 31, 2007 12:13 PM
 To: cxf-user@incubator.apache.org
 Cc: Benson Margulies
 Subject: Re: wsdl2java and faults
 
 
 Benson,
 
 The message parameter is used to set the faultString element in
the
 on the wire fault.It should be set to something useful.   That
said,
 I THINK we could add a constructor that doesn't have it, you would
just
 get some default behavior in the faultString. (whatever the default
 Exception.getMessage() returns, I think the class name?)
 
 Feel free to log a bug request.  (and a patch would be nice too ;-)
 
 Dan
 
 On Thursday 30 August 2007, Benson Margulies wrote:
  I was hoping for one more constructor on the exception object
 
 
  FaultException(FaultObject, Throwable);
 
  If that's not consistent with the standard, then I won't waste
  everyone's time with a JIRA. It would never be something important.
 
   -Original Message-
   From: James Mao [mailto:[EMAIL PROTECTED]
   Sent: Thursday, August 30, 2007 10:43 PM
   To: cxf-user@incubator.apache.org
   Subject: Re: wsdl2java and faults
  
   Hi,
  
   The artifacts generated by wsdl2java is JAX-WS 2.0 compliant, so
   everything generated by the tool is defined in the spec.
   Not really know the exact request here.
   Do you mind send your sample wsdl, and tell us what kind of
   artifacts you're looking for
  
   If there's bug to fix or improvements we can make, you are
welcomed
   to file jira on https://issues.apache.org/jira/browse/CXF
  
   Regards,
   James
  
The objects generated by wsdl2java for faults seem unnecessarily
 
  clumsy.
 
I get a POJO + annotations that corresponds to the fault type.
Call
 
  it
 
'X'.
   
   
   
Then I get XFault.
   
   
   
To construct an XFault over a Throwable, I need to provide a
message
 
  ---
 
(String message, X x, Throwable cause)
   
   
   
Could there not be no-message constructor? All the information I
 
  want to
 
transmit is inside the x object.
 
 
 
 --
 J. Daniel Kulp
 Principal Engineer
 IONA
 P: 781-902-8727C: 508-380-7194
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog


wsdl2java and faults

2007-08-30 Thread Benson Margulies
The objects generated by wsdl2java for faults seem unnecessarily clumsy.

 

I get a POJO + annotations that corresponds to the fault type. Call it
'X'.

 

Then I get XFault.

 

To construct an XFault over a Throwable, I need to provide a message ---

 

(String message, X x, Throwable cause)

 

Could there not be no-message constructor? All the information I want to
transmit is inside the x object.

 

 

 

 



Re: wsdl2java and faults

2007-08-30 Thread James Mao

Hi,

The artifacts generated by wsdl2java is JAX-WS 2.0 compliant, so 
everything generated by the tool is defined in the spec.

Not really know the exact request here.
Do you mind send your sample wsdl, and tell us what kind of artifacts 
you're looking for


If there's bug to fix or improvements we can make, you are welcomed to 
file jira on https://issues.apache.org/jira/browse/CXF


Regards,
James


The objects generated by wsdl2java for faults seem unnecessarily clumsy.

 


I get a POJO + annotations that corresponds to the fault type. Call it
'X'.

 


Then I get XFault.

 


To construct an XFault over a Throwable, I need to provide a message ---

 


(String message, X x, Throwable cause)

 


Could there not be no-message constructor? All the information I want to
transmit is inside the x object.

 

 

 

 



  


Re: wsdl2java and faults

2007-08-30 Thread Jim Ma

Hi Benson ,

This class is generated as per Jaxws spec 2.5 .

I think the string message in constructor  is useful  if there is no 
message in X to tell us what the fault is or where throw this fault .
The below is the sample we use the message to indicate where cause this 
error :

  throw new XFault(XFault raised by server when , X);

We also can add a constructor (X x , Throwable cause)  for your case . 
Can you log an enhancement in CXF jira?


Regards

Jim

Benson Margulies wrote:

The objects generated by wsdl2java for faults seem unnecessarily clumsy.

 


I get a POJO + annotations that corresponds to the fault type. Call it
'X'.

 


Then I get XFault.

 


To construct an XFault over a Throwable, I need to provide a message ---

 


(String message, X x, Throwable cause)

 


Could there not be no-message constructor? All the information I want to
transmit is inside the x object.