Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9061661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:32:31+00:00 2026-06-16T15:32:31+00:00

I have webservice that has more than one method. I use firefox soaclient plugin

  • 0

I have webservice that has more than one method. I use firefox soaclient plugin for test them. All methods work properly. These are normal until now. I wrote library on android for call these .net webservice. I have methods, first one prepares envelop, the other one calls method. All methods except one work with these way. I get prepared envelop from my lib for method that doesn’t work and use this envelope on firefox soap client, it returns me response in correct way. My own method that calls web service doesn’t work wrong, just return empty result. What could be the error?

enter image description here

private void createEnvelope() {
    // Her bir parametrenin kalıbı
    String params = "<%s>%s</%s>";
    // Her parametre kalıbına değer atandığında geçici olarak tutulan string
    String paramsTemp = "";
    // Hazırlanan tüm parametrelerin tutulduğu değişken
    String paramsAll = "";

    // Parametreler ekleniyor
    for (int i = 0; i < parameterKeys.size(); i++) {
        paramsTemp = String.format(params, parameterKeys.get(i),
                parameterValues.get(i), parameterKeys.get(i));
        paramsAll += paramsTemp;
    }

    // soap mesajını hazılıyoruz
    String soapTemplate = "<?xml version=\"%s\" encoding=\"%s\"?>"
            + "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
            + "<soap:Body>" + "<%s xmlns=\"%s\">" + "%s" + "</%s>"
            + "</soap:Body>" + "</soap:Envelope>";
    envelope = String.format(soapTemplate, version, charEncoding,
            methodName, namespace, paramsAll, methodName);
    Logger.log("request:" + envelope);
}


public String callWebService() {

    createEnvelope();
    // request parameters
    HttpParams params = httpClient.getParams();
    HttpConnectionParams.setConnectionTimeout(params, connectionTimeOut);
    HttpConnectionParams.setSoTimeout(params, soTimeOut);

    // set parameter
    HttpProtocolParams.setUseExpectContinue(httpClient.getParams(), true);

    // POST the envelope
    HttpPost httppost = new HttpPost(url);

    // add headers
    httppost.setHeader("SOAPAction", soapAction);
    httppost.setHeader("Content-Type", contentType);

    try {

        // the entity holds the request
        HttpEntity entity = new StringEntity(envelope);
        httppost.setEntity(entity);

        // Response handler
        ResponseHandler<String> rh = new ResponseHandler<String>() {
            // invoked when client receives response
            public String handleResponse(HttpResponse responseTemp)
                    throws ClientProtocolException, IOException {

                // get response entity
                HttpEntity entity = responseTemp.getEntity();
                StatusLine statusLine = responseTemp.getStatusLine();

                // read the response as byte array
                StringBuffer out = new StringBuffer();
                byte[] b = EntityUtils.toByteArray(entity);

                // write the response byte array to a string buffer
                out.append(new String(b, 0, b.length));
                return out.toString();
            }
        };

        response = httpClient.execute(httppost, rh);

    } catch (Exception e) {
        Log.v("Soap Service Exception:", e.toString());
    }

    // close the connection
    httpClient.getConnectionManager().shutdown();
    return response;
}

EDIT

Request template on logcat:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <Method_Name xmlns="url">
         <param1>12345</param1>
         <param2>ügıtç</param2>
         <param3>qwert</param3>
      </Method_Name>
   </soap:Body>
</soap:Envelope>

response template on logcat

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <Method_Name_Response xmlns="url">
         <Method_Name_Result>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
               <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
                  <xs:complexType>
                     <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="Temp">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element name="response1" type="xs:long" minOccurs="0" />
                                 <xs:element name="response2" type="xs:string" minOccurs="0" />
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:choice>
                  </xs:complexType>
               </xs:element>
            </xs:schema>
            <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" />
         </Method_Name_Result>
      </Method_Name_Response>
   </soap:Body>
</soap:Envelope>

response template on firefox plugin with same envelope

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <Method_Name_Response xmlns="url">
         <Method_Name_Result>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
               <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
                  <xs:complexType>
                     <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="Temp">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element name="response1" type="xs:long" minOccurs="0" />
                                 <xs:element name="response2" type="xs:string" minOccurs="0" />
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:choice>
                  </xs:complexType>
               </xs:element>
            </xs:schema>
            <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
               <NewDataSet xmlns="">
                  <Temp diffgr:id="Temp1" msdata:rowOrder="0">
                     <response1>123456789</response1>
                     <response2>Android</response2>
                  </Temp>
               </NewDataSet>
            </diffgr:diffgram>
          </Method_Name_Result>
      </Method_Name_Response>
   </soap:Body>
</soap:Envelope>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:32:33+00:00Added an answer on June 16, 2026 at 3:32 pm

    I found my problem, Turkish characters causes the error. When I use “ü” it causes error, when I don’t use it, it works perfect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

rather than use something like yepnope.js is there a simple method/decent plugin that can
I have a WebService that when I use the instance of this webservice, occurs
I have a webservice method that reads a photo and returns its byte data.
I have a web service client that has an Authenticator class. The Authenticator requires
I have a simple web service that has an API third party developers are
We have this software that has a webservices component. Now, the administrator of this
I have a webservice that I want to query for updates immediately after a
I have a WebService that returns XML in a SOAP response: <?xml version=1.0 encoding=utf-8
I have a webservice that returns a list of Clinics near a certain lat/long.
I have a webservice that produce XML result. I have been working on this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.