- Dienstadresse – https://uslugaterytws1test. stat.gov.pl/terytws1.svc
- WSDL-Adresse -
https://uslugaterytws1test.stat.gov.pl/ ... ytws1.wsdl - Benutzer – TestPubliczny
Passwort – 1234abcd
Code: Select all
http://www.w3.org/2005/08/addressing/soap/fault
a:InvalidSecurity
An error occurred when verifying security for the message.
Code: Select all
try {
var proxy = new ChannelFactory("custom");
proxy.Credentials.UserName.UserName = login;
proxy.Credentials.UserName.Password = haslo;
var result = proxy.CreateChannel();
var test = result.CzyZalogowany(); // should return true if connected correctly
} catch (Exception ex) { }
Code: Select all
Code: Select all
public static void main(String[] args) {
try {
final String wsdlResourcePath = "wsdl/jaxb/teryt/terytws1.wsdl";
final String url = "https://uslugaterytws1test.stat.gov.pl/TerytWs1.svc";
ITerytWs1 teryt = createSoapEndpoint((wsdlLocation) -> new TerytWs1(wsdlLocation).getCustom(), wsdlResourcePath, url);
System.out.println(teryt.czyZalogowany());
} catch (Exception e) { }
}
private static SOAP createSoapEndpoint(SoapCreator soapCreator, String wsdlResourcePath, String url) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
URL wsdlLocation = cl.getResource(wsdlResourcePath);
SOAP soap = soapCreator.create(wsdlLocation);
BindingProvider provider = (BindingProvider) soap;
Map context = provider.getRequestContext();
context.put(BindingProvider.USERNAME_PROPERTY, "TestPubliczny");
context.put(BindingProvider.PASSWORD_PROPERTY, "1234abcd");
context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
return soap;
}
Mein Java-Code erzeugt folgende Warnmeldungen:
WARNUNG: WSP0075: Richtlinienzusicherung
„{http://schemas.xmlsoap.org/ws/2005/07/s ... tingTokens“
wurde als „UNBEKANNT“ bewertet. lip 27, 2017 11:58:35
[com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector]
selectAlternatives WARNUNG: WSP0075: Richtlinienzusicherung
"{http:// schemas.xmlsoap.org/ws/2005/07/securitypolicy}TransportBinding“
wurde ausgewertet als „UNBEKANNT“. lip 27, 2017 11:58:35
[com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector]
selectAlternatives WARNUNG: WSP0075: Richtlinienzusicherung
"{http:// schemas.xmlsoap.org/ws/2005/07/securitypolicy}Trust10“ war
als „UNBEKANNT“ bewertet. lip 27, 2017 11:58:35
[com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector]
selectAlternatives WARNUNG: WSP0075: Richtlinienzusicherung
"{http:// schemas.xmlsoap.org/ws/2005/07/securitypolicy}Wss11“ war
als „UNBEKANNT“ bewertet. lip 27, 2017 11:58:35
[com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector]
selectAlternatives WARNUNG: WSP0075: Richtlinienzusicherung
"{http:// www.w3.org/2006/05/addressing/wsdl}UsingAddressing“ war
als „UNBEKANNT“ bewertet. lip 27, 2017 11:58:35
[com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector]
selectAlternatives WARNUNG: WSP0019: Suboptimale Richtlinienalternative
auf der Clientseite ausgewählt mit Fitness „UNBEKANNT“.
Vielleicht weiß jemand mehr über ein solches Problem informieren oder sich mit seiner eigenen Konfiguration sofort mit diesem WS verbinden können - im Moment habe ich keine Ahnung, was das Problem sein könnte, und ich sehe darin eine "zeitverschwendende" Perspektive vor mir... also bitte helfen Sie.