cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sapcontrol from powershell returns no return value for ABAP/JAVA instance

Former Member
0 Likes
3,524

Hello,

I'm using thefollowing script to get the process list of an instance.

$proxy = New-WebServiceProxy -uri http://myserver.domain.de:50113?wsdl
$proxy.GetProcessList()<br>

Is the instance a hana database the return value is correct. But is the instance an ABAP/ASCS/JAVA/ASCS instance there is no return value.

Cannot find an overload for "GetProcessList" and the argument count: "0".
At line:2 char:1
+ $proxy.GetProcessList()
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest<br>

I'm able to reqest the methods and GetProcessList is available.


Are there any restriction outside of an HANA enviroment?

br Patrick

View Entire Topic
Former Member
0 Likes

Hello Isaías,

thank you very much for your competent support. I'm not a Powershell professional and I'm trying to use this issue to feed our monitoring tool.
So the bottom line is login information is needed? Why this big difference between HANA and ABAP/JAVA?

HANA

$proxy = New-WebServiceProxy -uri http://myserver.domain.de:50013?wsdl
$proxy.GetProcessList()

ABAP/JAVA

$proxy = New-WebServiceProxy -uri http://myserver.domain.de:50113?wsdl
$proxy.Credentials = new-object System.Net.NetworkCredential("SIDadm","password1234")

$type = $proxy.GetType().NameSpace
$proclist = New-Object ($type + ".GetProcessList")

$list = $proxy.GetProcessList($proclist)
$list.process

Is there a way to solve this for ABAP/JAVA as elegantly as in the HANA environment?

Isaias_SAP
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Patrick,

You are welcome! 🙂

Login might be needed, depending on the method being called.

You can try it without the "$proxy.Credentials..." line to see whether the method you are calling is "protected" (meaning it required authentication).

For more information about the protected methods, read this wiki page.

Regards,

Isaías

Isaias_SAP
Product and Topic Expert
Product and Topic Expert
0 Likes

PS: About the different coding required, this is about the SAP kernel version in use, not about being a HANA or ABAP/Java instance.