WebLogic 10.3에서 WS-Security 기능을 사용하여 JAX WS 웹 서비스를 개발하려고합니다. ant 태스크 WSDLC, JWSC 및 ClientGen을 사용하여이 웹 서비스의 스켈레톤/스텁을 생성했습니다.WebLogic 10.3에서 WS Security 웹 서비스 구현 중 오류가 발생했습니다.
키와 인증서가 포함 된 WSIdentity.jks와 WSTrust.jks라는 두 개의 키 저장소가 있습니다. WSIdentity.jks의 별명 중 하나는 "ws02p"입니다. 나는 다음과 같은 스택 내가 오류를 얻고있다 "잘못된 서명 정책을"이 테스트 클라이언트를 사용하여이 웹 servcie를 호출하려고 할 때
SecureSimpleService service = new SecureSimpleService();
SecureSimplePortType port = service.getSecureSimplePortType();
List credProviders = new ArrayList();
CredentialProvider cp = new ClientBSTCredentialProvider(
"E:\\workspace\\SecureServiceWL103\\keystores\\WSIdentity.jks",
"webservice", "ws01p","webservice");
credProviders.add(cp);
string endpointURL="http://localhost:7001/SecureSimpleService/SecureSimpleService";
BindingProvider bp = (BindingProvider)port;
Map<String, Object> requestContext = bp.getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
requestContext.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST,credProviders);
requestContext.put(WSSecurityContext.TRUST_MANAGER, new TrustManager() {
public boolean certificateCallback(X509Certificate[] chain,
int validateErr) {
// Put some custom validation code in here.
// Just return true for now
return true;
}
});
SignResponse resp1 = new SignResponse();
***resp1 = port.echoSignOnlyMessage("hello sign");***
System.out.println("Result: " + resp1.getMessage());
:
테스트 클라이언트는 웹 서비스를 호출 할 수있는 다음과 같은 코드가 있습니다 추적 :
*[java] weblogic.wsee.security.wss.policy.SecurityPolicyArchitectureException: Invalid signing policy
[java] at weblogic.wsee.security.wss.plan.SecurityPolicyBlueprintDesigner.verifyPolicy(SecurityPolicyBlueprintDesigner.java:786)
[java] at weblogic.wsee.security.wss.plan.SecurityPolicyBlueprintDesigner.designOutboundBlueprint(SecurityPolicyBlueprintDesigner.java:136)
WebLogic 관리 콘솔의 구성 설정이 누락되었거나 다른 이유가 있습니까?