PDA

View Full Version : Strange Proble with Web Services


jcean8055
08-16-2007, 04:06 PM
Hello All,

I've been exporting PONO's as webservice for some time in the earlier releases but using preview 3 is generating an exception I've never seen before:

System.InvalidCastException: Unable to cast object of type 'Spring.Objects.Factory.Support.RootWebObjectDefin ition' to type 'MRDDWV2.Service.ISampleWebService'.
at SampleWebServiceExporter.TestSimpleType()

This is what my config looks like and my simple WS class:


public class SampleWebServiceImpl : ISampleWebService
{

#region ISampleWebService Members

public string TestSimpleType()
{
return "Test";
}

#endregion
}

public interface ISampleWebService
{

WebServiceResponse TestIncoming();
string TestSimpleType();
}

...stripped down for brevity
<object name="sampleServiceImpl" type="MRDDWV2.Service.SampleWebServiceImpl, MRDDWV2.Service" abstract="true">

</object>

<object id="SampleWebServiceExporter" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="TargetName" value="sampleServiceImpl"/>
<property name="Name" value="SampleWebService"/>
<property name="Namespace" value="http://apshealthcare.com/SampleWebService/"/>
<property name="Description" value="Web services used to process flat files. This webservice is configured using spring."/>

</object>

jcean8055
08-16-2007, 08:15 PM
I resolved the issue - abstract="true" should not be there.

Toranaga
02-18-2008, 07:03 AM
@jcean8055. Thanks for posting this. It also solved my "SoapException - Invalid Cast" when calling a Spring .NET exported web service.