NetTalk Central

Author Topic: 3rd party seems to have problem posting xml to my server  (Read 8187 times)

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
3rd party seems to have problem posting xml to my server
« on: April 20, 2016, 05:50:21 AM »
Hello

I have a web service and it all works fine and accepts my test posts using SoapUI, one other 3rd party has been successful in posting xml data to my web service but a new 3rd party is having an issue.

I just need to help him with what an actual soap 1.1/1.2 post would look like (not from SoapUI), I have already given him the details from my SoapUI screen and the WSDL / service docs but to be honest if I were to go online and try a test post from some of the tools out there I fail :-) for example using the firefox addon Poster, I seem to do a successful post but no data is added to the database??

Here is my detail post from SoapUi posting to this server https://aserver:8083/Database and using a service dbcentral

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="Database">
   <soapenv:Header/>
   <soapenv:Body>
      <dat:dbCentral>
      <CentralLeads_list>
        <CentralLeads>
          <CEN_SOURCEDATE></CEN_SOURCEDATE>
          <CEN_SOURCE>SJWEBTEST</CEN_SOURCE>
          <CEN_SOURCENAME>SJWEB Test</CEN_SOURCENAME>
          <CEN_SOURCEID>123456789</CEN_SOURCEID>
          <CEN_DATAINPUT>FCFweb</CEN_DATAINPUT>
          <CEN_TITLE1>Mr</CEN_TITLE1>
          <CEN_FIRSTNAMES1>Teddy</CEN_FIRSTNAMES1>
          <CEN_SURNAME1>Smith TEST</CEN_SURNAME1>
          <CEN_DOB1></CEN_DOB1>
          <CEN_AGE1>27</CEN_AGE1>
          <CEN_ADDRESS1>25 Test Street</CEN_ADDRESS1>
          <CEN_ADDRESS2>Local Area</CEN_ADDRESS2>
          <CEN_ADDRESS3>Some Town</CEN_ADDRESS3>
          <CEN_ADDRESS4>Test Shire</CEN_ADDRESS4>
          <CEN_POSTCODE>TT1 1TT</CEN_POSTCODE>
          <CEN_RESIATCURR>5</CEN_RESIATCURR>
          <CEN_HOMETEL>01256789012</CEN_HOMETEL>
          <CEN_WORKTEL></CEN_WORKTEL>
          <CEN_MOBILE>01234567890</CEN_MOBILE>
          <CEN_STATUS>LIVE</CEN_STATUS>
          <CEN_EPV>195000</CEN_EPV>
          <CEN_MORTBAL>100000</CEN_MORTBAL>
          <CEN_LOANAMOUNT>150000</CEN_LOANAMOUNT>
          <CEN_INCOME1>35000</CEN_INCOME1>
          <CEN_ARREARS>0</CEN_ARREARS>
          <CEN_CCJS>0</CEN_CCJS>
          <CEN_LOANTERM>20</CEN_LOANTERM>
          <CEN_RESSTATUS>Home Owner</CEN_RESSTATUS>
          <CEN_ADVERSENOTES>value</CEN_ADVERSENOTES>
        </CentralLeads>     
      <CentralLeads_list>
         <dat:central_Action>insert</dat:central_Action>
      </dat:dbCentral>
   </soapenv:Body>
</soapenv:Envelope>

I know this should be enough for 3rd parties to use my service but......if anyone can help clarify..if possible :-)

I have attached my test efforts using the firefox poster

Many thanks

Edwin

Windows 10, Clarion 10, NT 9.06


urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: 3rd party seems to have problem posting xml to my server
« Reply #1 on: April 20, 2016, 11:36:58 AM »
Edwin, check your xml structure, it looks like has some errors.

It has on tag that is not closed
...
         <CEN_ADVERSENOTES>value</CEN_ADVERSENOTES>
        </CentralLeads>     
      <CentralLeads_list>   <--- Here, needs to close like this        </CentralLeads_list>
...
You can validate the xml here.
http://www.xmlvalidation.com/

Cheers

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #2 on: April 29, 2016, 04:27:50 AM »
Hi

