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
-
public class WSDefinitionLoader extends AbstractScomConnectionLoader
Special provider for getting WSDL file content by url and by concreteVersion
.
- Firstly client should check that
WSDefinitionLoader.Certificate
is 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.Certificate
and 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
- Firstly client should check that
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WSDefinitionLoader.Certificate
Special class contains structure of certificate for getting content of WSDL file.static class
WSDefinitionLoader.WSDefinitionContent
Class 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
Constructors Modifier Constructor Description protected
WSDefinitionLoader(String id, Version version, IProcessManager processManager, IResolvableRuntimeInstallationManager resolvableRuntimeInstallationManager)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate, String user, String password)
Tries to authentification for WSDLurl
bycertificate
,user
name andpassword
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.WSDefinitionLoader.WSDefinitionContent
getWSDefinitionContent(String url)
Gets WSDL file content and content of the external xsd files by urlWSDefinitionLoader.WSDefinitionContent
getWSDefinitionContent(String url, WSDefinitionLoader.Certificate certificate)
Gets WSDL file content and content of the external xsd files by urlWSDefinitionLoader.WSDefinitionContent
getWSDefinitionContent(String url, WSDefinitionLoader.Certificate certificate, String user, String password)
Gets WSDL file content and content of the external xsd files by urlboolean
needUpdateCertificate(String url)
Checks that WSDLurl
need for authentificationWSDefinitionLoader.Certificate
boolean
needUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate)
Checks that WSDLurl
need authentification-
Methods inherited from class com._1c.g5.v8.dt.natives.library.AbstractScomConnectionLoader
getLibraries, getMessageException, getProcessEnvironments, getRuntimeInstallation, getSystemLibraries
-
-
-
-
Constructor Detail
-
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 benull
version
- actualVersion
for getting images, can't benull
processManager
- actualIProcessManager
, can't benull
resolvableRuntimeInstallationManager
- actualIResolvableRuntimeInstallationManager
, can't benull
-
-
Method Detail
-
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 benull
certificate
- 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 benull
certificate
- actualWSDefinitionLoader.Certificate
. If Certificate not needed you should passnull
user
- name of the user for authentification, can benull
or empty string if user name not needed for authentificationpassword
- password for authentification, can benull
or 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 WSDLurl
bycertificate
,user
name andpassword
- Parameters:
url
- actual WSDL url, can't benull
certificate
- actualWSDefinitionLoader.Certificate
. If Certificate not needed you should passnull
password
- password for authentification, can benull
or empty string if password not needed for authentification- Returns:
true
if authentification pass correctly,false
otherwise- Throws:
WSDefinitionLoaderException
- if exception in native API is occurred
-
needUrlAuthentification
public boolean needUrlAuthentification(String url, WSDefinitionLoader.Certificate certificate) throws WSDefinitionLoaderException
Checks that WSDLurl
need authentification- Parameters:
url
- actual WSDL url, can't benull
certificate
- actualWSDefinitionLoader.Certificate
. If Certificate not needed you should passnull
- Returns:
true
if WSDLurl
need authentification,false
otherwise- Throws:
WSDefinitionLoaderException
- if exception in native API is occurred
-
needUpdateCertificate
public boolean needUpdateCertificate(String url) throws WSDefinitionLoaderException
Checks that WSDLurl
need for authentificationWSDefinitionLoader.Certificate
- Parameters:
url
- actual WSDL url, can't benull
- Returns:
true
if WSDLurl
need for authentificationWSDefinitionLoader.Certificate
,false
otherwise- 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.
-
-