Webservice Client deserialization problem with Vectors!

Hello!
I'm generating a Java Proxy Client with Eclipse WTP.
The Client works fine with normal datatypes and own Beans. But whe the return type is a Collection with own beans an exception is thrown:
exception: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
So whats wrong?
In teh Webservice Explorer everything seems to be fine, my vector is serialized in item-tags:
- <getAktionenResponse xmlns="http://commonservice">
- <getAktionenReturn>
- <item xmlns="">
<aktn_nr>a12345</aktn_nr>
<claim>222</claim>
<geschaeftsjahr>2005</geschaeftsjahr>
<son>333</son>
<special_operation_code>soc12345</special_operation_code>
<status>ready</status>
<vin>t123</vin>
</item>
- <item xmlns="">
<aktn_nr>a6789</aktn_nr>
<claim>567</claim>
<geschaeftsjahr>2006</geschaeftsjahr>
<son>555</son>
<special_operation_code>soc6789</special_operation_code>
<status>false</status>
<vin>t123</vin>
</item>
</getAktionenReturn>
</getAktionenResponse>
how can i solve this problem?
the background is that I return a vector with Java Objects. I thought apache axis deserielizes automatically the vector and the bean inside??
I'm pretty new to webservices...
Pleas help!
Thanks!

As per the below link, I assumed its better to avoid collections and go with plain array of objects.
Please let us know if I am wrong.
http://www-128.ibm.com/developerworks/webservices/library/ws-tip-coding.html
Regards,
Venkat S

