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

  • Home
  • SEARCH
  • 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 6555017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:46:07+00:00 2026-05-25T12:46:07+00:00

I have created a simple web service using Java and axis 2. The output

  • 0

I have created a simple web service using Java and axis 2. The output i am getting is as follows,

Input-
http://localhost:8088/Newwww/services/NewFile/newFile?s=New%20data3

Output-

<ns:newFileResponse xmlns:ns="http://Services.tcs.com">
- <ns:return>
- <TestData>
  <testData1>New data1</testData1> 
  <testData2>New data2</testData2> 
  <testData3>New data3</testData3> 
  </TestData>
  </ns:return>
  </ns:newFileResponse>

How can i remove the tags starting with ns:
In short i want the response to be only

<TestData>
  <testData1>New data1</testData1> 
  <testData2>New data2</testData2> 
  <testData3>New data3</testData3> 
  </TestData>

My WSDL file looks like this

<?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://Services.tcs.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://Services.tcs.com">
  <wsdl:documentation>Please Type your service description here</wsdl:documentation> 
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://Services.tcs.com">
- <xs:element name="newFile">
- <xs:complexType>
- <xs:sequence>
  <xs:element minOccurs="0" name="s" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
- <xs:element name="newFileResponse">
- <xs:complexType>
- <xs:sequence>
  <xs:element minOccurs="0" name="return" nillable="true" type="xs:anyType" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
  </wsdl:types>
- <wsdl:message name="newFileRequest">
  <wsdl:part name="parameters" element="ns:newFile" /> 
  </wsdl:message>
- <wsdl:message name="newFileResponse">
  <wsdl:part name="parameters" element="ns:newFileResponse" /> 
  </wsdl:message>
- <wsdl:portType name="NewFilePortType">
- <wsdl:operation name="newFile">
  <wsdl:input message="ns:newFileRequest" wsaw:Action="urn:newFile" /> 
  <wsdl:output message="ns:newFileResponse" wsaw:Action="urn:newFileResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="NewFileSoap11Binding" type="ns:NewFilePortType">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
- <wsdl:operation name="newFile">
  <soap:operation soapAction="urn:newFile" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="NewFileSoap12Binding" type="ns:NewFilePortType">
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
- <wsdl:operation name="newFile">
  <soap12:operation soapAction="urn:newFile" style="document" /> 
- <wsdl:input>
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="NewFileHttpBinding" type="ns:NewFilePortType">
  <http:binding verb="POST" /> 
- <wsdl:operation name="newFile">
  <http:operation location="NewFile/newFile" /> 
- <wsdl:input>
  <mime:content type="text/xml" part="newFile" /> 
  </wsdl:input>
- <wsdl:output>
  <mime:content type="text/xml" part="newFile" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="NewFile">
- <wsdl:port name="NewFileHttpSoap11Endpoint" binding="ns:NewFileSoap11Binding">
  <soap:address location="http://localhost:8088/Newwww/services/NewFile.NewFileHttpSoap11Endpoint/" /> 
  </wsdl:port>
- <wsdl:port name="NewFileHttpSoap12Endpoint" binding="ns:NewFileSoap12Binding">
  <soap12:address location="http://localhost:8088/Newwww/services/NewFile.NewFileHttpSoap12Endpoint/" /> 
  </wsdl:port>
- <wsdl:port name="NewFileHttpEndpoint" binding="ns:NewFileHttpBinding">
  <http:address location="http://localhost:8088/Newwww/services/NewFile.NewFileHttpEndpoint/" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

Thanks..

  • 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-05-25T12:46:07+00:00Added an answer on May 25, 2026 at 12:46 pm

    There is no direct way to do this. There are two options.

    1. Use the contract first approach[1].

    There you need to modify the generated wsdl for suite for you or create a new one and generate the code for that using wsdl2java tool and deploy the service.

    1. Use an ESB to do the transformation of the response.

    Here you can create a proxy service in the ESB and do any transformation of the response at the out sequence[2].

    [1] http://wso2.org/library/2873
    [2] http://wso2.org/project/esb/java/4.0.0/docs/samples/message_mediation_samples.html#Sample8

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

Sidebar

Related Questions

I have created a simple web-service using Java. i want to load jars related
I have created some simple app in Java, and 'deployed' it using Java Web
i have created a simple web service using Php Nusoap. its working correctly but
I have created a REST web service using WCF and use HTTP Post Method.
Could someone help me on this, I have created simple web services using axis2
I have created a simple web browser using c# and I want to block
We have to create a web service client using Apache CXF in Java. The
I have created an Ajax enabled WCF web service that contains this simple method:
I have a simple Java web application using HSQLDB embedded database. The application is
I have created a C# web service using visual studio to stop the windows

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.