Handler problem with signatures

I am trying to add a signature to SOAP messages in an Axis handler. The signature is a byte[]. I have tried to convert the byte[] to a string and then add it to the SOAP header, but the verification always fail.
Does anyone know how to add a byte[] to a SOAP message as an SOAPElement?
My code here:
Signing:
byte[] realSig = rsa.sign();
          //Object sig = org.apache.axis.utils.ArrayUtil.convertArrayToObject(realSig,java.lang.Class.class );
          String sig = new String (realSig);
          String certificate = new String (cert.getEncoded());
          //Object sig = org.apache.axis.utils.ArrayUtil.convertArrayToObject(realSig,java.lang.Class.class );
          SOAPHeaderElement sigElem = new SOAPHeaderElement(XMLUtils
                    .StringToElement(SOAPSECNS, "sig", sig));
          se.addHeader(sigElem);
          SOAPHeaderElement certElem = new SOAPHeaderElement(XMLUtils
                    .StringToElement(SOAPSECNS, "cert", certificate));
          se.addHeader(certElem);
and verify:
SOAPMessage sm = ((org.apache.axis.MessageContext) messageC)
                    .getMessage();
          SOAPEnvelope se = (SOAPEnvelope) sm.getSOAPPart().getEnvelope();
          Element soapSignatureElement = (Element) se.getHeader().getElementsByTagNameNS(SOAPSECNS, "sig").item(0);
          System.out.println("sig value: "+soapSignatureElement.getNodeValue());
                                                       // code
          Element certificateElem = (Element) se.getHeader().getElementsByTagNameNS(SOAPSECNS, "cert").item(0);
          if (soapSignatureElement == null) {
               System.out.println("The message hasn't been signed");
               return false;
          System.out.println(certificateElem.getNodeValue());
          byte[] sig = certificateElem.getNodeValue().getBytes();
          byte[] cert = soapSignatureElement.getNodeValue().getBytes();
The signature code is from Sun's tutorial for signature.
Thanks in advance.
Message was edited by:
minto
Message was edited by:
minto
Message was edited by:
minto

I am trying to do something similar: create a form in Acrobat X that can be signed by someone using Reader.  I created the digital signature box and enabled the additional features, then sent it to some folks (myself included) to see if we could sign and return it.  When I opened in Reader and clicked into the signature block, it initially said the security settings prevented signatures, but I was actually able to sign it using the Sign tab at the top (had to create a digital signature and everything -- no problem).  Then I submitted the form (emailed it back to myself at work) as an .fdf and exported the data into an Excel spreadsheet, but the Signature "data" field was blank.  The field was there, but there was no sign that it had been signed.  Am I missing something?
     Also, although much less important, what defines the order of the data fields in that Excel file?  I would have thought it was the order shown in edit mode in Acrobat X, but that's not the case.  Any idea?
Thanks in advance.

Similar Messages

  • Problem with Signature tab drop down in Outlook for Mac 2011

    I am setting up Outlook 2011 on my mac and have run across a problem with the signatures that I have been unable to resolve.
    I have set up 2 signatures for my two different pop accounts and thought that if I defaulted them to their appropriate account they would automatically be seen in email when I had chosen the corresponding email account. I then discovered that it was not
    possible to do this in Outlook 2011 for Mac.
    So I selected NONE as the defaults for my two signatures, and thought I would be able to manually add the appropriate signature to each email as I compose or reply.  BUT NO!!!! THE PROBLEM LIES BELOW:
    The 2 signatures that I set up are visible in the drop down menu from the signature tab in an email, however they are greyed out and cannot be selected.  I have attempted selecting one of these signatures as the default, and whichever one
    I select dutifully appears when I compose a new email, but when I click on the drop down to change the signature, both are still greyed out.
    So effectively, I only have the option of one signature or none, despite being able to set up multiple signatures in my profile.
    Does anyone know why this is occurring and what the solution is?
    Thanking you in advance.

    Hi,
    Please remove the Signature and re-add it back to check whether the issue persists. We can follow the articles below to create signature in Outlook 2011 for Mac:
    How to create signature or customize it (add picture) in Outlook for Mac 2011
    http://support2.microsoft.com/kb/2455171/en-us
    Add a signature automatically to every message
    http://office.microsoft.com/en-001/mac-outlook-help/add-a-signature-automatically-to-every-message-HA102928243.aspx
    If the new created Signature is still greyed out in your Outlook, please restart the Outlook client in safe mode to confirm if the issue is caused by any third-party add-ins.
    If the issue persists in Outlook safe mode, I suggest you ask a question in Outlook for Mac forum for further troubleshooting:
    http://answers.microsoft.com/en-us/mac/forum/macoutlook?tab=Threads
    Regards,
    Winnie Liang
    TechNet Community Support

  • ColdFusion.Ajax.submitForm error handler problem with AppleWebKit-based browsers

    All-
    When using an AppleWebKit-based browser (i.e. Safari or
    Chrome), the
    message argument of the Coldfusion.Ajax.submitForm error
    handler always contains the string "OK", regardless of what error
    was cfthrown by my CFM form handler.
    Recall that the signature for the error handler is this:
    MyFormErrorHandler = function( code, message )
    In other browsers (i.e. IE or Firefox), the
    message argument of the error handler properly contains the
    message that was cfthrown by my form handler.
    Can anyone offer any guidance for this problem? Thanks in
    advance for your help.
    -Josh

    I was testing on IE8, Windows7 Starter.  I don't have IE6 available to test on.  Can test on IE7 a bit later on, but I have to fart-arse around with a VM to get it ready, so I'll do that after work.
    I tested multiple submits both via clicking between the tabs within one main "request" as well as multiple entire requests (like via refreshing the whole browser window).  I had no problems.
    I think you're being quite optimistic ot expect AJAX stuff to work reliably on IE6.  IE6 crashes.  That's what it's most famous for doing.  One needs to expect crashes if one pushes it (push it anywhere than out the window, that is).  And your client company's IT dept should be lined up against a wall and shot for still running it.  That's professionally negligent IMO.  But... you probably don't need to be told that.
    Adam

  • Problem with Signature formatting

    Hi,
    My company has changed its email signature format. Everyone else is using PCs and they have no issue with format. Im always fighting to get them to use Macs but I cant get the signature to work in mail.
    looks like its too wide and is pushing wider lines into next line. Is there a limit on how wide a signature can be?
    Ive been trying to just cut and paste it into mail signature or via Pages. Perhaps I should create it from scratch to solve the problem.
    Im running Mac OSX 10.6.8 and mail 4.5.
    Many thanks,
    Mike

    Hi Mike,
    Might see if this helps...
    http://allforces.com/2006/04/14/css-signatures/

  • Problems with signature verification in JDK1.5

    Hello to all!
    I have the a problem: I am trying to verify the signature with the following code:
        public static boolean verify(String data, String b64sign)
               boolean verified;
                BASE64Decoder dec = new BASE64Decoder();
                byte[] decoded = dec.decodeBuffer(b64sign);
                CertificateFactory factory = CertificateFactory.getInstance("X.509");
                FileInputStream fis = new FileInputStream("c:/cert/test-server.cert");
                X509Certificate cc = (X509Certificate) factory.generateCertificate(fis);
                System.out.println(cc);
                Signature signature = Signature.getInstance("SHA1withRSA");
                signature.initVerify(cc);
                signature.update(data.getBytes());
                verified = signature.verify(decoded);
                return verified;
        }and under jdk 1.5 the result is always FALSE. I've tried different providers, including "BC version 1.34", "SunJSSE version 1.5", "SunRsaSign version 1.5" but result is still the same.
    Curiously, that under jdk 1.4.2 all works fine, and signature verifies successfully. When running under jdk 1.4.2 provider used is: "SunJSSE version 1.42".
    What am I doing wrong?

    data.getBytes() isn't a reliable way of obtaining bytes from a String. Don't pass the data through a String, preserve it as bytes all the way through. Or use a fixed encoding when you do the translation, i.e. the same one that was used in JDK 1.4.2 whatever that was (by default). The default has changed between JDKs before now.

  • Save problem with signature

    Hi,
      is there any way how to prevent dig. signed form from saving - let imagine situation, where I´m opening pdf on a server, then I want to sign it and then Submit by button and send to a portal. How to handle with this kind of situation?
    thanks, Lukas

    Lukas
    If you use LiveCycle to build your process, you can use Digital Signatures ES2 sign the PDF on the server and route it on to other steps in your process.
    Regards
    Steve

  • Problems with Signature Files?

    Running Mac OS X 10.7.5 I recently discovered that some of what I was seeing on one of my signature files did not show up on some of my co-workers Windows OS email systems.  It is true that the signature file was a bit complex, including 4 small .jpeg images and some boldfaced and italicized words, but the part that failed to show up on my co-workers Windows computers wasn't at all special.
    I've known for some time that Mail's signature files can be tricky to format, often putting text in the wrong place when you copy and paste into an existing file; but I've found work-arounds that have remedied that problem.
    Here's some background on why I'm trying to start this discussion:  I use signature files as boilerplate responses to FAQs in my business and also for advertising to existing and targeted future customers.  (I don't spam and my emails are sent one-at-a-time.)
    The situation that drew my attention to the problem of Mail signatures failing to render faithfully on some Windows OS computers was as follows...
    I had contracted with two colleagues for them to become co-authors with me of the 2013 4th edition of my book, Effective Elementary Social Studies.  To my amazement and regret their bios, which looked fine on my Mac and my wife's Mac, didn't even appear on their computers!  I was immediately contacted by one of the co-authors, who wanted to know why I left them off.  My response was, of course, that I didn't leave them off, for him to take another look at the message.  He did and in fact sent the message back to me and sure enough, their bios were missing!

    Hi
    Your unzip is almost certainly a 32bit application compiled without largefile support. You could build it yourself. I just tried (Solaris 10, Studio Express).
    Download from
    http://sourceforge.net/project/showfiles.php?group_id=118012&package_id=128992
    unzip into a build directory, cd to the build directory, cp unix/Makefile ., then edit the Makefile to have
    CF = -O -I. -DUNIX $(LOC) -m64
    LF = -m64 -o unzip
    LF2 = -m64 -s
    then make generic.
    Paul

  • Problem with signatures ;/

    To the form created in Livecycle I added a signature field. However, the signature works only in LC and Adobre Professional. When I'm trying to add a signature in the Adobe Acrobat Reader, nothing happens. Do you know the solution to this problem?
    Log:
    Signed signatures were found. These signatures were imported without the signature value.
    0 warnings/errors reported.
    In Adobe Acrobat Reader I do not see a "send button",but this button is available when I open form in LC or Adobre Professional.
    ps. I have new version of Adobre Professional

    I am trying to do something similar: create a form in Acrobat X that can be signed by someone using Reader.  I created the digital signature box and enabled the additional features, then sent it to some folks (myself included) to see if we could sign and return it.  When I opened in Reader and clicked into the signature block, it initially said the security settings prevented signatures, but I was actually able to sign it using the Sign tab at the top (had to create a digital signature and everything -- no problem).  Then I submitted the form (emailed it back to myself at work) as an .fdf and exported the data into an Excel spreadsheet, but the Signature "data" field was blank.  The field was there, but there was no sign that it had been signed.  Am I missing something?
         Also, although much less important, what defines the order of the data fields in that Excel file?  I would have thought it was the order shown in edit mode in Acrobat X, but that's not the case.  Any idea?
    Thanks in advance.

  • Error handling problem with outbound idoc status 02 and  XML HTTP Port

    I set up an ALE scenario to send master data out of SAP via an XML HTTP port.  All goes well until the idoc receives error 02. 
    It looks like idocs in this error status with the use of an XML HTTP port can not be reprocessed via the standard SAP techniques.  Program RBDAGAIN takes them out of the list for reprocessing (even though the connection is back up and running).
    Is there any solution to still use the standard ALE error handling ?

    Hi Karin,
    Looks like based on note 701597, you can only reprocess these idocs manually via a workitem.  I qouted the relevant text below:
    3. Error handling with status '02':
    An HTTP IDoc in status '02' should not automatically be sent once again.
    Up to now, the RBDAGAIN report was used to resend incorrect IDocs.
    However, this report was adjusted and now deletes all IDocs in status 02
    to be routed to a HTTP port from the list of selected IDocs. IDocs to a
    HTTP port in status '02' should only be sent manually via a work item.
    Regards:
    Rex

  • Problems with "Signatures" in Mail...

    Two separate head scratches here:
    1. First of all, in the pop up window "Choose Signature", it is grayed out saying "none", and won't allow me to select any of the two footers I have created. --- It used to work, but when I recently tried to add a new footer and select it, suddenly I can't get ANY signature to work.
    2. Is it possible to create a small GIF icon for my small business, and make it a footer on all my e-mails? I tried it: first creating the GIF in Photoshop, then dragging it successfully to the Signature window in preferences.... it appeared fine in the window, but would not load (appear on an e-mail).
    It was after this effort that ALL signature functions stopped (#1 above).
    Thanks for any tips here!
    P

    Hi Ernie, I tried this solution but it hasn't worked for me. The 'Choose Signature' field in my Signatures window is greyed out so. The Account into which I dragged the signatures says it has 5 signatures in it but when I start a new email my 'Signature' field consists of 'None'.
    What have I missed. I'm in Mail 3.6 in Leopard.
    Note: I recently had to dump by 'apple.plist' from the library as it totally messed up my Mail which stopped picking up from my Gmail account. I haven't had a signature since.
    Thanks, Carolyn

  • Problems with signatures in email preferences

    I move a bunch signatures from the "all signatures" to my email account (there are 6 different accounts). If I close the program or shut off the computer, I loose al the signatures in my account. I have to open preference again and move them from "all signatures". Can anyone help?

    Hi Ernie, I tried this solution but it hasn't worked for me. The 'Choose Signature' field in my Signatures window is greyed out so. The Account into which I dragged the signatures says it has 5 signatures in it but when I start a new email my 'Signature' field consists of 'None'.
    What have I missed. I'm in Mail 3.6 in Leopard.
    Note: I recently had to dump by 'apple.plist' from the library as it totally messed up my Mail which stopped picking up from my Gmail account. I haven't had a signature since.
    Thanks, Carolyn

  • Problems with signatures and text tools

    When I open forms none of the 'fill and sign' 'comment' tools are available (all grayed out). Others in my office use these forms so it is particular to my software / machine. Any thoughts why these features are turned off / broken. I have completely removed adobe and re installed but it seemed to make little differences. This used to work before my Adobe Pro license expired. Suggestions?

    I wonder where you removed Adobe from, stock exchange? Adobe is a company. It produces many products. Which product do you use: Acrobat/Reader? Which version (including minor)? Which platform/OS? When you say "This used to work before my Adobe Pro license expired" do you mean that you installed a trial version and it expired and now you purchased a license (product key)?
    When you say "When I open forms none of the 'fill and sign' 'comment' tools are available (all grayed out)" are you opening the same PDFs that you successfully tries before or new PDFs?
    If those are new PDFs one reason for this behavior could be that your forms have (visible or invisible) digital signatures. For instance, they have an invisible digital signature if they are Reader-enabled.

  • Problem in Webdynpro and Adobe form with signature field

    Hi experts!
    I have a problem with Signature Field in Adobe Form showed in a Web Dynpro Abap.
    During the execution I fill the Signature field correctly but when I push any other button of the Webdynpro, the Adobe Form shows me the next error.
    After click OK, the webdynpro is hang and not respond.
    Any idea why not respond?
    Thanks.

    Hi friend,
    Its not like that the Adobe created using SFP is non interactive.
    We can create interactive forms using SFP transaction using java code.
    I think it will be the problem with ADS just check with your basis people i think they will configure you the settings which works fine.
    To check whether the settings are perfect you can try executing the standard programs FP_TEST_00 and
    FP_PDF_TEST_00. If it works fine then some other problem exists else check with your basis team.
    Just check this and revert me if you have any issues. I will help you
    Thanks,
    Sri Hari

  • Problem with event handling

    Hello all,
    I have a problem with event handling. I have two buttons in my GUI application with the same name.They are instance variables of two different objects of the same class and are put together in the one GUI.And their actionlisteners are registered with the same GUI. How can I differentiate between these two buttons?
    To be more eloborate here is a basic definition of my classes
    class SystemPanel{
             SystemPanel(FTP ftp){ app = ftp};
             FTP app;
             private JButton b = new JButton("ChgDir");
            b.addActionListener(app);
    class FTP extends JFrame implements ActionListener{
               SystemPanel rem = new SystemPanel(this);
               SystemPanel loc = new SystemPanel(this);
               FTP(){
                       add(rem);
                       add(loc);
                       pack();
                       show();
           void actionPerformed(ActionEvent evt){
            /*HOW WILL I BE ABLE TO KNOW WHICH BUTTON WAS PRESSED AS THEY
               BOTH HAVE SAME ID AND getSouce() ?
               In this case..it if was from rem or loc ?
    }  It would be really helpful if anyone could help me in this regard..
    Thanks
    Hari Vigensh

    Hi levi,
    Thankx..
    I solved the problem ..using same concept but in a different way..
    One thing i wanted to make clear is that the two buttons are in the SAME CLASS and i am forming 2 different objects of the SAME class and then putting them in a GUI.THERE IS NO b and C. there is just two instances of b which belong to the SAME CLASS..
    So the code
    private JButton b = new JButton("ChgDir");
    b.setActionCommand ("1");
    wont work as both the instances would have the label "ChgDir" and have setActionCommand set to 1!!!!
    Actually I have an array of buttons..So I solved the prob by writting a function caled setActionCmdRemote that would just set the action commands of one object of the class differently ..here is the code
    public void setActionCommandsRemote()
         for(int i = 0 ; i <cmdButtons.length ; i++)
         cmdButtons.setActionCommand((cmdButtons[i].getText())+"Rem");
    This just adds "rem" to the existing Actioncommand and i check it as folows in my actionperformed method
         if(button.getActionCommand().equals("DeleteRem") )          
                        deleteFileRemote();
          else if(button.getActionCommand().equals("Delete") )
                     deleteFileLocal();Anyway thanx a milion for your help..this was my first posting and I was glad to get a prompt reply!!!

  • Just moved my email from entourage to Mail. Having real problems with getting my signatures to work properly. When adding in a small company logo, windows computers only receive signature as an attachment. Am sending email as Rich Text. Any ideas on a fix

    Just moved my email from Entourage to Mail. Having real problems with getting my signatures to work properly despite sending email as Rich Text.
    When adding in a small company logo to the signature, PC's / windows computers only receive signature and logo as attachments.
    I've tried all possible fixes I can find including getting a PC user to format the logo but no joy. Has anyone experienced this and any ideas on a fix gratefully received.

    Send it as html so the signature is an image source URL

Maybe you are looking for

  • How to call webservice using standalone application

    Hi, Actually i am trying to connect with one free webservice using client. but i am uanble to get the result and it is throwing the Exception.Exception is Execution failed. Exception: java.net.ConnectException: Connection timed out: connection reset

  • Nexenta Solaris Release 5.11 problem with wrong magic number

    I built an x86 server using nexenta. The box got powered down, and now it's freaking out about the /var filesystem. Unable to repair /var filesystem. fsck -F ufs /dev/rdsk/c0d0s4 I run fsck -F ufs /dev/rdsk/c0d0s4 on it. and get Bad Superblock at blo

  • TNS:protocol adapter error (32bit client/64 bit 11g server on same machine)

    I have Oracle 11g Server (x64) installed on my Windows 7 system and it was working fine. I could connect through SQL*Plus and perform all my database needs. I have since installed software that requires a 32 bit client and have installed both 11g and

  • Saving data in Planning web form with about 270 columns failed

    Hi all and please help! We developed a number of planning forms with a lot of columns (business requirement:() and faced issues with entering data in both web form and excel via smartview. As I undersood already that it's not about 'service.olap.data

  • Stereo Bluetooth headset

    My plantronics pulsar 590A stereo bluetooth headset does not work properly with the iPhone. It works to answer calls but does not work to listen to music. It works with all other cell phones for music. What's the deal?