[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? Sorry, and thanks all Claudio
5 Comments
Local Administrator
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]
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
$signatureproperties is available since version 9.6.04.
Author: diseli (daniel.iseli@uniface.com)
Local Administrator
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)
Local Administrator
Thanks Iain and Daniel, so:
This is the first thing I've done before importing my WSDL's. In fact my WS connection work.
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...).
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:
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)
Local Administrator
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.
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
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+;').
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)