ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Williamson" ...@octavo2.demon.co.uk>
Subject RE: Trouble building wss4J (Running org.apache.wss4j.dom.message.ModifiedRequestTest)
Date Tue, 08 Jul 2014 18:04:58 GMT
Hi,

 

I just got the 2.0.1 ZIP from Github and tried a mvn –e package and got:

.

.

.

Running org.apache.wss4j.dom.message.ModifiedRequestTest

[Fatal Error] :1:246: An invalid XML character (Unicode: 0x1) was found in the value of attribute
"xmlns" and element is "add".

Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2 sec <<< FAILURE!
- in org.apache.wss4j.dom.message.ModifiedRequestTest

testModifiedSignatureReference(org.apache.wss4j.dom.message.ModifiedRequestTest)  Time elapsed:
0.016 sec  <<< FAILURE!

java.lang.AssertionError: Failure expected on a modified Signature Reference

        at org.junit.Assert.fail(Assert.java:88)

        at org.apache.wss4j.dom.message.ModifiedRequestTest.testModifiedSignatureReference(ModifiedRequestTest.java:500)

 

Running org.apache.wss4j.dom.message.NoSoapPrefixSignatureTest

.

.

.

I’ve had a look at the test and drilled down until I get to the definition of the SOAP test
message:

 

    private static final String SOAPMSG = 

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

        + "<SOAP-ENV:Envelope "

        +   "xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" "

        +   "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "

        +   "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" 

        +   "<SOAP-ENV:Body>" 

        +       "<add xmlns=\"http://ws.apache.org/counter/counter_port_type\">" 

        +           "<value xmlns=\"http://blah.com\">15</value>" 

        +       "</add>" 

        +   "</SOAP-ENV:Body>" 

        + "</SOAP-ENV:Envelope>";

 

Is something in the tests sticking a control character in somewhere hence “[Fatal Error]
:1:246: An invalid XML character (Unicode: 0x1)”

 

How do I interpret what the “[Fatal Error] :1:246:” refers to?

 

I ran it again with “mvn –e –X package” hoping to get some more info and got this
result:

 

Running org.apache.wss4j.dom.message.ModifiedRequestTest

[Fatal Error] :1:246: Invalid byte 1 of 1-byte UTF-8 sequence.

Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.64 sec <<< FAILURE!
- in org.apache.wss4j.dom.message.ModifiedRequestTest

testModifiedSignatureReference(org.apache.wss4j.dom.message.ModifiedRequestTest)  Time elapsed:
0.023 sec  <<< FAILURE!

java.lang.AssertionError: Failure expected on a modified Signature Reference

        at org.junit.Assert.fail(Assert.java:88)

        at org.apache.wss4j.dom.message.ModifiedRequestTest.testModifiedSignatureReference(ModifiedRequestTest.java:500)

 

Running org.apache.wss4j.dom.message.NoSoapPrefixSignatureTest

 

Which is a different error but looks the same to me.

 

I’m trying to help out by digging a bit deeper feel free to nudge me in the right direction.

 

Thanks

 

Adrian

 

 

From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: 07 July 2014 12:18
To: Adrian Williamson
Cc: users@ws.apache.org
Subject: Re: Trouble building wss4J

 

Hi,

I've fixed the ModifiedRequestTest (it was failing if the request was modified in the same
millisecond as the Timestamp was created). Could you try again + let me know if you are seeing
test failures?

Colm.

 

On Tue, Jun 24, 2014 at 11:37 AM, Adrian Williamson <aw@octavo2.demon.co.uk> wrote:

Hi  Colm,

 

mvn –version:

 

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T17:37:52+00:00)

Maven home: C:\Program Files\Java\apache-maven-3.2.1\bin\..

Java version: 1.7.0_55, vendor: Oracle Corporation

Java home: C:\Program Files\Java\jdk1.7.0_55\jre

Default locale: en_IE, platform encoding: Cp1252

OS name: "windows server 2008 r2", version: "6.1", arch: "amd64", family: "windows"

 

It has been failing in different modules – but I was using the netbeans IDE when that happened.

 

This morning I did this:

 

svn checkout http://svn.apache.org/repos/asf/webservices/wss4j/trunk/ wss4j

 

And ran without tests OK – if I run right now with tests using ‘mvn package’ I get the
error below (which I recall from yesterday too)

 

Is that the covert goal to use for Maven?

 

I just want to be able to run up the tests for SOAP body encryption as found here:

 

http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionTest.java?view=markup

 

Thanks

 

Adrian

 

------------------------------------------------------------------

 

