NetTalk Central

Author Topic: WebService  (Read 4166 times)

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
WebService
« on: March 17, 2014, 09:18:32 AM »
I am trying new WebService options in NetTalk 8. Obviously I'v got something wrong but not know what.

I am posting from WSDL documentation an example with some values

<?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://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <dbCustomer xmlns="http://www.capesoft.com">
      <Customer>
        <CUS.ID>888</CUS.ID>
        <CUS.COUNTRYCODE>1</CUS.COUNTRYCODE>
        <CUS.SHIPPERCODE>2</CUS.SHIPPERCODE>
        <CUS.NAME>Djole</CUS.NAME>
      </Customer>
      <Customer_Action>insert</Customer_Action>
    </dbCustomer>
  </soap:Body>
</soap:Envelope>

and receiving after that answer

<?xml version="1.0"?>
<dbCustomer_response>
</dbCustomer_response>

nothing is changed in CUSTOMER.TPS. As I walk through debugger I learn that strxml.load() function nothing get in a queue so nothing could be changed.

Where did I go wrong?

Best regards,

Djordje Radovanovic

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: WebService
« Reply #1 on: March 17, 2014, 10:12:22 PM »
    xml.Load(q:Customer,strxml.GetValuePtr(),'','Customer')

returns nothing in a q:Customer. Posible my XML is not correct but other XML reading software did not complain.

Best regards,

Djordje

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: WebService
« Reply #2 on: March 18, 2014, 02:54:12 AM »
I managed to load queue and my further investigation tells me that deep assignment did not works correctly.
In InsertRecord:Customer routine queue contain values and that values could not be assign to customer record  through deep assignment.

Now I have two problems how to parse XML from soap request and get records in queue and how to transfer data from queue to file records.

All in all in this moment WebService could not be used.

Best regards,

Djordje Radovanovic

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: WebService
« Reply #3 on: March 18, 2014, 05:12:58 AM »
thanks Djordje, I'm making a 8.02 build now for the other bug, but the WebService stuff is also high on the list...

I'll keep you posted.

Cheers
Bruce



Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: WebService
« Reply #4 on: March 19, 2014, 07:32:28 AM »
Same test, same result.

Did not update CUSTOMER table.

Best regards,

Djole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: WebService
« Reply #5 on: March 19, 2014, 08:49:42 AM »
Correct, the web service stuff is only being updated in 8.03. I've been playing with that today. The problem was caused by a very late change I made to the way the xfiles object is created in that procedure (sigh).

The 8.02 build was primarily to sort out a bug with the caching system.

cheers
Bruce

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: WebService
« Reply #6 on: March 20, 2014, 03:21:32 AM »
Just test information. Nothing more...

New version, new test.

Best regards,

Djole

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: WebService
« Reply #7 on: March 22, 2014, 12:28:19 PM »
After update of StringTheory 2.04 and XFiles 2.51 there is some improvement.

After same request I receive all records from Customer.tps as XML.

Still not able to insert or change any record.

Best reagrds,

Djordje Radovanvoic

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: WebService
« Reply #8 on: March 23, 2014, 12:30:57 AM »
First bug is solved.

In database service dbCustomer when you change call in routine PrimeParameters from

    xml.Load(q:Customer,strxml.GetValuePtr(),'','Customer')

into

  xml.Load(q:Customer,strxml.GetValuePtr(),strxml.length(),'','Customer')

queue from posted xml is finally loaded into q:Customer.
Customers table is not updated but that is another issue.

Best regards,

Djordje Radovanovic