NetTalk Central

Author Topic: webservice web:lastPost get filled but it doesn't get to the processed code  (Read 3540 times)

joep

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Email
Hi all
I have got a webservice up and running for a client where some data on a website is processed into the database.
Like the most customers they like some new stuff, so I went making this in my webservice.

But my webservice does not work properly anymore.
web.LastPost is filled with the xml I posted. That part works.
But in NetWebPage procedure the processed code embed never runs.

The xml looks fine in the web.LastPost

POST /Xml2Aag HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
Content-Length: 6557
Host: localhost:88
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)

<?xml version="1.0" encoding="utf-16"?>
<form>
etc.........

The NetwebPage is from the prototype (NetWebServerWorker p_web)

Any idea's why the webservice doesn't get to the processed code embed anymore?

Regards,
Joep
   

joep

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Email
And this is what I get back from soapUI

<html class="no-js">
   <head>
      <meta content="HTML Tidy for Java (vers. 26 sep. 2004), see www.w3.org" name="generator"/>
      <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"/>
      <link type="text/css" rel="stylesheet" href="/styles/error.css"/>
      <title>404 The page cannot be found</title>
   </head>
   <body class="ErrorPage">
      <div class="ErrorDiv">
         <hr/>
         <h1>The page cannot be found</h1>
         The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
         <br/>
         <br/>
         <hr/>
      </div>
   </body>
</html>

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Joep,

Using NetWebPage to make service methods is very "old" - you should be using the NetWebService, and NetWebServiceMethod procedure types instead. This does a lot of the work for you, and makes it _much_ simpler to create services. Plus they come auto-documented, and include built-in test pages.

that said,
what is the name of your procedure (netwebpage) in your app file? It should match the URL of the request - ie in this case
Xml2Aag

you can also just put that URL into your browser, and see what response you get there.

Cheers
Bruce

joep

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Email
Hi Bruce,

Like I said, it looks like the NetWebPage is broken in a way, because in the web.LastPost the xml looks fine.
The url  I use is http://localhost:88/Xml2Aag and the netwebpage procedure has also the name Xml2Aag, That is how I always test it. Never had this problem.
If I put the url in a browser "http://localhost:88/Xml2Aag" I get this message: 

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

But the webserver shows
GET /Xml2Aag HTTP/1.1
Host: localhost:88

When I do a post from soapui I get this in the webserver and the xml looks fine to me but never gets to the processed code :
POST /Xml2Aag HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
Content-Length: 6557
Host: localhost:88

But I will give it a try using the new way .. (new webservice)
Is it easy to create a new webservice  ? Do you have a webinar where I can watch this?

Regards Joep

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Joep,

A whole series of webinars really. Worth watching them all as that'll only take a couple hours and then you're off an running.
https://www.clarionlive.com/ww!300 is the first one.

Cheers
Bruce