[SOLVED] WS call-out: change IP address

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, I have successfully imported the WSDL definition, and now I have my signature. My signature have a direct reference to the file and it's path: - I still need WDSL file? - Or it's integrated with signature (or in others places)? Now I want to parametrize the IP address of the my WS: - Modify the WDSL file, is the only way? - It's not possible to programmatically modify the address in the SOAP signature properties? Probably I missed a few chapters of the help?Confused Sorry, and thanks all Claudio

5 Comments

  1. You can alter both the WSDL address and the endpoint address for the signature at runtim using the asn settings. See the SOAP Connector help and the wsdl and svc switches.  Example (from the help) [DRIVER_SETTINGS]

    SOP U2.0
    USYS$SOP_PARAMS = proxy=www-proxy:1080 puser=user1 ppass=password1 scheme=B wsdl=D:\u9\uniface\wsdl\soapdlw.wsdl
    
    Also $signatureproperties. 
    
    These are relatively new to Uniface 9 (9.6+?). 

    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  2. Iain Sharp said Also $signatureproperties. These are relatively new to Uniface 9 (9.6+?).

     $signatureproperties is available since version 9.6.04.


    Author: diseli (daniel.iseli@uniface.com)
  3. Claudio said My signature have a direct reference to the file and it's path: - I still need WDSL file? - Or it's integrated with signature (or in others places)?

    Yes, you still need the WSDL file. By default Uniface will look for the WSDL as specified in the generated signature (that was created when importing the WSDL). In case at runtime the WSDL is located somewhere else then you can specify it (as described by Iain) in USYS$SOP_PARAMS. But this setting will be used by all SOAP signatures. You can also specify the WSDL location in [SERVICES_EXEC] for a specific SOAP signature; e.g. [SERVICES_EXEC] WEBSVC1 = $SOP:WEBSVC1 wsdl=c:\wsdl\web_svc1.wsdl Or you could dynamically set the WSDL location in code: $signatureproperties("WEBSVC1", "wsdl") = "wsdl=c:\wsdl\web_svc1.wsdl" Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. Thanks Iain and Daniel, so: 

    Iain Sharp said [DRIVER_SETTINGS]
    SOP U2.0

    This is the first thing I've done before importing my WSDL's. In fact my WS connection work. 

    Iain Sharp said [DRIVER_SETTINGS]
    USYS$SOP_PARAMS = proxy=www-proxy:1080 puser=user1 ppass=password1 scheme=B wsdl=D:\u9\uniface\wsdl\soapdlw.wsdl
    
      

    I'm forced to do this? I must specify one path per file, or one path for all WSDL? I have 8 WSDLand I want leave my Uniface configuration opened for others WS in the future (maybe for alternatives...).

    diseli said  Yes, you still need the WSDL file. By default Uniface will look for the WSDL as specified in the generated signature (that was created when importing the WSDL). In case at runtime the WSDL is located somewhere else then you can specify it (as described by Iain) in USYS$SOP_PARAMS. But this setting will be used by all SOAP signatures. You can also specify the WSDL location in [SERVICES_EXEC] for a specific SOAP signature; e.g. [SERVICES_EXEC] WEBSVC1 = $SOP:WEBSVC1 wsdl=c:\wsdl\web_svc1.wsdl Or you could dynamically set the WSDL location in code: $signatureproperties("WEBSVC1", "wsdl") = "wsdl=c:\wsdl\web_svc1.wsdl"

    So, it's not possible to define a unique repository for all WSDL? Like: "Hey Uniface, just look in .\WSDL\*.xml" Can I override server address and WSDL path, if these parameters are not specified in [SERVICES_EXEC]? This is an extract from my first WSDL file:

    <wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.zzzzz.it/zzzzz" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.zzzzz.it/zzzzz" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> ... ... ...

    Tried and tried, but I can not change the address of the server... Thanks for your patience Kind Regards Claudio -- EDIT -- It work, misconfiguration of WS server. Thanks again


    Author: Claudio (claudio.palladini@cortislentini.it)
  5. Claudio said
    Iain Sharp said [DRIVER_SETTINGS]
    USYS$SOP_PARAMS = proxy=www-proxy:1080 puser=user1 ppass=password1 scheme=B wsdl=D:\u9\uniface\wsdl\soapdlw.wsdl
     
    I'm forced to do this? I must specify one path per file, or one path for all WSDL? I have 8 WSDL and I want leave my Uniface configuration opened for others WS in the future (maybe for alternatives...).

    No, this is just on of the available possibilities. The WSDL specified with USYS$SOP_PARAMS is a global setting that will be used by all SOAP signatures. In case you have 8 different WSDLs then you should not specify the WSDL option here.

    Claudio said
    diseli said Yes, you still need the WSDL file. By default Uniface will look for the WSDL as specified in the generated signature (that was created when importing the WSDL). In case at runtime the WSDL is located somewhere else then you can specify it (as described by Iain) in USYS$SOP_PARAMS. But this setting will be used by all SOAP signatures. You can also specify the WSDL location in [SERVICES_EXEC] for a specific SOAP signature; e.g. [SERVICES_EXEC] WEBSVC1 = $SOP:WEBSVC1 wsdl=c:\wsdl\web_svc1.wsdl Or you could dynamically set the WSDL location in code: $signatureproperties("WEBSVC1", "wsdl") = "wsdl=c:\wsdl\web_svc1.wsdl"
    So, it's not possible to define a unique repository for all WSDL? Like: "Hey Uniface, just look in .\WSDL\*.xml"

    File redirection (in the ASN file) does (unfortunately) not work for WSDLs. If no absolute path is specified during the import (e.g. C:\WSDL\web_svc1.wsdl) then a relative path is using the working directory of the application/IDF as root. E.g. working dir is C:\workdir and when the WSDL web_svc1.wsdl is imported like this:

    /sti /mwr=ws web_svc1.wsdl Then Uniface will try to load it from here: C:\workdir\web_svc1.wsdl. And here's how to specify a WSDL that is located in the sub-dir WSDL in the working dir:

    /sti /mwr=.\wsdl\ws web_svc1.wsdl > C:\workdir\WSDL\web_svc1.wsdl

    Claudio said Can I override server address and WSDL path, if these parameters are not specified in [SERVICES_EXEC]?

     Yes, you would use $signatureproperties for this. E.g. $signatureproperties("WEBSVC1", "wsdl;svc") = "wsdl=c:\wsdl\web_svc1.wsdl;svc=http://www.myserver.com/webservice" * Note: $signatureproperties is using Uniface lists and the underlined semicolons should be list separator ('GOLD+;').

    Claudio said This is an extract from my first WSDL file:

    <wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.zzzzz.it/zzzzz" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.zzzzz.it/zzzzz" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> ... ... ...

    Tried and tried, but I can not change the address of the server... Thanks for your patience Kind Regards Claudio -- EDIT -- It work, misconfiguration of WS server. Thanks again

    I just saw now, that you've already resolved your problem. :-) That's good to know. And you are welcome. Daniel


    Author: diseli (daniel.iseli@uniface.com)