on 08-05-2005 2:15 PM
Hi Reiner,
I have an issue with invoking the rfc '/SOMO/GET_TIMEZONE'.
this works fine using se37.
When i build the proxy client.
1> the wsdl description defines a method Somo_Get_Timezone
2> the proxy class [.cs] does not create the method to implement the rfc.
3> i created a method myself, but upon
invocation
results = this.SAPInvoke("Somo_Get_Timezone",new object[] {});
error msg :"invalid method Somo_Get_Timezone."
-
or -
results = this.SAPInvoke("/SOMO/GET_TIMEZONE",new object[] {});
error msg :"invalid method/SOMO/GET_TIMEZONE."
any combination yields similar results...
any thoghts ?
Thanks,
Amit.
We had a problem with "namespaced" functions in the very early version of NCo (1.0.0). With the current 2.0.1 I cannot repro any problem. It correctly create a proxy like this:
/// <summary>
/// Remote Function Module /SOMO/GET_TIMEZONE.
/// To get the timezone, date and time from this system for solution manager
/// </summary>
/// <param name="Date"></param>
/// <param name="Time"></param>
/// <param name="Tzone"></param>
[RfcMethod(AbapName = "/SOMO/GET_TIMEZONE")]
[SoapDocumentMethodAttribute("http://tempuri.org/_-SOMO_-GET_TIMEZONE",
RequestNamespace = "urn:sap-com:document:sap:rfc:functions",
RequestElementName = "_-SOMO_-GET_TIMEZONE",
ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
ResponseElementName = "_-SOMO_-GET_TIMEZONE.Response")]
public virtual void Somo_Get_Timezone (
[RfcParameter(AbapName = "DATE",RfcType=RFCTYPE.RFCTYPE_DATE, Optional = true, Direction = RFCINOUT.OUT, Length = 8, Length2 = 16)]
[XmlElement("DATE", IsNullable=false, Form=XmlSchemaForm.Unqualified)]
out string Date,
[RfcParameter(AbapName = "TIME",RfcType=RFCTYPE.RFCTYPE_TIME, Optional = true, Direction = RFCINOUT.OUT, Length = 6, Length2 = 12)]
[XmlElement("TIME", IsNullable=false, Form=XmlSchemaForm.Unqualified)]
out string Time,
[RfcParameter(AbapName = "TZONE",RfcType=RFCTYPE.RFCTYPE_INT, Optional = true, Direction = RFCINOUT.OUT, Length = 4, Length2 = 4)]
[XmlElement("TZONE", IsNullable=false, Form=XmlSchemaForm.Unqualified)]
out int Tzone)
{
object[]results = null;
results = this.SAPInvoke("Somo_Get_Timezone",new object[] {
});
Date = (string) results[0];
Time = (string) results[1];
Tzone = (int) results[2];
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when i go to reward the answer...
is it just me or is it just today ???
hehehehehe
i guess it's just one of those days ...
Community Forums Error
Welcome, Amit Chawathe
Your Control Panel
Your Reward Points
Help
Error:
Rewarding the message failed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reiner,
I am using NCo 2.0 itself.
The proxy was not being generated.
In my proxy , the Soap Attribute header had different values, which caused me to get the error i was getting.
[SoapDocumentMethodAttribute("http://tempuri.org/_-SOMO_-GET_TIMEZONE",
RequestNamespace = "urn:sap-com:document:sap:rfc:functions",
RequestElementName = "_-SOMO_-GET_TIMEZONE",
ResponseNamespace = "urn:sap-com:document:sap:rfc:functions",
ResponseElementName = "_-SOMO_-GET_TIMEZONE.Response")]
worked beautifully.
i had'nt put the '_-' in replacement for the '/'
i had to copy paste the method. it was not generated by the vs environment.
would u like me to give you more details ? and the exact proxy generated on my end ?
Thanks,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.