NetTalk Central

Author Topic: SOAP web77 seems to not return what the WSDL says  (Read 3343 times)

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
SOAP web77 seems to not return what the WSDL says
« on: July 12, 2014, 12:29:56 PM »
Hello Bruce,

that web77 example is confusing me.

From http://localhost:88/Database?dbCustomer I understand, that my request ought to be http://localhost:88/Database and I would get back:
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Body>
    <dbCustomer xmlns="http://www.capesoft.com">
      <Customer>
        <CUS_ID>value</CUS_ID>
        ........

So I try this in the client:
Code: [Select]
   PostURL = 'http://localhost:88/Database'
    
    poststring = ''
    
    ThisClient.SetAllHeadersDefault()
    ThisClient.Pragma_ = 'No-Cache'    
    ThisClient.CacheControl = 'No-Cache'

    ThisClient.ContentType = 'application/soap+xml'   ! Does this trigger SOAP 1.2?????

    ThisClient.AcceptEncoding = 'utf-8'
    ThisClient.ContentLength = len (clip(PostString))
    ThisClient.AsyncOpenTimeOut = 1200       ! 12 seconds
    ThisClient.InActiveTimeout = 2000        ! 20 seconds

    ThisClient.Post(PostURL,PostString)

However, I get back the contents of the page with the "Web Service Documentation".

Changing the URL to  'http://loalhost:88/dbCustomer' returns the XML which I expected - but without any .SOPAenvelope-stuff, opposed to what is announced in the WSDL-page.

To me it seems, that ThisClient.Post(PostURL,PostString) performs a simple HTTP Request and Response without any parameters. The method .Fetch(PostUrl) returns the same result.

So, what is my mistake?

« Last Edit: July 13, 2014, 07:42:01 AM by Wolfgang Orth »

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: SOAP web77 seems to not return what the WSDL says
« Reply #1 on: July 14, 2014, 12:48:46 PM »
I am a bit closer to my aim now.

Ths SOAPenvelope is still not included, but I finally found a source, where I can see the necessary settings for posting a SOAP 1.1 or 1.2 request. It is in the Weather-Client-example.

Beside the missing SOAPenvelope, I am unable to store the received XML into my InMemory-Table. However, I can store the XML-contents into a Queue. Frome I can copy it with a LOOP to my Table .... but I suspect, this is not the way Bruce intended this stuff to be done.


Load (*Queue p_Group, *String p_XMLString, Long p_XMLStringLength, <string p_FileBoundary>,<string p_RecordBoundary>) ! I suppose this is a typo
Load (*Group p_Group, *String p_XMLString, Long p_XMLStringLength, <string p_FileBoundary>,<string p_RecordBoundary>)
Load (*File p_File, *String p_XMLString, Long p_XMLStringLength, <string p_FileBoundary>,<string p_RecordBoundary>)

from file:///D:/SoftVelocity/Clarion9.1/Accessory/Documents/Capesoft/xfiles/xfiles.htm#xFileXMLMethods

Why does it work for  QUEUE, but not for a FILE?

Does FILE mean TABLE in this context?

Some secrets solved, some secrets are left for tomorrow........

Wolfgang