WSDL Project---Adding header information and attachments

Source: Internet
Author: User
Tags soapui

the SOAP request for the underlying protocol is HTTP, and you can add two custom HTTP headers (for example, for authentication or session) and attachments. Let's take a look at these two.

1. Custom HTTP Headers

To add a custom HTTP header directly:

We have added a custom content type header that overrides the standard content type for the SOAP request ("text/ Xml;charset = Utf-8 "). Send the request, the viewer displays the original request

Of course you can add as many header information as you want, you can include the Extended property value

The corresponding response tag shows all HTTP header information:

2. Annexes and inline Documents

SOAPUI supports the following technologies for processing files and attachments:

  • MTOM techniques for optimizing the transmission of binary data in--soap messages
  • soap with attachments according to the attachment information--mime-based attachment is the soap/http binding mechanism
  • Binary content Inline file--soapui the simplification of specific functions for processing binary message content

mtom and inline files all require internal processing, You can disable the Web service for a better performance request Details tab. Also, when this feature is disabled, SOAPUI will no longer need to load the WSDL definition (cache or remote) before sending the request.

attachment at the bottom of the request Editor: Soapui Manage Attachments tab

The circled left property is all about how to handle attachments.

Let's start with a simple example, The following message defines a claimimage element that contains base64 data:

We refer to using   Cid:  symbol, set its type to" content ". When we choose to add a file cache to the project file for easy redistribution of the test (otherwise soapui stores the absolute path name column of the attachment). If we now send this request and look at the original Request tab, we see:

Here you can see that the file is read and converted to Base64 data. If we want to send a file using Mtom, we can enable this left-hand message in the properties, give us

WSDL Project---Adding header information and attachments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.