Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing soapAction false to suds
#1
I have a SOAP webservice wrote in Java and I call it with suds library:

def soapclient(request):

   username='user'    
   password='pwd'
   base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
   authenticationHeader = {
      "SOAPAction" : "ActionName",
      "Authorization" : "Basic %s" % base64string
   }

   client = Client('http://my_ult_to_file?wsdl', headers=authenticationHeader)

   var=dict(utenteApplicativo='aaaaa', pageNumber=1, pageSize=1,
         carrelloDto=dict(idCarrelloSorgente='99999999994', 
         itemCarrelloDtoList=dict(causale='prova', codiceEnte='ente', importo=2, importoImposta=1, importoTotale=3, importoUnitario=2,
         quantitaItem=1, tipoContabilizzazione='TA')) )

   result = client.service.creaCarrello(var) 
   return render_to_response('soapclient.html', {'var': result})
but I receive the error:

Server raised fault: 'The given SOAPAction ActionName does not match an operation.'

In the wsdl file soapAction is not setted:
<wsdl:operation name="creaCarrello">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="creaCarrello">
<soap:body namespace="http://infocamere.it/pagamentionlinews" use="literal"/>
</wsdl:input>
There is a manner to set soapAction in the client to a value false or similar?
Reply
#2
(Dec-01-2017, 04:22 PM)PeppePegasus Wrote: I have a SOAP webservice wrote in Java and I call it with suds library:

def soapclient(request):

   username='user'    
   password='pwd'
   base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
   authenticationHeader = {
      "SOAPAction" : "ActionName",
      "Authorization" : "Basic %s" % base64string
   }

   client = Client('http://my_ult_to_file?wsdl', headers=authenticationHeader)

   var=dict(utenteApplicativo='aaaaa', pageNumber=1, pageSize=1,
         carrelloDto=dict(idCarrelloSorgente='99999999994', 
         itemCarrelloDtoList=dict(causale='prova', codiceEnte='ente', importo=2, importoImposta=1, importoTotale=3, importoUnitario=2,
         quantitaItem=1, tipoContabilizzazione='TA')) )

   result = client.service.creaCarrello(var) 
   return render_to_response('soapclient.html', {'var': result})
but I receive the error:

Server raised fault: 'The given SOAPAction ActionName does not match an operation.'

In the wsdl file soapAction is not setted:
<wsdl:operation name="creaCarrello">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="creaCarrello">
<soap:body namespace="http://infocamere.it/pagamentionlinews" use="literal"/>
</wsdl:input>
There is a manner to set soapAction in the client to a value false or similar?

SyntaxError: invalid syntax (<string>, line 1)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Type Not Found error on python soap call using suds library wellborn 1 4,576 Dec-19-2017, 07:53 PM
Last Post: micseydel
  Suds client response error rajesh 1 4,145 Sep-26-2017, 11:36 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020