users@jax-ws.java.net

Re: _at_WebFault namespace customization

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Tue, 24 Oct 2006 09:51:33 -0700

The WebFault javadocs describes the "bean" element. Did you specify the
all three values or just the "bean"? JAX-WS will generate the fault
bean named after the "bean" element, thus allowing multiple services to
use the same fault bean.

Dima Gutzeit wrote:

> Hi,
>
> I am a little bit confused with this element since I can not find any
> documentation related to it. Is there should be a class named
> "fromjava.soap12.nosei.server.MyFault2Bean" or is it being generated
> by APT ?
>
> I tried specifing some class name that does not exist, it compiled the
> service ok, but I still see the same behavior where the exception
> complex type is defined in the schema with the namespace of the
> service, and referenced from the schema of the common part and not the
> other way around.
>
> Regards,
> Dima Gutzeit.
>
> ----- Original Message ----- From: "Doug Kohlert" <Doug.Kohlert_at_Sun.COM>
> To: <users_at_jax-ws.dev.java.net>
> Sent: Tuesday, October 24, 2006 12:57 AM
> Subject: Re: @WebFault namespace customization
>
>
>> Try using the WebFault.faultBean element.
>>
>> @javax.xml.ws.WebFault(faultBean="fromjava.soap12.nosei.server.MyFault2Bean",
>> name="MyFault2", targetNamespace="http://mynamespace")
>> public class Fault2 extends Exception {
>> int age;
>>
>> public Fault2 (String message, int age) {
>> super(message);
>> this.age = age;
>> }
>>
>> public int getAge() {
>> return age;
>> }
>> }
>>
>> Dima Gutzeit wrote:
>>
>>> Can anyone comment on this please :-) ?
>>>
>>> ----- Original Message -----
>>> From: Dima Gutzeit <mailto:dima_at_mailvision.com>
>>> To: users_at_jax-ws.dev.java.net <mailto:users_at_jax-ws.dev.java.net>
>>> Sent: Thursday, October 19, 2006 9:39 AM
>>> Subject: @WebFault namespace customization
>>>
>>> Hello,
>>> I have several webservices in my application, and each one of them
>>> can throw a general exception which resides in common namespace of
>>> my application.
>>> Each webservice has its own namespace.
>>> After building the webservices and generating wsdl and schema I
>>> see that each application defines its own exception object in its
>>> own name space, instead of using the exception from common
>>> namespace.
>>> The webfault definition has the targetnamespace attribute :
>>> @WebFault(name="testException",
>>> targetNamespace=http://test.blah.common)
>>> It seems that webfault behavior differes from simple object
>>> behavior in this case.
>>> Any pointers would be appriciated.
>>> Regards,
>>> Dima Gutzeit.
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>