Results 1 to 3 of 3

Thread: i have a problem when i use .net Client call java server

  1. #1
    ren-wei is offline Registered User
    Name: wei ren
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    21

    i have a problem when i use .net Client call java server


    Hi,I have some problems in my project.My project server point use java,and client point use .net(vs2008).when I call the server with java it is’t any question,but when I use .net there are some problems.
    1: IceInternal.LocalExceptionWrapper
    StackTrace
    Ice.ConnectionI.sendRequest(Outgoing og, Boolean compress, Boolean response)
    IceInternal.ConnectionRequestHandler.sendRequest(O utgoing out)
    IceInternal.Outgoing.invoke()
    mars.order.OrderManagerDelM_.placeOrder(DTOIceOrde r value, Dictionary`2 context__) position C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WebApplication1\TjTicketWeb\mobile.c s:lineNum 61500
    mars.order.OrderManagerPrxHelper.placeOrder(DTOIce Order value, Dictionary`2 context__, Boolean explicitContext__) position C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WebApplication1\TjTicketWeb\mobile.c s: lineNum 41717
    code:
    private long placeOrder(mars.DTOIceOrder value, _System.Collections.Generic.Dictionary<string, string> context__, bool explicitContext__)
    {
    if(explicitContext__ && context__ == null)
    {
    context__ = emptyContext_;
    }
    int cnt__ = 0;
    while(true)
    {
    Ice.ObjectDel_ delBase__ = null;
    try
    {
    checkTwowayOnly__("placeOrder");
    delBase__ = getDelegate__(false);
    OrderManagerDel_ del__ = (OrderManagerDel_)delBase__;
    return del__.placeOrder(value, context__);
    }
    catch(IceInternal.LocalExceptionWrapper ex__)
    {
    handleExceptionWrapper__(delBase__, ex__);
    }
    catch(Ice.LocalException ex__)
    {
    handleException__(delBase__, ex__, true, ref cnt__);
    }
    }
    }

    2: Ice.UnmarshalOutOfBoundsException
    StackTrace:
    IceInternal.BasicStream.startReadSlice()
    Ice.ObjectImpl.read__(BasicStream is__, Boolean rid__)
    mars.DTOIceOrder.read__(BasicStream is__, Boolean rid__) position C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WebApplication1\TjTicketWeb\mobile.c s: lineNum 9686
    IceInternal.BasicStream.readObject(IPatcher patcher)
    IceInternal.BasicStream.readPendingObjects()
    mars.order.OrderManagerDelM_.searchUserOrdersByUse rId(String userId, Dictionary`2 context__) position C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WebApplication1\TjTicketWeb\mobile.c s: lineNum 62073


    code:
    public mars.DTOIceOrder[] searchUserOrdersByUserId(string userId, _System.Collections.Generic.Dictionary<string, string> context__)
    {
    IceInternal.Outgoing og__ = handler__.getOutgoing("searchUserOrdersByUserId", Ice.OperationMode.Normal, context__);
    try
    {
    try
    {
    IceInternal.BasicStream os__ = og__.ostr();
    os__.writeString(userId);
    }
    catch(Ice.LocalException ex__)
    {
    og__.abort(ex__);
    }
    bool ok__ = og__.invoke();
    try
    {
    if(!ok__)
    {
    try
    {
    og__.throwUserException();
    }
    catch(Ice.UserException ex__)
    {
    throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
    }
    }
    IceInternal.BasicStream is__ = og__.istr();
    is__.startReadEncaps();
    mars.DTOIceOrder[] ret__;
    {
    int szx__ = is__.readAndCheckSeqSize(4);
    ret__ = new mars.DTOIceOrder[szx__];
    for(int ix__ = 0; ix__ < szx__; ++ix__)
    {
    IceInternal.ArrayPatcher<mars.DTOIceOrder> spx = new IceInternal.ArrayPatcher<mars.DTOIceOrder>("::mars :TOIceOrder", ret__, ix__);
    is__.readObject(spx);
    }
    }
    is__.readPendingObjects();//Ice.UnmarshalOutOfBoundsException
    is__.endReadEncaps();
    return ret__;
    }
    catch(Ice.LocalException ex__)
    {
    throw new IceInternal.LocalExceptionWrapper(ex__, false);
    }
    }
    finally
    {
    handler__.reclaimOutgoing(og__);
    }
    }


    thanks for your help

  2. #2
    ren-wei is offline Registered User
    Name: wei ren
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    21
    i find the problem.

  3. #3
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Glad you figure out this issue.

    UnmarshalOutOfBoundsException are usually due to a mismatch between the Slice definitions used by your client and server: see Why do I get an UnmarshalOutOfBoundsException? for details.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. .Net client problem with ADH cipher
    By aidin36 in forum Help Center
    Replies: 2
    Last Post: 04-27-2011, 03:48 AM
  2. multithread call of ICE JAVA client
    By stanley in forum Help Center
    Replies: 1
    Last Post: 09-08-2006, 12:34 AM
  3. Replies: 6
    Last Post: 12-20-2005, 11:00 PM
  4. use glacier to call back from server to client?
    By xiehua in forum Help Center
    Replies: 2
    Last Post: 02-19-2004, 08:22 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
  •