Try to specify service namespace on client side. Should help.

On 2/14/07, Mathias Scharl <[EMAIL PROTECTED]> wrote:
Hi,

I'm actually facing the same problem. When using the xfire dynamic proxy
client for invoking my xfire webservices
my custom exceptions thrown by my services are wrapped inside a
XFireRuntimeException.
but when calling the webservices via an axis client the right (expected)
exceptions are thrown.

my client code looks like this:

MyService myService;
ServiceFactory factory = new ObjectServiceFactory();
Service serviceModel = factory.create(MyService.class);
myService = (MyService ) new XFireProxyFactory().create(serviceModel,
MYSERVICE_URL);

there was a similar issue on the mailing list on 12.18.06 (Custom
Exceptions are wrapped inside XFireRuntimeException)
but unfortunately no further discussion.

thx,
mathias





Noah Vihinen schrieb:
> I'm having trouble getting my exception to flow through from the
> server to my dynamic proxy client.  My exception is always wrapped by
> a XFireRuntimeException:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
> Nested exception is org.codehaus.xfire.fault.XFireFault: bad bad
>
> Here's the relevant snippets of code:
>
> Test.java:
> getService().badMethod();
>
> Service.java:
> public abstract void badMethod() throws MyException;
>
> SerivceImpl.java:
> public void badMethod() throws MyException
> {
>   throw new MyException("bad bad");
> }
>
> The SOAP HTTP response body:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>bad
> bad</faultstring><detail><MyException
> xmlns="http://ws.maven.net/mcr/v1";
> xmlns:ns1="http://service.mcr.maven.net";
> xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance";
> ns2:type="ns1:MyException"
> /></detail></soap:Fault></soap:Body></soap:Envelope>
>
> services.xml:
> <beans xmlns="http://xfire.codehaus.org/config/1.0";>
>   <service>
>     <name>Service</name>
>     <namespace>http://ws.maven.net/mcr/v1</namespace>
>     <serviceClass>net.maven.mcr.service.Service</serviceClass>
>     <implementationClass>
>       net.maven.mcr.service.ServiceImpl
>     </implementationClass>
>     <scope>session</scope>
>     <properties>
>       <property key="writeXsiType">true</property>
>       <property key="overrideTypesList">
>         <list xmlns="">
>           <value>net.maven.mcr.service.Node</value>
>           <value>net.maven.mcr.service.Property</value>
>         </list>
>       </property>
>     </properties>
>   </service>
> </beans>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to