Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从C#调用Java webservice试图将C#中的长值发送到Java中的长值_Java_C#_Web Services_Types_Glassfish 2.x - Fatal编程技术网

从C#调用Java webservice试图将C#中的长值发送到Java中的长值

从C#调用Java webservice试图将C#中的长值发送到Java中的长值,java,c#,web-services,types,glassfish-2.x,Java,C#,Web Services,Types,Glassfish 2.x,我是一名C#开发人员,正在从事一个项目,在这个项目中,我需要调用一个Java Web服务,该服务需要一个长值作为传递给方法的对象的属性。看起来是这样的: public long routeDocument(long sDocID, string sRoutee) { DREService.QueueDocument newQDoc = new DREService.QueueDocument(); newQDoc.documentId = sDocID; newQDoc

我是一名C#开发人员,正在从事一个项目,在这个项目中,我需要调用一个Java Web服务,该服务需要一个长值作为传递给方法的对象的属性。看起来是这样的:

public long routeDocument(long sDocID, string sRoutee)
{
    DREService.QueueDocument newQDoc = new DREService.QueueDocument();

    newQDoc.documentId = sDocID;
    newQDoc.routee = "tracyr";

    DREService.dre oSoapClient = new DREService.dre  { Url = _URI };

    try
    {
            oSoapClient.createQueueDocument(ref newQDoc, null);
    }
    catch (Exception ex)
    {
            //return "ERROR: " + ex.Message;
    }

    return newQDoc.id;
}
话虽如此,当我逐步阅读代码并查看对象属性“newQDoc.documentId”时,它被正确设置,但在Fiddler中,该属性根本没有显示在post上,Java服务从未收到它。我们编写了一个小测试工具,我们也遇到了同样的问题。我猜.net不知道如何处理复杂类型Long,服务的xsd将其定义为Long,因此它试图将Long数据类型发送到Long复杂类型。我的问题是,在Java中,有没有一个技巧可以将.net中的long发送到long?(请记住,两个开发人员都是内部人员,因此如果Java端需要更改某些内容,我们也可以这样做)

我们已经将测试工具集更改为long,并且它确实正确地将其装箱为long,但是Java人员认为更改会导致其他调用客户端的应用程序出现问题


在此感谢您的帮助

你能把它当作绳子传递吗?