Skip to main content

((com.sun.xml.ws.Closeable) port).close() fails with Reliable Messaging

6 replies [Last post]
kellerbb
Offline
Joined: 2008-09-07
Points: 0

Using Metro 2.0 Stable Release

Just by commenting out ((com.sun.xml.ws.Closeable) port).close() ; statement in client code works but no Last Message or Terminate Sequence message is generated.

Otherwise this error is generated:

Partial stack trace:

May 20, 2010 4:03:06 PM com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier processPrimaryPolicy
SEVERE: WSS0206: Security in the incoming message does not conform to the SecurityPolicy configured at the Recipient.
May 20, 2010 4:03:06 PM com.sun.xml.wss.jaxws.impl.SecurityClientTube processClientResponsePacket
SEVERE: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
com.sun.xml.wss.impl.PolicyViolationException: com.sun.xml.wss.XWSSecurityException: Signature Policy verification error: Looking for a Signature Element in Security header, but found com.sun.xml.wss.impl.policy.mls.EncryptionPolicy@11cc2a8.
at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:129)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.createMessage(SecurityRecipient.java:977)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecipient.java:230)
at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.verifyInboundMessage(SecurityTubeBase.java:462)
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientResponsePacket(SecurityClientTube.java:412)
at com.sun.xml.ws.security.secconv.WSSCPlugin.sendRequest(WSSCPlugin.java:401)
at com.sun.xml.ws.security.secconv.WSSCPlugin.processCancellation(WSSCPlugin.java:499)
at com.sun.xml.ws.security.secconv.impl.client.SCTokenProviderImpl.cancel(SCTokenProviderImpl.java:143)
at com.sun.xml.ws.api.security.trust.client.IssuedTokenManager.cancelIssuedToken(IssuedTokenManager.java:91)
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.cancelSecurityContextToken(SecurityClientTube.java:558)
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.preDestroy(SecurityClientTube.java:571)
at com.sun.xml.ws.rx.util.FiberExecutor.close(FiberExecutor.java:137)
at com.sun.xml.ws.rx.util.Communicator.close(Communicator.java:327)
at com.sun.xml.ws.rx.rm.runtime.RuntimeContext.close(RuntimeContext.java:138)
at com.sun.xml.ws.rx.rm.runtime.ClientTube.closeRmSession(ClientTube.java:306)
at com.sun.xml.ws.rx.rm.runtime.ClientTube.preDestroy(ClientTube.java:239)
at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
at com.sun.xml.ws.client.Stub.close(Stub.java:409)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
at $Proxy44.close(Unknown Source)
at mil.army.train.enterprise.client.CourseMasterClient.main(CourseMasterClient.java:125)
Caused by: com.sun.xml.wss.XWSSecurityException: Signature Policy verification error: Looking for a Signature Element in Security header, but found com.sun.xml.wss.impl.policy.mls.EncryptionPolicy@11cc2a8.
at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.processPrimaryPolicy(MessagePolicyVerifier.java:272)
at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:124)
... 28 more
May 20, 2010 4:03:06 PM [com.sun.xml.ws.rx.rm.runtime.ClientTube] preDestroy
WARNING: WSRM1103: Unable to terminate RM sequence normally due to an unexpected exception
javax.xml.ws.WebServiceException: WSSTUBE0025: Error in Verifying Security in the Inbound Message.

Using policy

Message was edited by: kellerbb

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
suresh

