You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by forda <da...@bredband.net> on 2009/08/13 15:38:48 UTC

Custom Fault defined in WSDL not assigned to SOAPFault detail

Hi !

Is there a way, except creating a custom interceptor, in the latest version
of the CXF framework to make custom fault propagated in a SOAPFault's detail
? Dose'nt seem to work by default ?

Tanks in Advance
Daniel

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p24954475.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by forda <da...@bredband.net>.
Hi !

Tanks i had a look at the code that was written. And there was fundamental
failure
in the code where it was used. Now i  did explain that for a developer in
the team
and it seems to work. Though have to verify it with .Net folks first.


Lukasz Lichota wrote:
> 
> I checked version 2.2.2 and WSDL with two faults defined for the operation
> and it worked ok
> 
> 
> forda wrote:
>> 
>> Ok i also recognized this, but still no detail filled as far as i can
>> see.
>> I will attach these two generated classes to this thread.
>> 
>> Thanks in advance.
>> Daniel
>> 
>>  http://www.nabble.com/file/p25076143/ForetagServiceInterface.java
>> ForetagServiceInterface.java 
>>  http://www.nabble.com/file/p25076143/Systemfel.java Systemfel.java 
>> 
>> 
>> Lukasz Lichota wrote:
>>> 
>>> You use data binding server implementation (not @WebServiceProvider)
>>> right?
>>> so you should have three classes generated that extends
>>> java.lang.Exception (one per fault) and your operation will declare them
>>> (throws), these classes are annotated with @WebFault (i'm not sure it
>>> this annotation needs to be repeated on the interface),
>>> so in your interface implementation class you just throw the exception
>>> of the certain type and details in soap message are properly filled (at
>>> least it worked for me with one exception), is that what is not working?
>>> 
>>> can you show generated exception class and interface/portType?
>>> 
>>> 
>>> forda wrote:
>>>> 
>>>> Have anyone looked at this. Or do i need to have a complete testcase
>>>> first?
>>>> Or clearify anything ?
>>>> 
>>>> Thanks in advance
>>>> 
>>>> Daniel
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p25078896.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by Lukasz Lichota <Lu...@sabre.com>.
I checked version 2.2.2 and WSDL with two faults defined for the operation
and it worked ok


forda wrote:
> 
> Ok i also recognized this, but still no detail filled as far as i can see.
> I will attach these two generated classes to this thread.
> 
> Thanks in advance.
> Daniel
> 
>  http://www.nabble.com/file/p25076143/ForetagServiceInterface.java
> ForetagServiceInterface.java 
>  http://www.nabble.com/file/p25076143/Systemfel.java Systemfel.java 
> 
> 
> Lukasz Lichota wrote:
>> 
>> You use data binding server implementation (not @WebServiceProvider)
>> right?
>> so you should have three classes generated that extends
>> java.lang.Exception (one per fault) and your operation will declare them
>> (throws), these classes are annotated with @WebFault (i'm not sure it
>> this annotation needs to be repeated on the interface),
>> so in your interface implementation class you just throw the exception of
>> the certain type and details in soap message are properly filled (at
>> least it worked for me with one exception), is that what is not working?
>> 
>> can you show generated exception class and interface/portType?
>> 
>> 
>> forda wrote:
>>> 
>>> Have anyone looked at this. Or do i need to have a complete testcase
>>> first?
>>> Or clearify anything ?
>>> 
>>> Thanks in advance
>>> 
>>> Daniel
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p25078481.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by forda <da...@bredband.net>.
Ok i also recognized this, but still no detail filled as far as i can see.
I will attach these two generated classes to this thread.

Thanks in advance.
Daniel

http://www.nabble.com/file/p25076143/ForetagServiceInterface.java
ForetagServiceInterface.java 
http://www.nabble.com/file/p25076143/Systemfel.java Systemfel.java 


Lukasz Lichota wrote:
> 
> You use data binding server implementation (not @WebServiceProvider)
> right?
> so you should have three classes generated that extends
> java.lang.Exception (one per fault) and your operation will declare them
> (throws), these classes are annotated with @WebFault (i'm not sure it this
> annotation needs to be repeated on the interface),
> so in your interface implementation class you just throw the exception of
> the certain type and details in soap message are properly filled (at least
> it worked for me with one exception), is that what is not working?
> 
> can you show generated exception class and interface/portType?
> 
> 
> forda wrote:
>> 
>> Have anyone looked at this. Or do i need to have a complete testcase
>> first?
>> Or clearify anything ?
>> 
>> Thanks in advance
>> 
>> Daniel
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p25076143.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by Lukasz Lichota <Lu...@sabre.com>.
You use data binding server implementation (not @WebServiceProvider) right?
so you should have three classes generated that extends java.lang.Exception
(one per fault) and your operation will declare them (throws), these classes
are annotated with @WebFault (i'm not sure it this annotation needs to be
repeated on the interface),
so in your interface implementation class you just throw the exception of
the certain type and details in soap message are properly filled (at least
it worked for me with one exception), is that what is not working?

