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: fglwsdl client stub for policy  (Read 3360 times)
Jos? V.
Posts: 46


« on: January 29, 2020, 06:39:04 pm »

Hi everyone,
I'm currently using fglwsdl to generate the client stubs for a Soap WS that declares a security policy using wsp:Policy.

But the produced code makes no mention of globals that represent the possible headers so that I can fulfill my request.
The WSDL declares the following:
Quote
<wsp:Policy wsp:Description="GEOS Security"
             wsu:Id="geos_business_level_server_policy"
             xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
             xmlns="http://schemas.xmlsoap.org/ws/2004/09/policy"
             xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:pol="http://schemas.xmlsoap.org/ws/2004/09/policy">
  <wsp:ExactlyOne>
   <wsp:All/>
   <wsp:All>
    <sp:SupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
     <wsp:Policy>
      <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
       <wsp:Policy>
        <sp:WssUsernameToken10/>
       </wsp:Policy>
      </sp:UsernameToken>
     </wsp:Policy>
    </sp:SupportingTokens>
   </wsp:All>
   <wsp:All>
    <orasp:GEOSAnonymousAuthentication xmlns:orasp="http://schemas.oracle.com/ws/2006/01/securitypolicy"/>
   </wsp:All>
  </wsp:ExactlyOne>
 </wsp:Policy>

Since UsernameToken is requested, the soapheader for a request should send a wsse:Security inside.
But the client stub makes no mention of any way to do this other than editing the _g function and manually adding the apropriate xml.Serializer.VariableToStax calls.

It this the only way to go, or am I missing any fglwsdl parameter that allows me to leave the client stub alone?

Thank you!
Sisavanh S.
Four Js
Posts: 74


« Reply #1 on: January 30, 2020, 05:29:35 pm »

Hi,

May I let your review this page:
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_ssl_security_how_to_001.html

If you need more explanations, please see with your local support center.

Best regards,
Sisa.
Reuben B.
Four Js
Posts: 965


« Reply #2 on: January 30, 2020, 11:33:24 pm »

Read Sisa's link so that you get a good overall view. 

I think by tone of your question, the answer you were looking for is the -domHandler argument which generates a call to a callback function.  This function is the place where  you can alter the XML and not have to modify any generated code like you fear.  In case you don't find it from Sisa's link, see here   https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_gws_handlers_client_006.html

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Jos? V.
Posts: 46


« Reply #3 on: February 04, 2020, 06:19:06 pm »

This was exactly what I needed.
I went over my head as I read the manual the first time. Terribly sorry!
Thank you Reuben and Sisavanh!
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines