Forum Discussion

luotope's avatar
luotope
New Contributor
16 years ago

Signature

Hi,

I am trying to sign the SOAP-body element with a cert found in p12 package. I tried to do according to instructions, but what I get is the example below. How it should look, is the example at the bottom. What do I do wrong? I have attached the project as well.
Thanks!
Pete

This is what I get...

 

     
       
            2009-10-07T19:20:33.158Z
            2009-10-07T19:21:33.158Z
       

     

 

 
     
       
            1
            2
            2009-10-07T19:20:33.158Z
            FI
            Petri
            3
       

        cid:1116558458032
     

 


Security element should look something like in this...





xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
1.0.xsd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-tokenprofile-
1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsssoap-
message-security-1.0#Base64Binary">MIIDF...(most Base64 removed for
clarity)...8Xx60=




Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>

Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>



Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">

xmlns:exc14n="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList=""/>



Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
4yzYxO6f0W9wu4YkQf4zayxTiLs=


PBVGxh7x2kzFYnkrL15zMqtLa5RHuqvRVEFcIbQzaivGnjJJTE3fOozbAb3st1ZHT
jwCykX/ZWP+NPNe9KvtaB959Jve3zUZbnrA1Deyg7GNAQQaDfbnGxW6uooyQOp+xwOsoIqDBVp83nigdKfsEhOKt6EWm
Mug+Ovw6V8Cxvk=



xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-
1.0.xsd" wsu:Id="str_Pqf55eQFnl5t1jOT">

ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-
1.0#X509v3"/>




2008-04-14T10:07:31Z
2008-04-14T10:08:31Z






2457785447
1234567
2008-04-14T13:07:26.371+00:00
FI
TestClient 1.00
BANKCODE

PD94b... (most
Base64 removed for clarity)...lc3Q+



2 Replies

  • jvz's avatar
    jvz
    Occasional Contributor
    hello Luotope,

    I'm not sure if this helps, but I see you selected the "Body" as part to sign.
    try adding the namespace there as well:
      http://schemas.xmlsoap.org/soap/envelope/

    It is my understanding that SOAPui requires the namespace definition to find the correct message part to sign/encrypt. In the bottom of your SOAPui display there is an grey bar which has some log information. If you check the "error log" screen you probably get some additional information what did go wrong when you try to apply the outgoing WSS.

    I'm not sure if you must select element/content in the pulldown.
  • luotope's avatar
    luotope
    New Contributor
    Hi jvz,

    Thanks for you reply. The advice of looking the "error log" was good. I didn't notice it before, but it clearly infroms what was wrong. The reason in this case was only a mistyped password for the certificate.

    In this case the code obviously starts to create the security element, but stops the creation when an error occurs. It will not show information in the SOAP, but then if you go and see the log, it informs that an error has happened. Maybe there could be some kind of indicator to point out that please look the error log.

    Thanks again for your help.