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 8389783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:48:53+00:00 2026-06-09T18:48:53+00:00

I have a wsdl and xsd files and want to create SOAP request to

  • 0

I have a wsdl and xsd files and want to create SOAP request to web server on python. I have never worked with soap before so my question probably simple but I spend the four hours and havn’t found the solution.

I try two ways: low level request and KSOAP2 on Android.

wsdl

    <wsdl:message name="<some request>">
    <wsdl:part element="txh:<some request>" name="parameters"/>
</wsdl:message>
<wsdl:message name="<some response>">
    <wsdl:part element="txh:<some response>" name="parameters"/>
</wsdl:message>

xsd

    <xs:element name=""<some request>">
    <xs:annotation>
        <xs:documentation>"<text>"</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:sequence>
            <xs:element name="mode" type="response-mode"/>
        </xs:sequence>
    </xs:complexType>
</xs:element>
<xs:element name="<some response>">
    <xs:complexType>
        <xs:annotation>
            <xs:documentation>"<text>"</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="<text>"/>
            <xs:element name="<another text>" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="<name a>" type="xs:int"/>
                        <xs:element name="<name b>" type="xs:int"/>
                        <xs:element name="<name c>" type="xs:int"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

Code in Android:

private final static String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                         "<SOAP-ENV:Envelope " +
                         "xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
                         "xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" " +
                         "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
                         "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
                        "<SOAP-ENV:Header>" +
                        "</SOAP-ENV:Header>" +
                        "<SOAP-ENV:Body xmlns:ns1=\"<namespace>\">" +
                        "    <xs:element name=\"<request>\"> " +
                        "<xs:annotation>" +
                            "<xs:documentation>"<text>"</xs:documentation>" +
                        "</xs:annotation>" +
                        "<xs:complexType>" +
                            "<xs:sequence>" +
                                "<xs:element name=\""<text>"\" type=\"response-mode\"/>" +
                            "</xs:sequence>" +
                        "</xs:complexType>" +
                    "</xs:element>" +
                        "</SOAP-ENV:Body>" +
                        "</SOAP-ENV:Envelope>";



 public Entity execute(final String body) {
    Log.d(TAG, "Start request ");
    Entity result = new Entity();
    AndroidHttpClient client = AndroidHttpClient.newInstance(TAG);
    HttpParams params = client.getParams();
    HttpConnectionParams.setConnectionTimeout(params, 10000);
    HttpConnectionParams.setSoTimeout(params, 15000);
    HttpProtocolParams.setUseExpectContinue(params, true);

    HttpPost post = new HttpPost(url);
    post.setParams(params);
    post.setHeader("soapaction", NAMESPACE.concat("/").concat(METHOD));
    post.setHeader("Content-Type", "text/xml; charset-utf8");
    try {
        String request = createRequest(xml);
        HttpEntity entityToRequest = new StringEntity(request);
        post.setEntity(entityToRequest);
        Log.d(TAG, post.toString());

        HttpResponse response = client.execute(post);
        final int status = response.getStatusLine().getStatusCode();
        if (HttpStatus.SC_OK == status) {
            HttpEntity entity = response.getEntity();
            String str = EntityUtils.toString(entity);
            Log.d(TAG, str);
        }

    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

On this request I get a 500 server code, so I suppose that the issue in my request. Do you think that it is formed well?

  • 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-09T18:48:54+00:00Added an answer on June 9, 2026 at 6:48 pm

    I have found the solution. The soupUI and similar instruments can help to understand a structure of your soap rtequests.

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

Sidebar

Related Questions

I have WSDL and XSD files and want implement a webservice based on this
I have created two wsdl files with shared types imported from xsd schema file.
Folks, I have some HTML generated from my WSDL and XSD files for a
I have multiple WSDL/XSD files and using JAXB I'm generating it's clients. But there
I need to create a wsdl without the extras xsd files as external files,
I have a wsdl file for the Web service. I want to test the
I have a library I am creating based on some WSDL/XSD definitions. I am
Here is the situation. I have received a WSDL (and included XSD) from someone
I have an WSDL / Web Service and I need to generate an set
I have a WSDL 1.1 file which describes my Web Service. Now I need

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.