Package com._1c.g5.v8.dt.ws.common
Class WSDefinitionLoader
java.lang.Object
com._1c.g5.v8.dt.natives.library.AbstractScomConnectionLoader
com._1c.g5.v8.dt.ws.common.WSDefinitionLoader
Special provider for getting WSDL file content by url and by concrete
Version. - Firstly client should check that
WSDefinitionLoader.Certificateis needed for this url. See methodneedUpdateCertificate(String). If it is needed than tune it - Secondly client should check that authorization is needed for this url. See method
needUrlAuthentification(String, Certificate). If authorization is needed client should find correct user name and password. User name and password should be checked by methodcheckUrlAuthentification(String, Certificate, String, String) - Now client can get WSDL file content using information in previous stage. Client should call next methods for this
getWSDefinitionContent(String, Certificate)orgetWSDefinitionContent(String, Certificate, String, String). If there is noWSDefinitionLoader.Certificateand authorization client should call methodgetWSDefinitionContent(String) - At the end, client should call
dispose()for release special data for getting content of WSDL file by url
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSpecial class contains structure of certificate for getting content of WSDL file.static classClass contains full content of WSDefinition. -
Field Summary
Fields inherited from class com._1c.g5.v8.dt.natives.library.AbstractScomConnectionLoader
LD_LIBRARY_PATH, version -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWSDefinitionLoader(String id, Version version, IProcessManager processManager, IResolvableRuntimeInstallationManager resolvableRuntimeInstallationManager) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate, String user, String password) Tries to authentification for WSDLurlbycertificate,username andpasswordvoiddispose()Releases special data for getting content of WSDL file by url
You should call this method if you have no plans to soon get content of WSDL file or calling other methods from this class.Gets WSDL file content and content of the external xsd files by urlgetWSDefinitionContent(String url, WSDefinitionLoader.Certificate certificate) Gets WSDL file content and content of the external xsd files by urlgetWSDefinitionContent(String url, WSDefinitionLoader.Certificate certificate, String user, String password) Gets WSDL file content and content of the external xsd files by urlbooleanChecks that WSDLurlneed for authentificationWSDefinitionLoader.CertificatebooleanneedUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate) Checks that WSDLurlneed authentificationMethods inherited from class com._1c.g5.v8.dt.natives.library.AbstractScomConnectionLoader
getLibraries, getMessageException, getProcessEnvironments, getRuntimeInstallation, getSystemLibraries
-
Constructor Details
-
WSDefinitionLoader
protected WSDefinitionLoader(String id, Version version, IProcessManager processManager, IResolvableRuntimeInstallationManager resolvableRuntimeInstallationManager) Constructor- Parameters:
id- unique id for creating infrastructure for getting WSDL file content, can't benullversion- actualVersionfor getting images, can't benullprocessManager- actualIProcessManager, can't benullresolvableRuntimeInstallationManager- actualIResolvableRuntimeInstallationManager, can't benull
-
-
Method Details
-
getWSDefinitionContent
public WSDefinitionLoader.WSDefinitionContent getWSDefinitionContent(String url) throws WSDefinitionLoaderException Gets WSDL file content and content of the external xsd files by url- Parameters:
url- actual WSDL url, can't benull- Returns:
- WSDL file content and content of the external xsd files, never
null - Throws:
WSDefinitionLoaderException- if exception in native API is occurred
-
getWSDefinitionContent
public WSDefinitionLoader.WSDefinitionContent getWSDefinitionContent(String url, WSDefinitionLoader.Certificate certificate) throws WSDefinitionLoaderException Gets WSDL file content and content of the external xsd files by url- Parameters:
url- actual WSDL url, can't benullcertificate- actualWSDefinitionLoader.Certificate. If Certificate not needed you should passnull- Returns:
- WSDL file content and content of the external xsd files, never
null - Throws:
WSDefinitionLoaderException- if exception in native API is occurred
-
getWSDefinitionContent
public WSDefinitionLoader.WSDefinitionContent getWSDefinitionContent(String url, WSDefinitionLoader.Certificate certificate, String user, String password) throws WSDefinitionLoaderException Gets WSDL file content and content of the external xsd files by url- Parameters:
url- actual WSDL url, can't benullcertificate- actualWSDefinitionLoader.Certificate. If Certificate not needed you should passnulluser- name of the user for authentification, can benullor empty string if user name not needed for authentificationpassword- password for authentification, can benullor empty string if password not needed for authentification- Returns:
- WSDL file content and content of the external xsd files, never
null - Throws:
WSDefinitionLoaderException- if exception in native API is occurred
-
checkUrlAuthentification
public boolean checkUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate, String user, String password) throws WSDefinitionLoaderException Tries to authentification for WSDLurlbycertificate,username andpassword- Parameters:
url- actual WSDL url, can't benullcertificate- actualWSDefinitionLoader.Certificate. If Certificate not needed you should passnullpassword- password for authentification, can benullor empty string if password not needed for authentification- Returns:
trueif authentification pass correctly,falseotherwise- Throws:
WSDefinitionLoaderException- if exception in native API is occurred
-
needUrlAuthentification
public boolean needUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate) throws WSDefinitionLoaderException Checks that WSDLurlneed authentification- Parameters:
url- actual WSDL url, can't benullcertificate- actualWSDefinitionLoader.Certificate. If Certificate not needed you should passnull- Returns:
trueif WSDLurlneed authentification,falseotherwise- Throws:
WSDefinitionLoaderException- if exception in native API is occurred
-
needUpdateCertificate
Checks that WSDLurlneed for authentificationWSDefinitionLoader.Certificate- Parameters:
url- actual WSDL url, can't benull- Returns:
trueif WSDLurlneed for authentificationWSDefinitionLoader.Certificate,falseotherwise- Throws:
WSDefinitionLoaderException- if exception in native API is occurred
-
dispose
public void dispose()Releases special data for getting content of WSDL file by url
You should call this method if you have no plans to soon get content of WSDL file or calling other methods from this class. Attention! Client shouldn't call it after each call of methods from this class.
-