I have built .NET 1.1 Web Service which should accept files and save them.
Here is the code of the webmethod:
    [WebMethod]
  public bool SaveDocument(Byte[] docbinaryarray, string docname)
  {
   string dirPath = @"C:\Temp\WSTEST\";
  开发者_如何转开发 if(!Directory.Exists(dirPath))
   {
    Directory.CreateDirectory(dirPath);
   }
   string filePath = dirPath + docname;
   FileStream objfilestream = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite);
   objfilestream.Write(docbinaryarray, 0, docbinaryarray.Length);
   objfilestream.Close();
   return true;
  }
When I make a client in .NET with reference to this Web service everything goes great, but when a colleague of mine tries to send me a file from a JAVA client I don't get the actual file. All I get is byte array with only one element.
Definition of byte array for file, in WSDL looks like this:
<s:element minOccurs="0" maxOccurs="1" name="docbinaryarray" type="s:base64Binary" /> 
He sends me base64binary and fails every time. All I get is Byte array with only one element inside.
Sounds like the bug is in the java -- or at least the java is not sending what the .net service expects. Can we see the java code?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论