Results 1 to 4 of 4
  1. #1
    ruchir123 is offline Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    0

    Default wsse:InvalidSecurity Error

    Hello,

    I have a SOAP requests to transmitt a on the fly parsed XML file to UTL_HTTP to connect to a SSL connection. Oracle Wallet is installed and connectivity is working as expected. However, in the SOAP response I am getting
    Security Data : No WS-Security Header I am not sure what I am missing? How can I resolve this error? Thanks, R

    Below is the SOAP response that shows this error.

    Java Code:
    <?xml version="1.0" encoding="utf-8" ?> 
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    - <soap:Header>
    - <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    - <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-17449452">
      <wsu:Created>2010-11-20T05:03:40.568Z</wsu:Created> 
      </wsu:Timestamp>
      </wsse:Security>
      </soap:Header>
    - <soap:Body>
    - <soap:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:c="urn:schemas-asource-com:transaction-data-1.0">
      <faultcode>wsse:InvalidSecurity</faultcode> 
      <faultstring>Security Data : No WS-Security Header</faultstring> 
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>

    Below is my compete code that generated above response.


    Java Code:
    BEGIN
             soap_request :=
                   '<?xml version="1.0" encoding="utf-8"?>
                       <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="urn:schemas-asource-com:transaction-data-1.31">
    <SOAP-ENV:Header xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-
    secext-1.0.xsd">
    <wsse:Security SOAP-ENV:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>NPCOMMERCE_DEV</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
    token-profile-1.0#PasswordText">Il/vJa0jat7929f8xxklPjYZIMy5eBCqBMILeGaC+E/1NfIWv+I2KfgghlhkSOaN6rme70OQHEo3e4LJMlWvfC7UfYaN9bqyQwYACmrDFpoiQYCOS+XLnRshhLHMio5VY4+P3C/25tCEH4lBAMRjP1LmjIvZI/h4YJ/65x8OQrqO7tdggZ/KAgvOiNc1GSU+NhkgzLl4EKoEwgt4ZoL4T/U18ha/4jYp+CCGWGRI5o3quZ7vQ5AcSjd7gskyVa98LtR9ho31urJDBgAKasMWmiJBgI5L5cudGyGEscyKjlVjj4/cL/bm0IQfiUEAxGM/UuaMi9kj+Hhgn/rnHw5Cug==</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </SOAP-ENV:Header>'
                || '<SOAP-ENV:Body>'
                || '<ns1:requestMessage>'
                || '<ns1:merchantID>'
                || 'ACOMM_DEV'
                || '</ns1:merchantID>'
                || '<ns1:merchantReferenceCode>'
                || lv_sequence
                || '</ns1:merchantReferenceCode>'
                || '<ns1:billTo>'
                || '<ns1:firstName>'
                || p_cc_holder_name_first
                || '</ns1:firstName>'
                || '<ns1:lastName>'
                || p_cc_holder_name_last
                || '</ns1:lastName>'
                || '<ns1:street1>'
                || 'XXX Charleston Road'
                || '</ns1:street1>'
                || '<ns1:city>'
                || 'Mountain View'
                || '</ns1:city>'
                || '<ns1:state>'
                || 'CA'
                || '</ns1:state>'
                || '<ns1:postalCode>'
                || '94043'
                || '</ns1:postalCode>'
                || '<ns1:country>'
                || 'US'
                || '</ns1:country>'
                || '<ns1:email>'
                || 'null@asource.com'
                || '</ns1:email>'
                || '</ns1:billTo>'
                || '<ns1:item id="0">'
                || '<ns1:unitPrice>'
                || 12.34
                || '</ns1:unitPrice>'
                || '<ns1:quantity>'
                || 2
                || '</ns1:quantity>'
                || '</ns1:item>'
                || '<ns1:purchaseTotals>'
                || '<ns1:currency>'
                || 'USD'
                || '</ns1:currency>'
                || '</ns1:purchaseTotals>'
                || '<ns1:card>'
                || '<ns1:accountNumber>'
                || 111111111111111
                || '</ns1:accountNumber>'
                || '<ns1:expirationMonth>'
                || 12
                || '</ns1:expirationMonth>'
                || '<ns1:expirationYear>'
                || 2020
                || '</ns1:expirationYear>'
                || '</ns1:card>'
                || '<ns1:ccAuthService run="true"/>'
                || '</ns1:requestMessage>'
                || '</SOAP-ENV:Body>'
                || '</SOAP-ENV:Envelope>';
          EXCEPTION
             WHEN OTHERS
             THEN
                errx := SQLERRM;
                raise_application_error (-20003, errx);
          END;
     
          BEGIN
             UTL_HTTP.set_wallet
                                ('file:/p01/oracle/prj1db/9.2.0/appsutil/wallet',
                                 'p4ssword'
                                );
          EXCEPTION
             WHEN OTHERS
             THEN
                errx := SQLERRM;
                raise_application_error (-20004, errx);
          END;
     
          BEGIN
             http_req :=
                UTL_HTTP.begin_request ('https://rvcotest.ss.com/commerce/999/tProcessor',
                                        'POST',
                                        'HTTP/1.1'
                                       );
          EXCEPTION
             WHEN OTHERS
             THEN
                errx := SQLERRM;
                raise_application_error (-20005, errx);
          END;
     
          BEGIN
             UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
             UTL_HTTP.set_header (http_req,
                                  'Content-Length',
                                  LENGTH (soap_request)
                                 );
             UTL_HTTP.set_header (http_req,
                                  'SOAPAction',
                                  'xmlns="urn:rvcotest.ss.com/commerce/999/tProcessor"'
                                 );
          EXCEPTION
             WHEN OTHERS
             THEN
                errx := SQLERRM;
                raise_application_error (-20006, errx);
          END;
     
          BEGIN
             UTL_HTTP.write_text (http_req, soap_request);
             http_resp := UTL_HTTP.get_response (http_req);
             UTL_HTTP.read_text (http_resp, soap_respond);
             UTL_HTTP.end_response (http_resp);
          EXCEPTION
             WHEN UTL_HTTP.end_of_body
             THEN
                UTL_HTTP.end_response (http_resp);
             WHEN OTHERS
             THEN
                errx := SQLERRM;
                raise_application_error (-20007, errx);
          END;

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    ruchir123 is offline Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    0

    Default Hello

    Thank you for your reply. Btw, I am new to consuming a secure webservice and I do not know how to implement message level security. Is there any link or reference that I can take a look?

    Thank you
    R

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Multiple <wsse:Security> entry in SOAP 1.1 header
    By javaduke in forum Advanced Java
    Replies: 0
    Last Post: 08-09-2010, 03:27 PM
  2. Replies: 1
    Last Post: 03-10-2010, 01:53 PM
  3. Replies: 1
    Last Post: 12-05-2009, 07:28 AM
  4. Replies: 1
    Last Post: 10-26-2009, 04:38 PM
  5. Replies: 3
    Last Post: 01-23-2009, 08:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •