NetTalk Central

Author Topic: WebService - SoapAction issue  (Read 2335 times)

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
WebService - SoapAction issue
« on: August 20, 2014, 05:04:37 PM »
Hi Bruce
I have a client that is passing the soap request like the following, this pulls back the actual page for mySystem, so it is not executing the SOAPAction.  I did some testing using this command and the netDemo example, if I remove the " from around the URL in the soap action everything works fine.  How can I make my server accept this request as the client sends it?

Code: [Select]
POST /mySystem HTTP/1.1
Content-Length: 376
Content-Type: text/xml; charset=utf-8
Accept:  */*
Host: 10.211.55.4:88
User-Agent: PC SOFT Framework
Connection: close
SOAPAction: "http://10.211.55.4:88/mySystem/Date"

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header/><SOAP-ENV:Body><ns1:Date xmlns:ns1="mySystem"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
« Last Edit: August 20, 2014, 05:15:22 PM by debzidoodle »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: WebService - SoapAction issue
« Reply #1 on: August 20, 2014, 09:53:15 PM »
Hi Debra,

Try adding the follwing code to netweb.clw;

Search for the
Calc_SOAPAction  ROUTINE
in the _ParseRequestHeader method.

Add the following lines to the bottom of the routine;

  if Left(self.ShortSOAPAction,1) = '"' and Right(self.ShortSOAPAction,1) = '"'
    self.ShortSOAPAction = sub(self.ShortSOAPAction,2,len(clip(self.ShortSOAPAction))-2)
  END


Let me know if it works please.

cheers
Bruce

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: WebService - SoapAction issue
« Reply #2 on: August 21, 2014, 07:36:37 AM »
Changing the code to be the following worked
Code: [Select]
  if Right(self.ShortSOAPAction,1) = '"'
    self.ShortSOAPAction = sub(self.ShortSOAPAction,1,len(clip(self.ShortSOAPAction))-1)
  END

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: WebService - SoapAction issue
« Reply #3 on: August 21, 2014, 10:19:19 PM »
thanks