what version of metro you are using?
I remember some time back one user in the forum had posted the same
issue and i don't remember how it was solved that time
Can you use latest builds and check whether this problem still exists?
Thanks
Suresh
On Friday 21 May 2010 01:59 AM, metro@javadesktop.org wrote:
> Partial stack trace:
>
> May 20, 2010 4:03:06 PM com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier processPrimaryPolicy
> SEVERE: WSS0206: Security in the incoming message does not conform to the SecurityPolicy configured at the Recipient.
> May 20, 2010 4:03:06 PM com.sun.xml.wss.jaxws.impl.SecurityClientTube processClientResponsePacket
> SEVERE: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
> com.sun.xml.wss.impl.PolicyViolationException: com.sun.xml.wss.XWSSecurityException: Signature Policy verification error: Looking for a Signature Element in Security header, but found com.sun.xml.wss.impl.policy.mls.EncryptionPolicy@11cc2a8.
> at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:129)
> at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.createMessage(SecurityRecipient.java:977)
> at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecipient.java:230)
> at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.verifyInboundMessage(SecurityTubeBase.java:462)
> at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientResponsePacket(SecurityClientTube.java:412)
> at com.sun.xml.ws.security.secconv.WSSCPlugin.sendRequest(WSSCPlugin.java:401)
> at com.sun.xml.ws.security.secconv.WSSCPlugin.processCancellation(WSSCPlugin.java:499)
> at com.sun.xml.ws.security.secconv.impl.client.SCTokenProviderImpl.cancel(SCTokenProviderImpl.java:143)
> at com.sun.xml.ws.api.security.trust.client.IssuedTokenManager.cancelIssuedToken(IssuedTokenManager.java:91)
> at com.sun.xml.wss.jaxws.impl.SecurityClientTube.cancelSecurityContextToken(SecurityClientTube.java:558)
> at com.sun.xml.wss.jaxws.impl.SecurityClientTube.preDestroy(SecurityClientTube.java:571)
> at com.sun.xml.ws.rx.util.FiberExecutor.close(FiberExecutor.java:137)
> at com.sun.xml.ws.rx.util.Communicator.close(Communicator.java:327)
> at com.sun.xml.ws.rx.rm.runtime.RuntimeContext.close(RuntimeContext.java:138)
> at com.sun.xml.ws.rx.rm.runtime.ClientTube.closeRmSession(ClientTube.java:306)
> at com.sun.xml.ws.rx.rm.runtime.ClientTube.preDestroy(ClientTube.java:239)
> at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
> at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
> at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
> at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
> at com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl.preDestroy(AbstractFilterTubeImpl.java:93)
> at com.sun.xml.ws.client.Stub.close(Stub.java:409)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
> at $Proxy44.close(Unknown Source)
> at mil.army.train.enterprise.client.CourseMasterClient.main(CourseMasterClient.java:125)
> Caused by: com.sun.xml.wss.XWSSecurityException: Signature Policy verification error: Looking for a Signature Element in Security header, but found com.sun.xml.wss.impl.policy.mls.EncryptionPolicy@11cc2a8.
> at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.processPrimaryPolicy(MessagePolicyVerifier.java:272)
> at com.sun.xml.wss.impl.policy.verifier.MessagePolicyVerifier.verifyPolicy(MessagePolicyVerifier.java:124)
> ... 28 more
> May 20, 2010 4:03:06 PM [com.sun.xml.ws.rx.rm.runtime.ClientTube] preDestroy
> WARNING: WSRM1103: Unable to terminate RM sequence normally due to an unexpected exception
> javax.xml.ws.WebServiceException: WSSTUBE0025: Error in Verifying Security in the Inbound Message.
>
> Just by commenting out ((com.sun.xml.ws.Closeable) port).close() ; statement in client code works but no Last Message or Terminate Sequence message is generated.
>
> Using policy
>
>
>
>
>
>

>

>

> [Message sent by forum member 'kellerbb']
>
> http://forums.java.net/jive/thread.jspa?messageID=470780
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
> For additional commands, e-mail: users-help@metro.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

kellerbb
Offline
Joined: 2008-09-07
Points: 0

Thanks Suresh for your quick response.

I am using the Metro 2.0 stable release jarfiles dated 12/4/09.
I downloaded the only Metro 2.0 nigthly jarfiles are dated 12/08/09.

Both version error with the same exception on the client.

Let me correct myself regarding the terminate sequence message not logging. I originally received this error using the version 1.0 of the Reliable messaging policy assertions, it was when using these (which I now know) deprecated policies where the last message or terminate sequence did not log. The newer 1.1 policy as annotated in original post does log the terminate sequence message however still crashes on the client.

I am using secure conversation policy as well. If I comment out secure conversation policy the reliable message works as expected when closing the port on the client.

I tried to upload both the serve and the client log files as word docs however it would not upload because it would not except the content. I can email them.

The client is sending 2 Soapaction: "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/SCT/Cancel" messages after the terminate sequence message and the serve is responding twice.

I do notice in the request / response message flow between the client and server that when the server responds to the client request other than the actual operation call the response is trashed putting in bad characters which I cannot post online. I've tried submitting 3 times now so if you need to see the garbage let me know and I will email it to you.

suresh

Please use latest builds of 2.1 or 2.0.1 and let us know
i think we fixed this error in the latest versions of metro
thanks
suresh
On Saturday 22 May 2010 12:38 AM, metro@javadesktop.org wrote:
> Thanks Suresh for your quick response.
>
> I am using the Metro 2.0 stable release jarfiles dated 12/4/09.
> I downloaded the only Metro 2.0 nigthly jarfiles are dated 12/08/09.
>
> Both version error with the same exception on the client.
>
> Let me correct myself regarding the terminate sequence message not logging. I originally received this error using the version 1.0 of the Reliable messaging policy assertions, it was when using these (which I now know) deprecated policies where the last message or terminate sequence did not log. The newer 1.1 policy as annotated in original post does log the terminate sequence message however still crashes on the client.
>
> I am using secure conversation policy as well. If I comment out secure conversation policy the reliable message works as expected when closing the port on the client.
>
> I tried to upload both the serve and the client log files as word docs however it would not upload because it would not except the content. I can email them.
>
> The client is sending 2 Soapaction: "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/SCT/Cancel" messages after the terminate sequence message and the serve is responding twice.
>
> I do notice in the request / response message flow between the client and server that when the server responds to the client request other than the actual operation call the response is trashed putting in bad characters which I cannot post online. I've tried submitting 3 times now so if you need to see the garbage let me know and I will email it to you.
> [Message sent by forum member 'kellerbb']
>
> http://forums.java.net/jive/thread.jspa?messageID=470930
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
> For additional commands, e-mail: users-help@metro.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

kellerbb
Offline
Joined: 2008-09-07
Points: 0

Where can I find Metro 2.1 or 2.0.1 it is not in the nightlies?

Thankyou

suresh
kellerbb
Offline
Joined: 2008-09-07
Points: 0

Great Thank you!

I downloaed the Metro 2.1 (3) promotion build and we have SUCCESS!

Thank you again!

Barb