1

I have an issue..

I am passing the image as the parameter to my webservices that is being build on .NET, but it returns me the error from the webservices. I am not been able to understand y this is happening.

This is my function in Android thru which I call the webservices.

 public ArrayList<String> HttpClient(String oid,String Base64)
 {

  SoapObject Request=new SoapObject(NAMESPACE,METHOD_NAME);
        Request.addProperty("oid",oid);
        Request.addProperty("base64",Base64.replaceAll("/","#"));

        SoapSerializationEnvelope soapEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
        soapEnvelope.dotNet=true;
        soapEnvelope.setOutputSoapObject(Request);

        AndroidHttpTransport aht=new AndroidHttpTransport(URL);
        try
        {

         aht.call(SOAP_ACTION,soapEnvelope);
         resultString = (SoapPrimitive) soapEnvelope.getResponse();

     System.out.println(resultString.toString());

        }

And this is my function in webservices that is in C#.NET

[WebMethod]
    public void UpdateImage2Database_FromBase64String(string base64, int oid)
    {
        try
        {

            SqlConnection conn = new SqlConnection(cConnectionString);
            try
            {
                conn.Open();
                //SqlCommand cmd = new SqlCommand("Update CCOD_ORDERHDR" +
                //                                 " SET FLD_ORDERHDR_IMAGECAPTURE=@FLD_ORDERHDR_IMAGECAPTURE" +
                //                                 " Where FLD_ORDERHDR_ID=" + oid,
                //                                 conn);

                SqlCommand cmd = new SqlCommand("Update CCOD_ORDERHDR" +
                                                 " SET FLD_ORDERHDR_IMAGECAPTURE='" + base64 + "' Where FLD_ORDERHDR_ID=" + oid,
                                                 conn);
                //cmd.Parameters.Add("@FLD_ORDERHDR_IMAGECAPTURE", image);
                cmd.ExecuteNonQuery();
            }
            finally
            {
                conn.Close();
            }

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

datatype in my database is text.

please help me.

Any suggestions will be accepted.

Thanks

1
  • Can you include the error message in your post? Commented May 5, 2011 at 17:41

1 Answer 1

1

I got the answer the issue was there is the low space on the server, that is why it is creating the problem and giving me the exception in Android services. Now it works fine.

Thanks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.