Running org.apache.wss4j.dom.validate.ValidatorTest

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 sec - in org.apache.wss4j.dom.validate.ValidatorTest

 

Results :

 

Failed tests:

  ModifiedRequestTest.testModifiedSignatureReference:500->Assert.fail:88 Failure expected
on a modified Signature Reference

 

Tests run: 434, Failures: 1, Errors: 0, Skipped: 1

 

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] Apache WSS4J ...................................... SUCCESS [  5.953 s]

[INFO] Apache WSS4J parent ............................... SUCCESS [  0.562 s]

[INFO] Apache WSS4J WS-Security Bindings ................. SUCCESS [  7.000 s]

[INFO] Apache WSS4J WS-SecurityPolicy model .............. SUCCESS [ 10.422 s]

[INFO] Apache WSS4J WS-Security Common ................... SUCCESS [ 12.516 s]

[INFO] Apache WSS4J DOM WS-Security ...................... FAILURE [ 37.031 s]

[INFO] Apache WSS4J Streaming WS-Security ................ SKIPPED

[INFO] Apache WSS4J WS-Security Integration .............. SKIPPED

[INFO] Apache WSS4J Streaming WS-SecurityPolicy .......... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 01:14 min

[INFO] Finished at: 2014-06-24T11:33:57+00:00

[INFO] Final Memory: 21M/75M

[INFO] ------------------------------------------------------------------------

 

 

 

 

From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: 24 June 2014 10:44
To: users@ws.apache.org
Subject: Re: Trouble building wss4J

 

 

What version of Maven are you using? Is it only the TimestampTest that fails?

Colm.

 

On Mon, Jun 23, 2014 at 7:55 PM, Adrian Williamson <aw@octavo2.demon.co.uk> wrote:

java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Windows Server 2008

Hi,

I need to explain that I am new to SOA security and that my Java and Maven
skills require significant development.

I can't get the wss4j 2.0.0 packages to cleanly/consistently build  - i.e.
pass their tests.

I get a number of different failures which I cannot pin down, so I think I
must be doing something wrong in the initial setup.

I have downloaded the complete package as a zip from Github, then issue the
command "mvn package".

There are two examples of error below, this was a back to back run - 5
failures first 3 the second time.

Is there some aspect of the installation that I have missed?

Thanks

Adrian




Tests run: 15, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 4.453 sec
<<< FAILURE! - in org.apache.wss4j.stax.test.TimestampTest
testTimestampExpiredEncryptedInbound(org.apache.wss4j.stax.test.TimestampTes
t)  Time elapsed: 1.109 sec  <<< FAILURE!
java.lang.AssertionError: Expected XMLStreamException
        at org.junit.Assert.fail(Assert.java:88)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredEncryptedInboun
d(TimestampTest.java:244)

testTimestampPropertiesOutbound(org.apache.wss4j.stax.test.TimestampTest)
Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: null
        at org.junit.Assert.fail(Assert.java:86)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertTrue(Assert.java:52)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampPropertiesOutbound(Tim
estampTest.java:630)

testTimestampExpiredInbound(org.apache.wss4j.stax.test.TimestampTest)  Time
elapsed: 1.015 sec  <<< FAILURE!
java.lang.AssertionError: Expected XMLStreamException
        at org.junit.Assert.fail(Assert.java:88)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredInbound(Timesta
mpTest.java:203)

testTimestampTTLInbound(org.apache.wss4j.stax.test.TimestampTest)  Time
elapsed: 1.016 sec  <<< FAILURE!
java.lang.AssertionError: Expected XMLStreamException
        at org.junit.Assert.fail(Assert.java:88)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampTTLInbound(TimestampTe
st.java:422)

