Skip to Content
0
Former Member
Apr 14, 2004 at 09:04 PM

Problems creating web service using SAP .NET Connector

27 Views

I’m trying to use the SAP .NET Connector in a web service project of a Visual Studio .NET solution. I followed the DNCWebServiceSample example provided with the Connector and created a web service that tests ok (XML renders with no errors in a browser window) but I keep running into problems calling the method from an aspx page. For DNCWebServiceSample, if I use

NameSpace.WebService.BRFCKNA1Table ReturnObject=new NameSpace.WebService.BRFCKNA1Table()

to define the table object on the calling page, I get a build error that "BRFCKNA1Table doesn’t exist in the namespace." And if I try just defining BRFCKNA1

NameSpace.WebService.BRFCKNA1 ReturnObject=new NameSpace.WebService.BRFCKNA1()

I get the error:

"Cannot implicitly convert type 'NameSpace.WebService.BRFCKNA1[]' to 'NameSpace.WebService.BRFCKNA1'"

What am I doing wrong? Unfortunately, I couldn’t find any sample code that shows you how to call the DNCWebServiceSample from an aspx page.

I’ve also tried to use the ToADODataTable method within the web service to convert the SAP tables to ADO tables and add the ADO tables to a DataSet. One RFC that I’m using returns 11 tables, so I thought this would be a good way to return all that data as a single DataSet. But I keep getting XMLSchemaException errors trying to

invoke the web method from an aspx page.

Either way, I want to set up a web service using the .NET connector for other applications to consume. Any help would be greatly appreciated.