Skip to main content

Metro & .Net with X509Token

1 reply [Last post]
911 Guest
Offline
Joined: 2011-01-03
Points: 0

Hi,

I'd like to implement a Java web service and a C# client. I set up
Username Authentication with Symmetric Keys and the problem starts
here. It works fine with the Java client. I use Metro 2.0.1 and I
generated the service WSDL with Netbeans but later I replaces some
namespaces.

The WSDL now starts like this:

<?xml version="1.0" encoding="UTF-8"?>

The binding policy is the following:

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
911 Guest
Offline
Joined: 2011-01-03
Points: 0

Hi,

I'd like to implement a Java web service and a C# client. I set up Username Authentication with Symmetric Keys and the problem starts here. It works fine with the Java client. I use Metro 2.0.1 and I generated the service WSDL with Netbeans but later I replaces some namespaces.

The WSDL now starts like this:

<?xml version="1.0" encoding="UTF-8"?>

The binding policy is the following:

com.sun.xml.wss.XWSSecurityException: Encryption Policy verification error: Looking for an Encryption Element in Security header, but found com.sun.xml.wss.impl.policy.mls.SignaturePolicy@913f000

I searched for this error message but I don't have a clue how can I solve it or go further with this problem. I just assume the problem is in com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier#processPrimaryPolicy method.

private void processPrimaryPolicy(WSSPolicy actualPol,
MessagePolicy inferredSecurityPolicy)
throws XWSSecurityException;

I assume some configuration in WSSPolicy actualPol or MessagePolicy inferredSecurityPolicy can solve the problem.

Does anyone have any idea how can I go further to find the problem?