Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java J2EE WebService WSDL
My current response is :
 
<?xml version="1.0" encoding="UTF-8"?>
 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://webservice.com/types/">
  <env:Body>
    <<i>ns0:ABCResponseElementResponse >
 
Required Output is :
 
<?xml version="1.0" encoding="UTF-8"?>
 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ">
  <env:Body>
    <ABCResponseElementResponse xmlns="http://webservice.com/types/>
      Result
    </ABCResponseElementResponse>
  </env:Body>
 </env:Envelope>
 
All I require is to remove the xmlns:ns0="http://webservice.com/types/" tag from the root and the prefix "ns0" from the response element and add a namespace tag to response output.
 
The WSDL I am using is :
 
<definitions
     name="WebService"
     targetNamespace="http://webservice.com/"
     xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:tns="http://webservice.com/"
     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
     xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
     xmlns:tns0="http://webservice.com/types/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservice.com/types/"
             elementFormDefault="qualified" xmlns:tns="http://webservice.com/types/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
            <element name="ABCResponseElementResponse" type="string" nillable="true" />
        </schema>
    </types>
.........
 
Kindly help me to know the changes I need to do in order to get desired response.
Posted 29-Jun-12 23:24pm

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 30 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100