com.sun.corba.se.spi.servicecontext.ServiceContext Java Examples

The following examples show how to use com.sun.corba.se.spi.servicecontext.ServiceContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ServiceContexts.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #2
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ServiceContexts.java    License: Apache License 2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #3
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientRequestDispatcherImpl.java    License: Apache License 2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #4
Source Project: TencentKona-8   Author: Tencent   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #5
Source Project: TencentKona-8   Author: Tencent   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #6
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #7
Source Project: jdk8u60   Author: chenghanpeng   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #8
Source Project: jdk8u60   Author: chenghanpeng   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #9
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #10
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ServiceContexts.java    License: MIT License 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #11
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ServiceContexts.java    License: MIT License 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #12
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaClientRequestDispatcherImpl.java    License: MIT License 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #13
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #14
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #15
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #16
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #17
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #18
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #19
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #20
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #21
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #22
Source Project: hottub   Author: dsrg-uoft   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #23
Source Project: hottub   Author: dsrg-uoft   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #24
Source Project: hottub   Author: dsrg-uoft   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #25
Source Project: openjdk-8-source   Author: keerath   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #26
Source Project: openjdk-8-source   Author: keerath   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #27
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}
 
Example #28
Source Project: openjdk-8   Author: bpupadhyaya   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the given entry from the scMap to the OutputStream.
 * See note on giopVersion.  The service context should
 * know the GIOP version it is meant for.
 */
private void writeMapEntry(OutputStream os, Integer id, Object scObj, GIOPVersion gv) {

    // If it's still in byte[] form, we don't need to
    // unmarshal it here, just copy the bytes into
    // the new stream.

    if (scObj instanceof byte[]) {
        if (isDebugging(os))
            dprint( "Writing service context bytes for id " + id);

        OctetSeqHelper.write(os, (byte[])scObj);

    } else {

        // We actually unmarshaled it into a ServiceContext
        // at some point.
        ServiceContext sc = (ServiceContext)scObj;

        if (isDebugging(os))
            dprint( "Writing service context " + sc ) ;

        sc.write(os, gv);
    }
}
 
Example #29
Source Project: openjdk-8   Author: bpupadhyaya   File: ServiceContexts.java    License: GNU General Public License v2.0 6 votes vote down vote up
public ServiceContext get(Integer id)
{
    Object result = scMap.get(id);
    if (result == null)
        return null ;

    // Lazy unmarshaling on first use.
    if (result instanceof byte[]) {

        ServiceContext sc = unmarshal(id, (byte[])result);

        scMap.put(id, sc);

        return sc;
    } else {
        return (ServiceContext)result;
    }
}
 
Example #30
Source Project: openjdk-8   Author: bpupadhyaya   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
protected void getExceptionDetailMessage(
    CorbaMessageMediator  messageMediator,
    ORBUtilSystemException wrapper)
{
    ServiceContext sc = messageMediator.getReplyServiceContexts()
        .get(ExceptionDetailMessage.value);
    if (sc == null)
        return ;

    if (! (sc instanceof UnknownServiceContext)) {
        throw wrapper.badExceptionDetailMessageServiceContextType();
    }
    byte[] data = ((UnknownServiceContext)sc).getData();
    EncapsInputStream in =
            EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
                                  data, data.length);
    in.consumeEndian();

    String msg =
          "----------BEGIN server-side stack trace----------\n"
        + in.read_wstring() + "\n"
        + "----------END server-side stack trace----------";

    messageMediator.setReplyExceptionDetailMessage(msg);
}