Skip to Content
0
Former Member
May 12, 2005 at 08:36 PM

.Net Connector and Web Services

40 Views

We have successfully built a proxy that connects a to a RFC. The RFC has two tables defined, one for input data a other for output data. The proxy was created inside a VB.NET Web Service project so the main idea (GOAL) is another deparment in the company can call it from Java JSP.

so we have the web method:

Imports System.Web.Services

Imports NetConnectorService.inivalores

http://tempuri.org/NetConnectorService/Service1")> _

Public Class NCActualizaSeI

Public cs As String = "ASHOST=server SYSNR=0 CLIENT=900 USER=someone PASSWD=something"

Public proxy As New ZAF(cs)

Public renglon As New ZAFESANLA

Public tblEntrada As New ZAFESANLATable, tblSalida As New ZAFRESANLATable

<WebMethod()> Public Function Ejecuta_RFC_tabla() As ZAFESANLATable

proxy.Zaf_Actualiza_As02_dummy(tblEntrada)

Return tblEntrada

End Function

<WebMethod()> Public Function Ejecuta_RFC(tbl as ZAFESANLATable) As ZAFRESANLATable

proxy.Zaf_Actualiza_As02("N", tbl, tblSalida)

Return tblSalida

End Function

End class

And the client code looks like this:

Dim obj As New wsActualizaAF.NCActualizaSeI

Dim Data As Object

Dim Entrada as Object

Entrada = obj.Ejecuta_RDF_tabla()

Entrada(0).Activo="000005500036"

Entrada(0).Sociedad="000005500036"

Entrada(0).Serie = "55222555555"

Entrada(0).Inventario = "55222555555"

Data = obj.Ejecuta_RFC(Entrada)

As you can see we fisrt have to call the method Ejecuta_RFC_tabla to return an object type of ZAFESANLATable (input table) then fill in the data

and then send it back to the web service when executing the call to the proxy Data = obj.Ejecuta_RFC(Entrada)

this seems to work ok but my questions are:

Is there any other way to send a table object to the client without having to make a call to a dummy RFC that only creates the table?

Is there something like a DimAs method that allows one to create a table object directly from the original RFC?

In a production enviroment would this whole idea work fine? I mean is there any complications?

Any advice is welcome.