testTimestampDefaultConfigurationOutbound(org.apache.wss4j.stax.test.Timesta
mpTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: null
        at org.junit.Assert.fail(Assert.java:86)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertTrue(Assert.java:52)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampDefaultConfigurationOu
tbound(TimestampTest.java:83)

Running org.apache.wss4j.stax.test.UsernameTokenTest
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.687 sec -
in org.apache.wss4j.stax.test.UsernameTokenTest
Running org.apache.wss4j.stax.test.VulnerabliltyVectorsTest
testAllowMD5Algorithm skipped
testAllowMD5Algorithm skipped
testAllowMD5Algorithm skipped
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.735 sec -
in org.apache.wss4j.stax.test.VulnerabliltyVectorsTest

Results :

Failed tests:
  TimestampTest.testTimestampExpiredEncryptedInbound:244->Assert.fail:88
Expected XMLStreamException

TimestampTest.testTimestampPropertiesOutbound:630->Assert.assertTrue:52->Ass
ert.assertTrue:41->Assert.fail:86 null
  TimestampTest.testTimestampExpiredInbound:203->Assert.fail:88 Expected
XMLStreamException
  TimestampTest.testTimestampTTLInbound:422->Assert.fail:88 Expected
XMLStreamException

TimestampTest.testTimestampDefaultConfigurationOutbound:83->Assert.assertTru
e:52->Assert.assertTrue:41->Assert.fail:86 null

Tests run: 353, Failures: 5, Errors: 0, Skipped: 3

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache WSS4J ...................................... SUCCESS [  5.860
s]
[INFO] Apache WSS4J parent ............................... SUCCESS [  0.578
s]
[INFO] Apache WSS4J WS-Security Bindings ................. SUCCESS [  6.578
s]
[INFO] Apache WSS4J WS-SecurityPolicy model .............. SUCCESS [ 10.564
s]
[INFO] Apache WSS4J WS-Security Common ................... SUCCESS [ 10.813
s]
[INFO] Apache WSS4J DOM WS-Security ...................... SUCCESS [ 38.185
s]
[INFO] Apache WSS4J Streaming WS-Security ................ FAILURE [01:27
min]
[INFO] Apache WSS4J WS-Security Integration .............. SKIPPED
[INFO] Apache WSS4J Streaming WS-SecurityPolicy .......... SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 02:40 min
[INFO] Finished at: 2014-06-23T19:23:52+00:00
[INFO] Final Memory: 24M/75M
[INFO]
------------------------------------------------------------------------

------------Example 2--------------------

Running org.apache.wss4j.stax.test.TimestampTest
Tests run: 15, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 4.422 sec
<<< FAILURE! - in org.apache.wss4j.stax.test.TimestampTest
testTimestampExpiredEncryptedInbound(org.apache.wss4j.stax.test.TimestampTes
t)  Time elapsed: 1.031 sec  <<< FAILURE!
java.lang.AssertionError: Expected XMLStreamException
        at org.junit.Assert.fail(Assert.java:88)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredEncryptedInboun
d(TimestampTest.java:244)

testTimestampExpiredInbound(org.apache.wss4j.stax.test.TimestampTest)  Time
elapsed: 1.016 sec  <<< FAILURE!
java.lang.AssertionError: Expected XMLStreamException
        at org.junit.Assert.fail(Assert.java:88)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredInbound(Timesta
mpTest.java:203)

testTimestampTTLInbound(org.apache.wss4j.stax.test.TimestampTest)  Time
elapsed: 1.015 sec  <<< FAILURE!
java.lang.AssertionError: Expected XMLStreamException
        at org.junit.Assert.fail(Assert.java:88)
        at
org.apache.wss4j.stax.test.TimestampTest.testTimestampTTLInbound(TimestampTe
st.java:422)

Running org.apache.wss4j.stax.test.UsernameTokenTest
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.578 sec -
in org.apache.wss4j.stax.test.UsernameTokenTest
Running org.apache.wss4j.stax.test.VulnerabliltyVectorsTest
testAllowMD5Algorithm skipped
testAllowMD5Algorithm skipped
testAllowMD5Algorithm skipped
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.906 sec -
in org.apache.wss4j.stax.test.VulnerabliltyVectorsTest

Results :

Failed tests:
  TimestampTest.testTimestampExpiredEncryptedInbound:244->Assert.fail:88
Expected XMLStreamException
  TimestampTest.testTimestampExpiredInbound:203->Assert.fail:88 Expected
XMLStreamException
  TimestampTest.testTimestampTTLInbound:422->Assert.fail:88 Expected
XMLStreamException

Tests run: 353, Failures: 3, Errors: 0, Skipped: 3

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache WSS4J ...................................... SUCCESS [  5.844
s]
[INFO] Apache WSS4J parent ............................... SUCCESS [  0.531
s]
[INFO] Apache WSS4J WS-Security Bindings ................. SUCCESS [  6.781
s]
[INFO] Apache WSS4J WS-SecurityPolicy model .............. SUCCESS [ 10.500
s]
[INFO] Apache WSS4J WS-Security Common ................... SUCCESS [ 11.766
s]
[INFO] Apache WSS4J DOM WS-Security ...................... SUCCESS [ 37.656
s]
[INFO] Apache WSS4J Streaming WS-Security ................ FAILURE [01:19
min]
[INFO] Apache WSS4J WS-Security Integration .............. SKIPPED
[INFO] Apache WSS4J Streaming WS-SecurityPolicy .......... SKIPPED
[INFO]
------------------------------------------------------------------------

 



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com




-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com


Mime
View raw message