Back to Four Js Website
Four Js Customer Forum
Subscribe for automatic updates:
RSS
Sign in for full access
|
Help
Four Js Development Tools Forum
>
Discussions by product
>
GWS
>
Adding to the header for WSDL generated code
Most recent posts
Pages: [
1
]
« previous
next »
Reply
|
Print
Author
Topic: Adding to the header for WSDL generated code (Read 810 times)
Joel S.
Posts: 4
Adding to the header for WSDL generated code
«
on:
March 18, 2025, 03:29:02 am »
I'm using code generated from a WSDL file.
This particular partner wants a <SECURITY> tag in the header and below that tag, it wants a username tag and a password tag.
Is there some trick to getting these into the header?
There's a call that uses <call variable>.Binding.Request.Headers "
CALL WSHelper.WSHelper_SetRequestHeaders(RealTimeTransactionHTTPReq, iedi_Core_CoreSoapPortEndpoint.Binding.Request.Headers)
This Headers record is a dynamic array of Name and Value pairs. I've tried adding my username with the value being username and same for password, but the server says I didn't supply a username. I'm guessing that's because probably didn't know to put it under the <security> tag, it's being created under the <header> tag.
I've tried making one name/value pair called security with the value being <username>myusername</username><password>mypassword</password> thinking it will create:
<security><username>myusername</username><password>mypassword</password></security> But it's still not working. FGLWSDEBUG=3 isn't even showing me the header it's sending so I don't even know what that did. Maybe it turned the < and > in my value into < and > and they don't look like XML tags so the host isn't seeing them.
Anybody got any ideas. Or do I have to hack the WSDL generated code? Which I'd prefer not to do because it means every time I might regenerate the code for a new version or because the WSDL changes, I have to go in and re-add my "fix". Which if this is the only way to get it done, so be it.
Or, I go the route of creating the XML from scratch, headers and all as I want them to look and just connecting and sending it. I can probably still use the variables fglWSDL generates. Maybe even the serialization of these variables.
Anybody have any experience with this sort of thing and how to do what I'm trying to do?
Reuben B.
Posts: 1132
Re: Adding to the header for WSDL generated code
«
Reply #1 on:
March 19, 2025, 01:02:43 am »
With fglwsdl have you looked at -domHandler and callback functions
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_handlers_client_006.html
These callback functions allow you to modify/interrogate request/response
Reuben
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
https://4js.com/ask-reuben
Contributor to
https://github.com/FourjsGenero
Pages: [
1
]
Reply
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> Ask Reuben
=> WWDC21
-----------------------------
Discussions by product
-----------------------------
=> Products announcements
=> Genero BDL
=> GWS
=> GAS and GBC
=> GDC
=> Genero Mobile for Android or iOS
=> Genero Studio
=> Reporting tools (GRW, GRE)
-----------------------------
Jobs
-----------------------------
=> Jobs
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Loading...