Done that and I can still POST successfully using soapUI  but the 3rd party are still having an issue.

Has any one got some basic html / php form that I can use to post some xml to my web server to demonstrate with:-)

Any help on this much appreciated

Thanks

Edwin
Windows 10 pro, clarion 10 ee, NT 9.06

urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: 3rd party seems to have problem posting xml to my server
« Reply #3 on: April 29, 2016, 05:10:25 AM »
Hi Edwin, how about the headers?

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #4 on: May 01, 2016, 04:51:13 AM »
Hi

Here is a copy of the beginning of the logged post to my local Nettalk server

POST / HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "https://localhost:883/Database/dbCustomer"
Content-Length: 1863
Host: localhost:883
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


Many thanks

Edwin

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #5 on: May 02, 2016, 08:38:34 PM »
Hi Edwin,

Try to remove <soapenv:Header/> and replace your soapenv:Envelope by:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="Database">

I'm not shure about xmlns:dat just doble check it.

If you have a header use <soapenv:Header> and </soapenv:Header>

Cheers,

Marcos

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #6 on: May 05, 2016, 07:13:54 AM »
Hi

I have the asp file that the 3rd party is using to try and connect to my nettalk 9 webdervice

Please see attached

really need some help on helping this 3rd party connect :-)

Many thanks

Edwin

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #7 on: May 05, 2016, 09:10:12 AM »
Hello

The 3rd party have just let me know about an error they receive

'the specific error message am getting when running the code is

The download of the specified resource has failed.

this is happening on the send which is line 31'

Can any one help with this, do you need any more info?

Many thanks

Edwin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 3rd party seems to have problem posting xml to my server
« Reply #8 on: May 05, 2016, 11:17:37 PM »
Hi Edwin,

unfortunately I'm not an ASP person, so I can't comment on that side of things.

However if you want to determine what is wrong, then you should be able to do it completely from your side.

firstly, on the server side you can "see" the incoming request, both from Soap UI and from the problem client. This includes the HTTP header AND the XML part. The problem could be in either part so it's important to inspect both.

On the server window, you can simply cut & paste from the log both a working and non-working request and save them to TXT files. Upload those here if you can't spot the difference.

Secondly you can also inspect the "reply" being sent to the client. Again do this for both the working, and non-working systems and compare them. To see the output
a) run Debugview (or better yet, Debugview ++) on your server machine
b) in your server app add the project define
NETSHOWSEND=>1

again, you can save the output logs to a text file and post those here if you can't see the difference.

cheers
Bruce

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #9 on: May 06, 2016, 01:01:35 AM »
Hi Bruce

Thanks for your help and advice

I will implement Debugview++ and have a look

Thank again

Edwin

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #10 on: May 06, 2016, 01:15:17 AM »
Hi Bruce

I had copied a couploe of post logs from last night

See attached txt file

Many thanks

Edwin

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #11 on: May 06, 2016, 09:56:05 PM »
Hi Edwin,

I've made some tests with your server and added a record with success with:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv=''http://schemas.xmlsoap.org/soap/envelope/'' xmlns:a=''https://81.133.172.229:8083/Database'' >
        <soapenv:Body>
                <dbCentral xmlns="Database">
                        <CentralLeads_list>
                                <CentralLeads>
                                  <CEN_SOURCEDATE></CEN_SOURCEDATE>
                                  <CEN_SOURCE>SJWEBTEST</CEN_SOURCE>
                                  <CEN_SOURCENAME>SJWEB Test</CEN_SOURCENAME>
                                  <CEN_SOURCEID>123456789</CEN_SOURCEID>
                                  <CEN_DATAINPUT>FCFweb</CEN_DATAINPUT>
                                  <CEN_TITLE1>Mr</CEN_TITLE1>
                                  <CEN_FIRSTNAMES1>Teddy</CEN_FIRSTNAMES1>
                                  <CEN_SURNAME1>Smith</CEN_SURNAME1>
                                  <CEN_DOB1></CEN_DOB1>
                                  <CEN_AGE1>27</CEN_AGE1>
                                  <CEN_ADDRESS1>25 Test Street</CEN_ADDRESS1>
                                  <CEN_ADDRESS2>Local Area</CEN_ADDRESS2>
                                  <CEN_ADDRESS3>Some Town</CEN_ADDRESS3>
                                  <CEN_ADDRESS4>Test Shire</CEN_ADDRESS4>
                                  <CEN_POSTCODE>TT1 1TT</CEN_POSTCODE>
                                  <CEN_RESIATCURR>5</CEN_RESIATCURR>
                                  <CEN_HOMETEL>01256789012</CEN_HOMETEL>
                                  <CEN_WORKTEL></CEN_WORKTEL>
                                  <CEN_MOBILE>01234567890</CEN_MOBILE>
                                  <CEN_STATUS>LIVE</CEN_STATUS>
                                  <CEN_EPV>195000</CEN_EPV>
                                  <CEN_MORTBAL>100000</CEN_MORTBAL>
                                  <CEN_LOANAMOUNT>150000</CEN_LOANAMOUNT>
                                  <CEN_INCOME1>35000</CEN_INCOME1>
                                  <CEN_ARREARS>0</CEN_ARREARS>
                                  <CEN_CCJS>0</CEN_CCJS>
                                  <CEN_LOANTERM>20</CEN_LOANTERM>
                                  <CEN_RESSTATUS>Home Owner</CEN_RESSTATUS>
                                  <CEN_ADVERSENOTES>value</CEN_ADVERSENOTES>
                                </CentralLeads>
                        </CentralLeads_list>
                        <central_Action>insert</central_Action>
                </dbCentral>
        </soapenv:Body>
</soapenv:Envelope>

So your customer have to change ASP file with the variable "outxml" to have the above contents.

I notice the following:

1. Visual Studio did not import CentralLeads class that contains your db structure from dbCentral Method and probably the same in the other Method. I tried with the example web77 and it imported correctly all three databases classes that allows to "see" the database fields and work with them. You may review and compare with web77 on NetWebServiceMethod to see if you missed something.
2. When trying to send a wrong structure to your web server it answers with the index page not with a SOAP error message. No big deal but if client side make any mistake...

I hope that this could help you.

Cheers,

Marcos


Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #12 on: May 09, 2016, 04:55:56 AM »
Hello Marcos

Many thanks for your time, effort and advice on this, I appreciate it

I will relay this to the 3rd party delevoper and report back

Many thanks again

Edwin
Windows 10 Pro C10, NT 9.06, Jfiles, Xfiles, Stringtherory and self service

Edwin Hannan

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: 3rd party seems to have problem posting xml to my server
« Reply #13 on: May 09, 2016, 04:59:00 AM »
HI All

I have been trying to put together a webservice to insert leads into 2 tables in a database, I followed the Web77 example and have a basic webservice that functions on for REST and HTML POST (I can test post leads and they are inserted into the database table aip.TPS) but SOAP 1.1 and 1.2 fails.

I had this same issue back in Jan 2016 - see my previous post at http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=6718.0 where Bruce sorted me out and I managed to get it up and running and a 3rd party was able to post xml to the web service - that is running fine and ok - thanks Bruce.

I have been looking at this current issue for a few days now and still cannot get it to function..obviosly missing something 'obvious' but just can see it and I have another 3rd party that wishes to post xml data to another of my clients (into 2 tables, AIP and Central) and no luck but when I use soapUI I can post xml data successfully.

The 3rd party is using classic ASP - so I thought I would whip something together in clarion and do a quick post - hmmm err well not working out to well for me either.

Marcos has made a successful post to my test server ?(Thankyou Marcos), see precious post on this thread.

I have enabled debugview in all webservices and had a look at the output but really struggling to make sense of most of it :-)

I attach my solution, dct and aip.TPS / central TPS (2 Mb zip file) and hope if someone has the time to have a look and point me in the right direction - again

Many thanks

Edwin

Windows 10 Pro C10, NT 9.06, Jfiles, Xfiles, Stringtherory and self service