on 11-01-2005 8:48 AM
Hi,
I am writing a web service for sap functions using rfc. My code is;
public string RFC_DI_URUNTIPLERI(out DataSet SEKTORLER_, out DataSet SIPTURU_URUNTIPI_, out DataSet TABLAR_, out DataSet URUNTIPLERI_){
sapProxy = new SAPProxy();
SAP.Connector.Destination destination = new SAP.Connector.Destination();
destination.AppServerHost = ...
destination.Client = ...
destination.Language = ...
destination.Username = ...
destination.Password = ...
destination.SystemNumber = ...
SAP.Connector.SAPConnection sapConnection = new SAP.Connector.SAPConnection(destination);
sapProxy.Connection = sapConnection;
ZBMBSEKTORTable sapSEKTOR = new ZBMBSEKTORTable();
ZURUNTIPUYTable sapSIPTURU_URUNTIPI = new ZURUNTIPUYTable();
ZTABTANIMTable sapTABLAR = new ZTABTANIMTable();
ZDI_URUNTPTable sapURUNTIPLERI = new ZDI_URUNTPTable();
sapProxy.Z_RFC_DI_URUNTIPLERI(ref sapSEKTOR, ref sapSIPTURU_URUNTIPI,ref sapTABLAR, ref sapURUNTIPLERI);
}
and the proxy file is;
[RfcMethod(AbapName = "Z_RFC_DI_URUNTIPLERI")]
[SoapDocumentMethodAttribute("http://tempuri.org/Z_RFC_DI_URUNTIPLERI",
RequestNamespace = "urn:sap-com:document:sap:rfc:functions",
RequestElementName = "Z_RFC_DI_URUNTIPLERI",
ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
ResponseElementName = "Z_RFC_DI_URUNTIPLERI.Response")]
public void Z_RFC_DI_URUNTIPLERI (
[RfcParameter(AbapName = "SEKTORLER",RfcType=RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
[XmlArray("SEKTORLER", IsNullable=false)]
[XmlArrayItem("item", IsNullable=false)]
ref ZBMBSEKTORTable SEKTORLER,
[RfcParameter(AbapName = "SIPTURU_URUNTIPI",RfcType=RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
[XmlArray("SIPTURU_URUNTIPI", IsNullable=false)]
[XmlArrayItem("item", IsNullable=false)]
ref ZURUNTIPUYTable SIPTURU_URUNTIPI,
[RfcParameter(AbapName = "TABLAR",RfcType=RFCTYPE.RFCTYPE_ITAB, Optional = true, Direction = RFCINOUT.INOUT)]
[XmlArray("TABLAR", IsNullable=false)]
[XmlArrayItem("item", IsNullable=false)]
ref ZTABTANIMTable TABLAR,
[RfcParameter(AbapName = "URUNTIPLERI",RfcType=RFCTYPE.RFCTYPE_ITAB, Optional = false, Direction = RFCINOUT.INOUT)]
[XmlArray("URUNTIPLERI", IsNullable=false)]
[XmlArrayItem("item", IsNullable=false)]
ref ZDI_URUNTPTable URUNTIPLERI)
{
object[]results = null;
results = this.SAPInvoke("Z_RFC_DI_URUNTIPLERI",new object[] {
SEKTORLER,SIPTURU_URUNTIPI,TABLAR,URUNTIPLERI});
SEKTORLER = (ZBMBSEKTORTable) results[0];
SIPTURU_URUNTIPI = (ZURUNTIPUYTable) results[1];
TABLAR = (ZTABTANIMTable) results[2];
URUNTIPLERI = (ZDI_URUNTPTable) results[3];
return;
}
When I called my function ("public string RFC_DI_URUNTIPLERI") there is an error;
The 'ZDIF:ZBMBSEKTORTable' element is not declared. An error occurred at , (1, 750).
public string RFC_DI_URUNTIPLERI(out System.Data.DataSet SEKTORLER_, out System.Data.DataSet SIPTURU_URUNTIPI_, out System.Data.DataSet TABLAR_, out System.Data.DataSet URUNTIPLERI_) {
object[] results = this.Invoke("RFC_DI_URUNTIPLERI", new object[0]);
SEKTORLER_ = ((System.Data.DataSet)(results[1]));
I see that error is deal with the parameter passing, but I am not passing DataSet, I am passing the true type, What should I do?
I have solved my problem; problem is deal with toAdoTablee()' namespace.
thanks anyway.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.