locked
To remove a element tag from WSDL RRS feed

  • Question

  • User-665585339 posted

    Hi guys,

    I using NET 4.0 t create a web services let say mypage.asmx

    After i hosted it to IIS, for example

    http://xxxxx/xxxx/mypage.asmx

    Then i tried to view my web services page WSDL content, like http://xxxxx/xxxx/mypage.asmx?wsdl

    All the WSDL content will display, can someone tell me how to remove or customize certain element tag inside my WSDL content, for the page mypage.asmx???

    Tuesday, August 13, 2013 6:10 AM

All replies

  • User1320044578 posted

    web service can not be used as web page you need to create a web project and consume web service to display what you want to show.

    Tuesday, August 13, 2013 9:05 AM
  • User-665585339 posted

    My web service soap response to client as below:-

    HTTP/1.1 200 OK
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: length
    
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <SmsReceptionResponse xmlns="http://www/sms/local">
          <SmsReceptionResult>
            <SmsReceptionResponse />
          </SmsReceptionResponse>
        </SmsReceptionResult>
      </soap12:Body>
    </soap12:Envelope>



    Can i remove
      <SmsReceptionResult>
      </SmsReceptionResult>


    Because when client invoke my services, they expected my soap response only as below:-

    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <SmsReceptionResponse xmlns="http://www/sms/local">
            <SmsReceptionResponse />
          </SmsReceptionResponse>
      </soap12:Body>
    </soap12:Envelope>
    Tuesday, August 13, 2013 10:53 AM
  • User1320044578 posted

    Have tried to consume service at your end . Any error you are getting?

    Tuesday, August 13, 2013 12:07 PM
  • User-665585339 posted

    There is no error on client side, just that, they expected to remove <SmsReceptionResult> </SmsReceptionResult> in my SOAP response to them

    Tuesday, August 13, 2013 10:40 PM
  • User-665585339 posted

    Hi,

    Basically below is the situation:-

    My soap response to client called are:-

    <?xml version="1.0" encoding="utf-8"?>
    <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>
        <SmsResponse xmlns="http://www.csapi.org/schema/local">
          <SmsResponse />
        </SmsResponse>
      </soap:Body>
    </soap:Envelope>

    How can i modify the soap response in coding, for example to return response as below:-

    <?xml version="1.0" encoding="utf-8"?>
    <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>
        <SmsResponse xmlns="http://www.csapi.org/schema/local">
      </soap:Body>
    </soap:Envelope>

    is it possible?

    Wednesday, August 14, 2013 7:34 AM