Similar Messages

  • HELP-Problem with Vector type in Applet

    Hi,
    I am writing an Java applet which uses Vector. It won't run in IE browser, simply does not respond.
    However, when I tested the program using Appletviewer it runs prefectly.
    Is there a way to make Vector work in applet ?
    I have investigated the code and I'm pretty sure it's the Vector that causes problem in the applet.
    Pls your idea. Thanks.
    Hadi

    Hi,
    I use Applet, not JApplet. There are 3 deprecated things in this applet (mouseDown, keyDown, action) but I have used them all in my previous applet with no problem at all.
    I suspected the problem is Vector related by inserting several showDialogs as below:
    showDialog("1111");
    t.clear();     // to clear the vector
    showDialog("222222");
    I can see that the applet displays the 1111, but does not display 222222 at all. It seems like it simply ignores all commands after the first showDialog. Therefore, I suspect the t.clear() as the source of problem. But it does not display any error.
    't' is defined at the top as:
    static Vector t = new Vector();
    And t is manipulated by such: t.add(new Task()); and other regular Vector methods in jdk 1.3. I also checked that there is no deprecated methods for Vector from 1.2 to 1.3.
    I use MS Internet Explorer to run my applet.
    Any other things I should check ?
    Thanks.

  • Client Having Problems With Acrobat 11.0.3 and files created in earlier versions

    We are noticing problems with our PDF's depending on the version of Adobe they are viewed with.
    If the PDF File was created pre 11.0.3 and you view it with 11.0.3 you only see squares in the narratives from SQL/Oracle Text Fields .
    If the PDF File was created with 11.0.3 and you view it with 11.0.3, it is fine.
    Update.  As with most Software/Support services the correct information is not always received and must be forced out of the Customers. 
    The PDF files are drawing of Auto Accidents created in Adobe Acrobat and stored on a Microsoft Server Network.  The files are then merged inside a Microsoft Visual FoxPro 9.0 SP2 Application with Data received from Microfoft SQL Server 2005 Database  through a ODBC driver to a FoxPro Cursor and then created with a Visual FoxPro Report Form. The VFP Report form page that displaies/prints the PDF file is a OLE File Object and is created / Printed through Amyuni 4.5xx Converter to a PDF file and then viewed with Adobe Acrobat 11.0.3.

    There are software packages that will do those checks. So in that sense there is a way to check. However, that would be a programming task and not necessarily simple. So I really can't help you on the programming aspect (I would refer you to something like the SDK forum for programming).
    To check the file, you would normally open the document properties (ctrl-D). The general tab provides the version number and the fonts tab will tell you what fonts are used and embedded.

  • Deserialization Problem with JDOM Document

    HI,
    I am using weblogic7.0 and i have created my own class which implements serializable. I set the object of this class in the ObjectMessage and send it across. Sometime i have to send some vector,sometimes string and sometime a XML document. So i can set these type of objects in my custom serializable object and send it. For sending XML , either i can send it as a string or as u said as Document object. But i want to do send it as a Document object. So i have created a an object of "org.jdom.Document" which implement serializable and setting this object into my custom object and sending this custom object in the objectmessage. But then weblogic throws some exceptions which has to do with deserialization.I am printing the exception below. (without the object of org.jdom.Document this custom object reaches safely and happily:))........can you or anybody tell me what could be the reason..
    weblogic.jms.common.JMSException: Error deserializing object
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:140)
    at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:143)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    ----------- Linked Exception -----------
    weblogic.jms.common.JMSException: Error deserializing object
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:140)
    at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:143)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
    at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    any help would be apprciated..
    Akhil

    Are you sure that your object gets serialized in the first place? You could use the writeObject method (explained in Javadoc for java.io.Serializable) to snoop the process.
    I am actually surprised you can serialize a DOM document.
    /Sebastian

  • Java Server/Client Applicaton - problem with sending data back

    Hello!
    I'm trying to write a small server/client chat application in Java. It's server with availability to accept connections from many clients and it's app just for fun... However, I've come up against a huge problem: everything what clients send, arrives to server (I'm sure about that because it is displayed on the Server Application screen) and then server should send it back to all clients but it doesn't work. I have no faintest idea what causes this problem. Maybe you can help me?
    Here is my server app code:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    * @author Robin
    public class Server {
        ServerSocket serw = null;
        Socket socket = null;
        String line = null;
        Vector<ClientThread> Watki = new Vector();
        ClientThread watek = null;
        public Server(int port) {
            try {
                serw = new ServerSocket(port);           
                line = "";
                while(true) {
                    System.out.println("Running. Waiting for client to connect...");
                    socket = serw.accept();
                    System.out.println("Connected with:\n" + socket.getInetAddress() + "\n");
                    watek = new ClientThread(socket);
                    Watki.addElement(watek);
                    Watki.firstElement().Send("doszlo?");
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public void sendToAll(String s) {
            for(int i = 0; i < Watki.size(); i++) {
                Watki.elementAt(i).Send(s);
        public class ClientThread extends Thread {
            Socket socket;
            DataInputStream in = null;
            DataOutputStream out = null;
            String line = null;
            public ClientThread(Socket s) {
                try {
                    this.socket = s;
                    in = new DataInputStream(s.getInputStream());
                    out = new DataOutputStream(s.getOutputStream());
                    start();
                }catch (IOException e) {
                    System.out.println("BLAD: " + e);
            public void Send(String s) {
                try {
                    out.writeUTF(s);
                }catch (IOException e) {
                    System.out.println("BLAD: " + e);
            public void run() {
                try {
                    line = "";
                    while (true) {
                        line = in.readUTF();
                        System.out.println(line);
                        sendToAll(line);
                }catch (IOException e) {
                    System.out.println("BLAD: " + e);
        public static void main(String[] args) {
            Server serwer = new Server(5000);
    }And here is client app code:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    * @author Robin
    public class Client implements Runnable {
        Socket socket = null;
        BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
        DataInputStream in = null;
        DataOutputStream out = null;
        String line = null;
        public Client(String host, int port) {
            try {
                System.out.println("Connecting to " + host + ":" + port);
                socket = new Socket(host, port);
                System.out.println("Connected\nTALK:");
                out = new DataOutputStream(socket.getOutputStream());
                in = new DataInputStream(socket.getInputStream());
                line = "";
                while(!line.toLowerCase().equals(".bye")) {
                    line = keyIn.readLine();
                    Send(line);
            }catch (UnknownHostException e) {
                System.out.println("BLAD: " + e);
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public void Send(String s) {
            try {
                out.writeUTF(s);
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public void run() {
            String loaded = "";
            try {
                while(true) {
                    loaded = in.readUTF();
                    System.out.println(loaded);
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public static void main(String[] args) {
            Client client = new Client("localhost", 5000);
    }By the way, this app is mainly written in English language (text that appears on the screen) however in functions I used Polish language (for example: BLAD - it means ERROR in English). Sorry for that :)

    Yeap, I will change those exceptions later, thanks for advice.
    You asked what's going on with it: both applications start with no errors, but when I write something in client side it should be sent to the server and then forwarded to all connected clients but it stops somewhere. However, I added a one line to the server code
    line = in.readUTF();
    System.out.println(line);
    sendToAll(line); and after it reads message from client (no matter which one) it shows that message on the server side screen, then it should send this message to all clients but it doesn't work in this moment. What's confusing: no errors occurs, so it's rather a mistake in my code, but where?
    Edited by: Robin3D on Sep 30, 2009 9:07 AM

  • Problems with vectors

    Hi,
    In response to an earlier problem i posted which i thought i had resolved i have to ask some more advice as i am still having problems.
    Basically i have two points (0,0,0) and (1,1,1) where two spheres are located, im trying to connect a cylinder to these spheres. I have tried using Pythagoras theorem and this connects the spheres up perfectly if the z value is assigned to 0 when i use the rotZ() method with the resulting angle. What i would like to know is there any way of connecting the spheres with 3 coordinates for x,y,z using the same method.
    The main formula i was working on was after connecting up the spheres in just 2 dimensions (ie z value equal to 0) as i mentioned earlier, was to calculate the length of the hypoteneus and have the z value divide this (ie using Pytagoras' theorem again tan teeta = z2-z1/c where c is the sqrt(x*x+y*y) ). Once i got this angle i then rotated it around the Y axis (im not sure if i am actually rotating it around the correct axis, i know that i also have to rotate around the X axis a certain degree but i dont know how much) however the spheres still did not connect up.
    Is it possible to do it the above way or do i need to do i need to use all vector calculations (dot, cross products etc) which i would prefer to stay away from?
    Sorry if it is not very clear it is kind of hard to explain!
    Any help would be greatly appreciated because it is really driving me nuts.
    Regards
    Andy

    Hi
    Just putting up the code to show how i am figuring out the angles and what rotations im using
              double tanTeetaXY = (y-0.0f)/(x-0.0f);
                   double teetaXY = Math.atan(tanTeetaXY);
                   double tanTeetaXZ = (z-0.0f)/(x-0.0f);
                   double teetaXZ = Math.atan(tanTeetaXZ);
                   double testang = (y-0.0f)/(z-0.0f);
                   double teetatest = Math.atan(testang);
                   rotate.rotZ((Math.PI/2.0f)-teetaXY);
                   temprotate.rotY(teetaXZ);
                   rotate.mul(temprotate);
                   temprotate.rotX(teetatest);
                   rotate.mulInverse(temprotate);
                   rotate.invert();Am i completely off with this or is there a better way to figure things out does anyone know? I just cant get my head around it!
    Much appreciated
    Andy

  • Client Eventing Problem with URL Iview

    Hi,
    I am new to EP and have a basic client eventing question. We are trying to integrate a URL Iview from a partner product with a standard Iview downloaded from Iviewstudio. This standard Iview is capable of handling client events from other Iviews in the standard package. We want to re-use this Iview with the same event (same functionality) to be able to handle events from the partner URL Iview.
    The partner Iview and our portal are on different servers.
    We are using the following Javascript but it doesnt seem to raise the event.
    EPCM.storeClientData('urn:com.sap.bor:BUS0010','objid',LocId));
    EPCM.storeClientData('urn:com.sap.bor:BUS0010','AllKeys','objid');
    EPCM.raiseEvent('urn:com.sap.bor:BUS0010','select','','/irj/servlet/prt/portal/prtroot/...'
    We were able to debug and find that the data was being stored in the Data Bag. However the event is not being raised at all. It seems that it just gets stuck somewhere in the Raise event. We even put a javascript alert after the raise event but it doesnt seem to reach there at all.
    Could you give me a few pointers as to what the problem might be.
    Thanks in advance.
    Message was edited by: Mayank Bhatnagar

    Hi,
    let's have a look at two quotes of the PDK documentation.
    "Using the EPCF from your JavaScript, you can send messages to JavaScript code embedded in other iViews."
    "Isolated iViews are iViews that are not inlined into a portal page, but referenced using an IFRAME. To make the EPCF available in such iViews, the EPCF JavaScript as well as the EPCF applet are included into each generated frame."
    From my point of view, this only can work automatically with content provided by the portal.
    Therefore, this can't work with isolated URL iViews  generated with the wizards. Imagine a google iView, running in an iFrame. Google is called by the portal, but it's simply standard google HTML output - displayed in the portal.
    To provide the capability of the EPCF, the epcf javascript file has to be included in the "partner URL iView"'s source. I tried this and it worked. However, this is not a highly sophisticated solution
    If the partner iView's server is running in a different domain, there are further issues to be considered (keyword: java script origin policy)
    If anybody has corrections or can provide a good solution, don't hesitate.

  • Problem with Vector

    I have a problem in my socket program(trying to implement sliding window algorithm). Details are given below:
    I have declared a static member variable ServerWindow of type Vector in my socket program. I am adding all the packets receiving from the client
    to this vector. But whenever I am trying to add a new packet, it simply overwrites all the records in the vector. So my vector when displayed
    has the last packet for all elements. I have checked the received
    packet and its contents are OK.
    public void receive(DatagramPacket p) throws IOException {
    boolean KeepRunning = true;
    boolean KeepGoing = true;
    ServerWindow = new Vector();
    while(KeepRunning){
    try{
    while (KeepGoing){ 
    if (ServerWindow.size() <= 7){
    super.receive(p);
    if (isCorrectCRC(p)){
    ServerWindow.add(p);
    if (ServerWindow.size() == 7){
    for (i=0;i<ServerWindow.size();i++){
    System.out.println("In receive(): " + i + " " + new String( (byte[])ServerWindow.get(i)));
    }catch(SocketTimeoutException e){
    } //end of catch
    } // end of while
    } // end of receive method

    I think coz you keep redeclaring serverwindow in your method. Each time it creates a new Vector object.

  • Problem with Vector method addElement

    I am new to Java. I am using JDK 1.3. I am writing a program that will convert a text file to a binary file that stores a Vector object. I have narrowed my problem to the method that reads the text file and creates my vector. Each element in my vector stores an integer and a string variable. The reading of the text file works find and the creation of my record works find. It seems that the storing of the record in the vector is not working. When I print the first 10 elements of the vector, it have the same record(the last record of my text file). What is wrong with the method below? I am also appending the result of running my program.
    private static void readTextFile(File f) {
    try {
    FileReader fileIn = new FileReader(f);
    BufferedReader in = new BufferedReader(fileIn);
    String line;
    int i;
    SsnLocationRecord recordIn = new SsnLocationRecord();
    int ctr = 0;
    while (true) {
    line = in.readLine();
    if (line == null)
    break;
    ctr += 1;
    i = line.indexOf(" ");
    recordIn.putAreaNumber(Integer.parseInt(line.substring(0,i).trim()));
    recordIn.putLocation(line.substring(i+1).trim());
    records.addElement(recordIn);
    if (ctr < 11)
    System.out.println(recordIn);
    in.close();
    } catch (IOException e) {
    System.out.println ("Error reading file");
    System.exit(0);
    for (int i = 0; i < 11; i++)
    System.out.println((SsnLocationRecord) records.elementAt(i));
    RESULTS:
    C:\Training\Java>java ConvertTextFileToObjectFile data\ssn.dat
    0 null
    3 New Hampshire
    7 Maine
    9 Vermont
    34 Massachusetts
    39 Rhode Island
    49 Connecticut
    134 New York
    158 New Jersey
    211 Pennsylvania
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    680 Nevada
    C:\Training\Java>

    First of all it would be better if you did a priming read and then checked line == null in the while statement instead of the way you have it.
    ctr++ will also accomplish what ctr +=1 is doing.
    you need to create a new instance of SsnLocationRecord for each line read. What you are doing is overlaying the objects data each time you execute the .putxxxx methods. The reference to the object is placed in the vector. The actual object is still being updated by the .putxxx methods (NOTE : THIS IS THE ANSWER TO YOUR MAIN QUESTION).
    you close should be in a finally statement.
    To process through all the elements of a Vector create an Enumeration and then use the nextElement() method instead of the elementAt is probably better. (Some will argue with me on this I am sure).
    Also, on a catch do not call System.exit(0). This will end your JVM normally. Instead throw an Exception (Runtime or Error level if you want an abnormal end).

  • ReadObject and problems with Vector field

    hello.
    i'm trying to send an object(data Packet for a chat application) and receive it via sockets.
    every thing is right but there is a Vector field(online users list)that has some problems.
    my clients receive every updated class that contains new user list.but they just see the first received list?
    it's so strange to me because every thing else (such as color,font,size,..) works fine.
    can you help me?

    Every time you resend an object you have already sent, ObjectOutputStream will just send a 'handle', not the actual object. If it's changed value this is a problem. Use ObjectOutputStream.reset() to cause it to forget everything previously sent.

  • [BO 4.0 Client Tools] Problems with using Translation Manager

    I have Installed SAP BO 4.0 with SP 2 on a Windows 2008 R2 Server with a MS SQL Server 2008 R2 as repository Server.
    I have patched the Server with the SP4 for BO. I have installed the Client tools with the same Patchlevel (SP 4) on the same Server.
    The Java - Installation is the Installation from SAP BO 4.0
    Now I try to use the "Translation Management Tool"
    Login with a BO - Administrator and Enterprise authentification.
    Next Step ist to load an object from the repository.
    This ends with an error Message: java.lang.Exception: initInstance failed. -2
    And now? I have no idea.
    Who can Help?
    Ralph

    Hello Mister Makmerphy,
    it seems, that the higher memory limit solved the problem.
    I made it in some steps and now I have a memory limit with 3 Gbyte.
    And with a last step I've added the last 4 parameters.
    But now I have the Problem:
    "This server is considered failed because it has stopped 5 time(s) in 60 minute(s)."
    And the actuall status is "failed"
    Where can I reset this counter.
    Waiting another hour to restart doesn't help
    System Reboot doesn't help.
    Where can I reset this counter or this timer.
    Ralph

  • SSL client certificate problem with exchange owa

    Since a week I've been having the strangest problem when trying to connect to an exchange webmail server.
    When I try to log on to the server, I now get a a safari warning telling me that the website requests a client certificate and prompts me to choose one.
    Safari presents me with a few .mac and mobileme certificates, none of which are valid for this site obviously.
    I cannot get through this dialog because it seems I do not have the required certificate.
    What baffles me though, is that when I disable my mobileme settings in system preferences, safari connects to the exchange webmail perfectly without ever prompting me for a certificate.
    I do not understand what mobileme has to do with this exchange server at all.
    What is even more strange is that I have been having this on 4 different mac's here at home, with two different user accounts on the exchange server, and I have a family mobileme pack... so every system is a little different, but they all behave exactly the same.
    Can anybody point in the right direction please ?
    For what it's worth, I could have installed a 10.7.1 update on one of the systems which may have caused this, but definatly not on all 4 at the same time....
    Another strange bit, when setting up the exchange server inside mail.app, it works perfectly...

    Since a week I've been having the strangest problem when trying to connect to an exchange webmail server.
    When I try to log on to the server, I now get a a safari warning telling me that the website requests a client certificate and prompts me to choose one.
    Safari presents me with a few .mac and mobileme certificates, none of which are valid for this site obviously.
    I cannot get through this dialog because it seems I do not have the required certificate.
    What baffles me though, is that when I disable my mobileme settings in system preferences, safari connects to the exchange webmail perfectly without ever prompting me for a certificate.
    I do not understand what mobileme has to do with this exchange server at all.
    What is even more strange is that I have been having this on 4 different mac's here at home, with two different user accounts on the exchange server, and I have a family mobileme pack... so every system is a little different, but they all behave exactly the same.
    Can anybody point in the right direction please ?
    For what it's worth, I could have installed a 10.7.1 update on one of the systems which may have caused this, but definatly not on all 4 at the same time....
    Another strange bit, when setting up the exchange server inside mail.app, it works perfectly...

  • PROBLEM WITH VECTORS

    i NEED SOME HELP HERE. I HAVE TRIED DIFFERENT METHODS, BUT I CAN'T SEEM TO GET IT RIGHT
    int location = -1;///TODO: SET location = INDEX OF ITEM WITH A VALUE X
    list.remove(5);
    print("Item equal to 6 removed", list);
    ///TODO: ADD 9 TO LIST AT POSITION 2 AND ADD 123 TO END OF LIST
    list.add(new Integer (99));
    print("Added 44 at 4 and 99 at end", list);
    add1ToAll(list);
    print("1 added to each", list);
    static void print(String message, Vector v)
    System.out.print(message + ": {");
    for(int i = 0; i < v.size() - 1; i++)
    System.out.print(v.get(i) + ", ");
    System.out.println(v.get(v.size() - 1) + "}");
    static void add1ToAll(Vector v)
    ///TODO: ADD 1 TO EACH NUMBER IN VECTOR v

    1) are you using the (new Integer()); I think that there is a difference between Integer and int;
    2) I found that using a Vector with images is easier if you add it as a String like this (vector.add(""+foo));
    and then convert it back upon usage eg.
    int x = Integer.parseInt((String)vect.get());
    or something like that. I am not around my development
    enviroment at this time.
    --Ian                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • BEA webservice client has problem in talking to secured microsoft webservic

    Hi,
    I am developing a BEA client (standalone java client using BEA 10 MP1 install) to invoke a microsoft secured webservice which requires a X509 token in the request. I am able to invoke the service successfully but can not validate the response which is signed by server.
    Here is the client code, I am using -
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.Stub;
    import weblogic.security.SSL.TrustManager;
    import weblogic.xml.crypto.wss.provider.CredentialProvider;
    import weblogic.xml.crypto.wss.WSSecurityContext;
    import weblogic.wsee.security.bst.ClientBSTCredentialProvider;
    import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
    import weblogic.wsee.security.util.CertUtils;
    import java.util.List;
    import java.util.ArrayList;
    import java.security.cert.X509Certificate;
    import com.accenture.tarpon.*;
    public class Test {
    public static void main(String[] args) throws Exception {
    String username = args[2];
    String password = args[3];
    String wsdl = args[4];
    String clientKeyStore=args[0];
    String clientKeyStorePass=args[1];
    String clientKeyAlias = args[5];
    String clientKeyPass = args[6];
    String serverCertFile = args[7];
    X509Certificate serverCert = (X509Certificate) CertUtils.getCertificate(serverCertFile);
    GetAddress service = new GetAddress_Impl(wsdl);
    Microsoft_X0020_GetAddress port = service.getBasicHttpBinding_Microsoft_X0020_GetAddress();
    List credProviders = new ArrayList();
    //client side BinarySecurityToken credential provider -- x509
    credProviders.add(new ClientBSTCredentialProvider(clientKeyStore, clientKeyStorePass,
    clientKeyAlias, clientKeyPass, "JKS", serverCert));
    credProviders.add(new ClientUNTCredentialProvider(username.getBytes(), password.getBytes()));
    Stub stub = (Stub)port;
    stub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
    stub._setProperty(WSSecurityContext.TRUST_MANAGER,
    new TrustManager(){
    public boolean certificateCallback(X509Certificate[] chain, int validateErr){
    //need to validate if the server cert can be trusted
    for (int i = 0; i < chain.length; i++) {
    System.out.println("Server cert chain: " + chain);
    return true;
    System.out.println("\n\n *** before forming getAddressRequest \n\n");
    GetAddressRequest getAddressRequest = new GetAddressRequest();
    getAddressRequest.setTaxPayerID("MicrosoftGetAddressX509Sign_123");
    GetAddressResponse getAddressResponse = port.getTaxPayerAddress(getAddressRequest);
    System.out.println("\n\n *** after invocation getAddressRequest \n\n");
    printGetAddressResponse(getAddressResponse);
    private static void printGetAddressResponse(GetAddressResponse getAddressResponse){
    System.out.println("\n\n ***** Response from MicrosoftGetAddressService : ***** ");
    System.out.println("\nAddress Line 1 - "+getAddressResponse.getAddressLine1());
    System.out.println("\nAddress Line 2 - "+getAddressResponse.getAddressLine2());
    System.out.println("\nCity - "+getAddressResponse.getCity());
    System.out.println("\nCompany - "+getAddressResponse.getCompany());
    System.out.println("\nState - "+getAddressResponse.getState());
    System.out.println("\nTaxPayerID - "+getAddressResponse.getTaxPayerID());
    System.out.println("\nZip - "+getAddressResponse.getZip());
    System.out.println("\nFirst Name - "+getAddressResponse.getTaxpayerFirstName());
    System.out.println("\nMiddle Name - "+getAddressResponse.getTaxpayerMiddleInitial());
    System.out.println("\nLast Name - "+getAddressResponse.getTaxpayerLastName());
    When I run this, I get this message -
    [java] Exception in thread "main" java.rmi.RemoteException: SOAPFaultException - Faul
    tCode [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}
    InvalidSecurity] FaultString [weblogic.xml.dom.marshal.MarshalException: weblogic.xml.cryp
    to.wss.WSSecurityException: Failed to validate signature.] FaultActor [null]No Detail; nes
    ted exception is:
    [java] javax.xml.rpc.soap.SOAPFaultException: weblogic.xml.dom.marshal.MarshalExc
    eption: weblogic.xml.crypto.wss.WSSecurityException: Failed to validate signature.
    [java] at com.accenture.tarpon.Microsoft_X0020_GetAddress_Stub.getTaxPayerAddress
    (Unknown Source)
    [java] at Test.main(Unknown Source)
    [java] Caused by: javax.xml.rpc.soap.SOAPFaultException: weblogic.xml.dom.marshal.Mar
    shalException: weblogic.xml.crypto.wss.WSSecurityException: Failed to validate signature.
    [java] at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:311)
    [java] at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.
    java:114)
    [java] at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:
    99)
    [java] at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.
    java:87)
    [java] at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:
    304)
    [java] at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.ja
    va:264)
    [java] at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(Client
    Dispatcher.java:193)
    [java] at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispat
    cher.java:148)
    [java] at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
    [java] at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:332)
    [java] ... 2 more
    [java] Caused by: weblogic.xml.crypto.wss.WSSecurityException: weblogic.xml.dom.marsh
    al.MarshalException: weblogic.xml.crypto.wss.WSSecurityException: Failed to validate signa
    ture.
    [java] at weblogic.wsee.security.wssp.handlers.WssClientHandler.processInbound(Ws
    sClientHandler.java:144)
    [java] at weblogic.wsee.security.wssp.handlers.WssClientHandler.processResponse(W
    ssClientHandler.java:130)
    [java] at weblogic.wsee.security.wssp.handlers.WssHandler.handleResponse(WssHandl
    er.java:128)
    [java] at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.ja
    va:282)
    [java] at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.ja
    va:266)
    [java] ... 6 more
    [java] Caused by: weblogic.xml.dom.marshal.MarshalException: weblogic.xml.crypto.wss.
    WSSecurityException: Failed to validate signature.
    [java] at weblogic.xml.crypto.wss.SecurityImpl.unmarshalInternal(SecurityImpl.jav
    a:411)
    [java] at weblogic.xml.crypto.wss.SecurityImpl.unmarshal(SecurityImpl.java:375)
    [java] at weblogic.xml.crypto.wss11.internal.WSS11Factory.unmarshalAndProcessSecu
    rity(WSS11Factory.java:33)
    [java] at weblogic.wsee.security.wssp.handlers.WssClientHandler.processInbound(Ws
    sClientHandler.java:141)
    [java] ... 10 more
    [java] Caused by: weblogic.xml.crypto.wss.WSSecurityException: Failed to validate sig
    nature.
    [java] at weblogic.xml.crypto.wss.SecurityImpl.unmarshalAndProcessSignature(Secur
    ityImpl.java:576)
    [java] at weblogic.xml.crypto.wss.SecurityImpl.unmarshalChildren(SecurityImpl.jav
    a:435)
    [java] at weblogic.xml.crypto.wss.SecurityImpl.unmarshalInternal(SecurityImpl.jav
    a:399)
    [java] ... 13 more
    [java] Caused by: weblogic.xml.crypto.dsig.api.XMLSignatureException
    [java] at weblogic.xml.crypto.dsig.SignedInfoImpl.validateSignature(SignedInfoImp
    l.java:112)
    [java] at weblogic.xml.crypto.dsig.XMLSignatureImpl.validate(XMLSignatureImpl.jav
    a:233)
    [java] at weblogic.xml.crypto.wss.SecurityImpl.unmarshalAndProcessSignature(Secur
    ityImpl.java:568)
    [java] ... 15 more
    [java] Caused by: weblogic.xml.crypto.api.KeySelectorException: weblogic.xml.crypto.w
    ss.WSSecurityException: Failed to resolve security token for issuer serial weblogic.xml.cr
    ypto.dsig.keyinfo.X509IssuerSerialImpl@df9095
    [java] at weblogic.xml.crypto.common.keyinfo.KeyResolver.setupKeyProviderFromCont
    ext(KeyResolver.java:312)
    [java] at weblogic.xml.crypto.common.keyinfo.KeyResolver.getKeyFromSTR(KeyResolve
    r.java:269)
    [java] at weblogic.xml.crypto.common.keyinfo.KeyResolver.select(KeyResolver.java:
    124)
    [java] at weblogic.xml.crypto.dsig.SignedInfoImpl.getVerifyKey(SignedInfoImpl.jav
    a:223)
    [java] at weblogic.xml.crypto.dsig.SignedInfoImpl.validateSignature(SignedInfoImp
    l.java:110)
    [java] ... 17 more
    [java] Caused by: weblogic.xml.crypto.wss.WSSecurityException: Failed to resolve secu
    rity token for issuer serial weblogic.xml.crypto.dsig.keyinfo.X509IssuerSerialImpl@df9095
    [java] at weblogic.xml.crypto.wss.BinarySecurityTokenHandler.getTokenByIssuerSeri
    al(BinarySecurityTokenHandler.java:147)
    [java] at weblogic.xml.crypto.wss.BinarySecurityTokenHandler.getSecurityToken(Bin
    arySecurityTokenHandler.java:81)
    [java] at weblogic.xml.crypto.common.keyinfo.KeyResolver.setupKeyProviderFromCont
    ext(KeyResolver.java:304)
    [java] ... 21 more
    At the server side, Microsoft has imported client cert and also on the client side, I have imported server cert in jdk's cacerts file.
    Please help.
    Thanks in advance,
    Manoj

    Hello experts,
    Do you know is there a way to avoid "SSL handshake failure." error without importing a public key to the default keystore?
    When I access WebLogic WebServices over SSL from Service Control which is generated by WL WorkSpaces 10.2,
    it used default key and there is no additional key manipulation required.
    Is there any way to configure a flag to the service control or WL server to automatically trust the end point host.
    As far as I know at this point is that I need to have public key in PEM format and use keytool to import that into client skystore file. Is this the only way it can solve this handshake issue?
    Any pointers are appreciated. _J                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • FW CS3 problem with Vector Images PLEASE HELP

    Hello,
    My name is Logan and I work for a company called Sutherland
    Design Agency. I am creating a website and i created some vector
    images in illustrator for the logo because i wanted source files to
    be imported into fireworks. When I imported the ai file it seemed
    to be rasterized. Is this normal?
    I would like my images to stay as vectors in fireworks so i
    decided to test this a couple times. When i create a vector i save
    it and import it into fireworks. It's a raster. Then i export it as
    an illustrator file and when i open it, it's a vector again. So i
    know that it is a vector, but why won't it show up in fireworks
    CS3.
    I also noticed the drop-down bar with the different image
    types. Is fireworks auto-optimizing? If so, is there a way to turn
    this off? I want to do my own optimization and I want to view the
    fireworks document the way it is.
    Much help would be greatly appreciated.
    Thanks,
    Logan
    Sutherland Design Agency

    Anagon wrote:
    > okay i'll try that and post my result here.
    >
    >
    FW CS3 should import your AI file without downsaving it to AI
    8. Keep in
    mind though, FW always displays vectors as they would appear
    when
    exported as bitmaps (browsers don't understand vector files
    without a
    helper application). If you are zooming in (not scaling) on
    the canvas,
    the artwork will start to look pixelated, because the stroke
    and fills
    are being displayed as bitmaps. Scaling the image should have
    no
    detrimental effect on the vector.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    Adobe Community Expert
    http://tinyurl.com/2a7dyp
    See my work on Flickr
    http://www.flickr.com/photos/jim_babbage/

Maybe you are looking for

  • Windows Phone 8.1 update error on Samsung Ativ S

    Windows Phone 8.1 update error on Samsung Ativ S. Last update dont Work on my phone, the phone start update but start agen and make error, can you help me? Can´t link ? Body text cannot contain images or links until we are able to verify your account

  • Data deletion on primary index and secondary index

    Hello, I have a question regarding data deletion in BDB-JE. Suppose I have an Entity class which has a primary index and a secondary index, the secondary key does not have outer related entity. So when I want to delete this entity, is it correct we o

  • 1099 vendors report!!!!!!!!

    Hi Gurus HI, We are on ECC 6.0. We would like to generate the following report in SAP: 1). S_P00_07000134 - Generic Withholding Tax Reporting When we run these transaction, we get error that no data is selected. Can anyone throw light on what we are

  • Calling a function in an external actionscript

    Hi. First of all I'd like to put my hands up and say that what I know about Flash is antiquated (I used to work with Flash 4 / 5), and have now been thrown into the deep end, as it were. I have an application that has a button component. In an extern

  • Cant load my sons Ipod with my exsisting one

    I have a older I pod Nano my son got a new one one for christmas how do i load it on to my computer with out messing my progam up. thanks brian