can you show generated exception class and interface/portType?


forda wrote:
> 
> Have anyone looked at this. Or do i need to have a complete testcase
> first?
> Or clearify anything ?
> 
> Thanks in advance
> 
> Daniel
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p25076127.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by forda <da...@bredband.net>.
Have anyone looked at this. Or do i need to have a complete testcase first?
Or clearify anything ?

Thanks in advance

Daniel


forda wrote:
> 
> Hi Daniel !
> 
> Ok, what exactly do mean by the TCK's ? Current version of CXF or furture
> version ?
> We are using version 2.2.2 of CXF, thers is a 2.2.3 should we use that
> instead?
> 
> Of course will provide a testcase soon which exemplifies the flow. 
> Let's start explain how the Custom faults are structured in schemas
> and WSDL.
> 
> 3 similiar xsd represent a customized faultmessage only separated by the
> name
> of the xsd. In the wsdl the faultmessage is referenced in the message of
> the actual fault.
> 
> Any JAXB binding needed to make it work during the codegeneration step.
> Cause no annotation for WebFault is set at the porttype/interface in the
> generated code. 
> Any idea ?
> 
> I attached the xsds and a sample wsdl.
> 
> Thanks in advance.
> 
> Cheers,
> 
> Daniel
> 
>  http://www.nabble.com/file/p25023355/Systemfelmeddelande.xsd
> Systemfelmeddelande.xsd 
>  http://www.nabble.com/file/p25023355/Systemfelmeddelande.xsd
> Systemfelmeddelande.xsd 
>  http://www.nabble.com/file/p25023355/Verksamhetsfelmeddelande.xsd
> Verksamhetsfelmeddelande.xsd 
>  http://www.nabble.com/file/p25023355/Foretag.wsdl Foretag.wsdl 
> 
> 
> 
> dkulp wrote:
>> 
>> On Thu August 13 2009 9:38:48 am forda wrote:
>>> Hi !
>>>
>>> Is there a way, except creating a custom interceptor, in the latest
>>> version
>>> of the CXF framework to make custom fault propagated in a SOAPFault's
>>> detail ? Dose'nt seem to work by default ?
>> 
>> It should be working since the TCK's that we test with explicitely test
>> it.   
>> Do you have an example testcase that shows any issue?
>> 
>> -- 
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p25075908.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by forda <da...@bredband.net>.
Hi Daniel !

Ok, what exactly do mean by the TCK's ? Current version of CXF or furture
version ?
We are using version 2.2.2 of CXF, thers is a 2.2.3 should we use that
instead?

Of course will provide a testcase soon which explifies the flow. 
Let's start explain how the Custom faults are structured in schemas
and WSDL.

3 similiar xsd represent a customized faultmessage only separated by the
name
of the xsd. In the wsdl the faultmessage are referenced in the message of
the actual fault.

Any JAXB binding needed to make it work during the codegeneration step.
Cause no annotation for WebFault is set at the protype. Any idea ?

I attached the xsds and a sample wsdl.

Thanks in advance.

Cheers,

Daniel http://www.nabble.com/file/p25023355/Systemfelmeddelande.xsd
Systemfelmeddelande.xsd 
http://www.nabble.com/file/p25023355/Systemfelmeddelande.xsd
Systemfelmeddelande.xsd 
http://www.nabble.com/file/p25023355/Verksamhetsfelmeddelande.xsd
Verksamhetsfelmeddelande.xsd 
http://www.nabble.com/file/p25023355/Foretag.wsdl Foretag.wsdl 



dkulp wrote:
> 
> On Thu August 13 2009 9:38:48 am forda wrote:
>> Hi !
>>
>> Is there a way, except creating a custom interceptor, in the latest
>> version
>> of the CXF framework to make custom fault propagated in a SOAPFault's
>> detail ? Dose'nt seem to work by default ?
> 
> It should be working since the TCK's that we test with explicitely test
> it.   
> Do you have an example testcase that shows any issue?
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Fault-defined-in-WSDL-not-assigned-to-SOAPFault-detail-tp24954475p25023355.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Fault defined in WSDL not assigned to SOAPFault detail

Posted by Daniel Kulp <dk...@apache.org>.
On Thu August 13 2009 9:38:48 am forda wrote:
> Hi !
>
> Is there a way, except creating a custom interceptor, in the latest version
> of the CXF framework to make custom fault propagated in a SOAPFault's
> detail ? Dose'nt seem to work by default ?

It should be working since the TCK's that we test with explicitely test it.   
Do you have an example testcase that shows any issue?

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog