cancel
Showing results for 
Search instead for 
Did you mean: 

/SOMO/GET_TIMEZONE rfc invocation issue

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

reiner_hille-doering
Active Contributor
0 Kudos

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];

}

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

reiner_hille-doering
Active Contributor
0 Kudos

There has been some problem with SDN servers on frieday - but anyway, thanks for the points .

BTW: If you have time, could you please upgrade to NCo 2.0.1 and try the function there? It also for you not ideal to have a proxy which is not automatically generated.

Former Member
0 Kudos

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