Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: tcpRequest information  (Read 8854 times)
Paul M.
Posts: 16


« on: January 31, 2022, 06:37:07 pm »

What started as a nice "dip my toe into Web Services" has turned into Alice's rabbit hole.

I am trying to receive an XML document over http,
The document is formatted as:
<request>
 <pair/>
  ...
</request>
I tried SOAP, when I tried to catch it in a webOperation.createDOCStyle("procRequest","request",FormatIn,FormatOut),
receive:

WS-DEBUG (Receive)
C
WS-DEBUG END
WS-DEBUG (HTTP ERROR)
Class: HTTPServerConnection::extractMethod()
Msg: Not HTTP Procotol
Return -8 from com.WebServiceEngine.ProcessServices:x
WS-DEBUG END

So I believe this should be catching a tcp based request instead of an http formatted one.   Can someone point me in the right direction for documents/examples for catching tcprequests as opposed to httprequests.

Yes, I am in way over my head, but that is what makes I.T so fun.



Delane F.
Four Js
Posts: 3


« Reply #1 on: February 01, 2022, 07:18:16 pm »

Hi Paul,

I'm a little confused on your inquiry.  From the debug output we cannot tell what your client app is connected to and attempting to communicate with.  However, the error message indicates whatever that entity is, it doesn't recognize it as the HTTP/HTTPS protocol. 

That being said, there are no libraries to provide low level TCP interface provided by Genero.  Genero only provides web services over HTTP/HTTPS...this is pretty much the industry standard.  This is accomplished either through SOAP or RESTful interfaces that are layers on top of TCP/IP.  Genero provides a few demo applications you can find in $FGLDIR/demo/WebServices for your review.  In addition you can find the following documentation:

SOAP: https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_concepts_soap_apis.html
REST: https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_concepts_rest_apis.html

If you're in need of further assistance, please contact you local support center and we will be glad to assist you and answer your questions.

Regards,
Delane
Reuben B.
Four Js
Posts: 1116


« Reply #2 on: February 01, 2022, 10:41:27 pm »

Quote from: Delane
That being said, there are no libraries to provide low level TCP interface provided by Genero

well there is http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_COMLibrary_004.html to be on the client-side of TCP communication, and this example http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ClassChannel_tcp_sockets.html showing use of base.Channel to implement basic TCP client and server.

However both of the above are unlikely to be used in a web services scenario.

Quote from: Paul
Can someone point me in the right direction ...
With Web Services, you will either be a "server" that exposes a service, or a "client" that consumes a service.  You say "I am trying to receive an XML document over http" but you don't say if that is because you asked for it i.e you are a "client", or if you are sitting waiting for someone to send it in which case you are a "server".   http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_concepts_001.html 

Wether you are a "client" or a "server" is something that you'd need to establish at the beginning and will dictate the code path you take. 

The "server" typically sets the rules and will typically have some form of documentation detailing access to their service.  Your support contact should be able to interpret that document and point you in the right direction.

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Paul M.
Posts: 16


« Reply #3 on: February 03, 2022, 03:18:53 pm »

Just an update.  I used perl to create an IO:Socket to view the request, and It was in fact and HTTP POST.  Not sure why the program was bolting, but I used the code for the HTTPPart example and now have my XML document.  Thanks for your assistance.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines