down00112 2019-05-07 06:21
浏览 179

获取ARERR 149必须在控制记录中提供用户名

I have a SOAP url , while running the url through browser I am getting a wsdl response.But when I am trying to call a method in the response using the required parameter list, and it is showing "ARERR [149] A user name must be supplied in the control record".I tried using PHP as well as python but I am getting the same error.

I searched this error and got the information like this : "The name field of the ARControlStruct parameter is empty. Supply the name of an AR System user in this field.".But nowhere I saw how to supply the user name parameter.

  • 写回答

1条回答 默认 最新

  • drrog9853 2019-05-14 09:50
    关注

    I got the solution for this problem.Following are the steps I followed to solve the issue (I have used "zeep" a 3rd party module to solve this):

    1. Run the following command to understand WSDL:

    python -mzeep wsdl_url

    1. Search for string "Service:". Below that we can see our operation name

    2. For my operation I found following entry:

    MyOperation(parameters..., _soapheaders={parameters: ns0:AuthenticationInfo})

    which clearly communicates that, I have to pass parameters and an auth param using kwargs "_soapheaders"

    With that I came to know that I have to pass my authentication element as _soapheaders argument to MyOperation function.

    1. Created Auth Element:

    auth_ele = client.get_element('ns0:AuthenticationInfo') auth = auth_ele(userName='me', password='mypwd')

    1. Passed the auth to my Operation:

    cleint.service.MyOperation('parameters..', _soapheaders=[auth])

    评论

报告相同问题?

悬赏问题

  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误