Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a web service hosted on Java server(i think so) of Income tax India E-Filing (Service manual) ,Here's service url , the service works properly in java but using it with .Net it throws exception. I am passing:

1.UserID(string),
2.Pass(string),
3.Certificate chain(string)
4.Signature(string)
5.Xml zip file(byte[])

This throws exception "Please provide zip file".
I googled hard and find that:

1. Endianness: Java stores things internally as Big Endian, while .NET is Little Endian by default.
2. Signedness: C# bytes are unsigned. Java bytes are signed.So the byte[] of zip file may not be recognized at server-side.


My code is given below:

C#
DITWSAuthInfo authInfo = new DITWSAuthInfo();
authInfo.userID = "######";
authInfo.password  = "######";
authInfo.certChain  = "######";
authInfo.signature = "######";
string filePath = @"D:\Created XML\abc.zip";
byte[] byteArray = File.ReadAllBytes(filePath);
itrservice.submitITRRequest obj = new submitITRRequest();
obj.DITWSAuthInfoEle = authInfo;
obj.itrXMLFile = byteArray;
var res = uploadXML.submitITR(obj);
String TokenNumber = res.DITWSResponseEle.result;
MessageBox.Show(TokenNumber);

This throws error

please provide a zip file

Can you please help me to upload xml zip file?
Thanks in advance
Posted
Comments
Member 1737339 27-Jul-14 3:07am    
Hey Kalpesh,

I am also facing same problem.Have you found any solution.

Can you please help me since i am stuck.....

1 solution

Hey Kalpesh,

I am also facing same problem.Have you found any solution.

Can you please help me since i am stuck.....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900