Skip to content

How to remove xml declaration from request body #147

@lospejos

Description

@lospejos

I need to build a request without xml declaration.
Using example code from main wslite page, I got SOAP request body:

POST /Holidays/US/Dates/USHolidayDates.asmx HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: http://www.27seconds.com/Holidays/US/Dates/GetMothersDay
Connection: Close
Accept-Encoding: gzip
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.8.0_172
Host: www.holidaywebservice.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Length: 314

<?xml version='1.0' encoding='UTF-8'?>
<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/'>
  <soap-env:Header />
  <soap-env:Body>
    <GetMothersDay xmlns='http://www.27seconds.com/Holidays/US/Dates/'>
      <year>2011</year>
    </GetMothersDay>
  </soap-env:Body>
</soap-env:Envelope>

I need to build a request without xml declaration in its body. Is it real to do using DSL style (I know I can pass the raw string as request body but searching for more high level approach)? Could you give an example?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions