0

I have this python code to access webservice.

import urllib.request
import ssl
import suds.transport.http
import os.path
from os import path
from suds.client import Client
import json
import time

class UnverifiedHttpsTransport(suds.transport.http.HttpTransport):
  def __init__(self, *args, **kwargs):
     super(UnverifiedHttpsTransport, self).__init__(*args, **kwargs)
  def u2handlers(self):
     handlers = super(UnverifiedHttpsTransport, self).u2handlers()
     context = ssl.create_default_context()
     context.check_hostname = False
     context.verify_mode = ssl.CERT_NONE
     handlers.append(urllib.request.HTTPSHandler(context=context))
     return handlers

url="https://xxxxxxx.com/datamanagement.asmx?WSDL"
client = Client(url, transport=UnverifiedHttpsTransport())
client.service.ClearPeopleStatus()

def InsertPeopleData(data):
  info=data.decode("utf-8")
  json_obj = json.dumps(json.loads(info))
  ret_ = client.service.ReadPeopleStatus()
  ret=client.service.InsertPeopleData(json_obj)  
  return

The code is to update data to IIS webservice using Gsoap. If I don't call these two APIs client.service.ReadPeopleStatus() and ret=client.service.InsertPeopleData(json_obj) , my program runs ok.

If I call these two APIs, I have Segmentation Fault (Core dump).

How can I solve the issue?

3
  • Your question is not clear or incomplete, i.e. where does the segfault occur? Perhaps use a debugging tool to find out? If the server side backend service C/C++ code crashes, then this is most likely due to an backend application-level logic issue, such as a nullptr access when pointer derefs go unchecked. Problems are typically unrelated to IIS+gSOAP. Commented Sep 3, 2020 at 12:58
  • Segmentation fault happened only at client side when I call webservice APIs. If no interfacing webAPIs, there is no segmentation fault at client code. How can I debug the issue? Commented Sep 4, 2020 at 0:17
  • Something in suds isn't working right, so perhaps log the messages stackoverflow.com/questions/4426204/… then check the suds docs? Commented Sep 5, 2020 at 17:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.