How to pass CDATA flag into JSON ZEEP SOAP XML request - json

I am trying to pass CDATA flag to a SOAP request using the Python library Zeep, but Zeep ignores the field(s) with CDATA and so the search is too broad and the returned data is much larger than I want. Unfortunately sub-selecting the dataframe with pandas later on is not an option, otherwise all would be well.
The request is a query against an SQL server DB, and I can retrieve the data with SOAP UI with the following:
<soapenv:Envelope xmlns:soapenv="" xmlns:wsc="">
<![CDATA[<timestamp_field>>2019-04-22 00:00:00.000</timestamp_field>]]>
For some reason a date field works fine, but the timestamp requires the use of CDATA, otherwise I get an error. Hence my SO question; how do I achieve the same with Zeep? I think this means that I have to pass CDATA flag into a JSON.
I have looked through SO, GitHub and Zeep documentation, but nowhere can I find an example of passing CDATA into Zeep, or passing CDATA flags into a JSON, which is then used to create the SOAP XML request.
Is passing CDATA into a JSON even possible? Perhaps someone knows how to pass the exact xml envelope I showed above into Zeep (taking into account that the above does not have the WSDL URI that defines the service)?
Here is a full example script
An example WSDL schema
And... XML request and response
Basically I set up the service , form a JSON for the request creation, and pass it under arg0.
from zeep import Client
import zeep
from zeep.transports import Transport
searchTerm = 'ns0:metaWsSearchRequest'
wsdl_url = 'some_url'
XML_viewname = 'SOMENAME'
transport = Transport(timeout=600)
zeep_client = Client(wsdl=wsdl_url, transport=transport)
# I am looking for the correct way to structure this JSON request if I have to pass CDATA
find_criteria_filled = {
'userName': user,
'password': pwd,
'sessionId': None,
'criteria': {
'<![CDATA[some_column_name3]]>': '2019-04-22 00:00:00.000',
'some_column_name1': 'CS'
'maxRows': '1'
response =
The request ends up omitting some_column_name3, and so the search is incorrect. Instead of showing one records for the 22nd, it returns the first record for the search on 'some_column_name1': 'CS', which happens to have the date 2019-04-25.
I tried these combinations without luck:
'': '2019-04-22 00:00:00.000'
'![CDATA[some_column_name3]]': '2019-04-22 00:00:00.000'
'some_column_name3': ''
Any help would be really appreciated. Thank you.


send XML data to server from JS and get XML parameter

In Javascript I can send XML string to JSP server (XmlAction.jsp):
Javascript Code:
var xmlDocument = "<?xml version="1.0" encoding='ISO-8859-1'?>
var httpRequest;
httpRequest = new XMLHttpRequest();'POST', "", false);
My question: How can I get XML data in JSP Page XmlAction.jsp ?
Can you give me some java code.
Thank all ^^
Call request.getInputStream() to get a stream of the submitted XML body, and pass it to whatever XML parser you plan to use (eg. for DOM an implementation of DocumentBuilder.parse(stream), which you might get from javax.xml.parsers.DocumentBuilderFactory).
Having a non-web-form (application/x-www-form-urlencoded, multipart/form-data) POST body is slightly unusual for Servlet/JSP but should work okay. Just make sure nothing is calling methods like getParameter() which expect web form input, and will get confused if you've already read the input stream.
[aside: do you really mean ISO-8859-1? If you send Unicode characters in a body with XMLHttpRequest.send(), they will be encoded as UTF-8, which won't match your XML declaration.]

Melissa Data XML Request not giving latitude and longitude in response

I have an application that uses WebObjects to send an XML request to Melissa in order to get location data given an address. The response accurately provides things like the delivery point code and delivery point check digit. The request is sent like so, using the request XML for the value of s:
NSData requestContent = new NSData(s.toString().getBytes());
WORequest request = new WORequest("GET", "/xml.asp", "HTTP/1.1", null, requestContent, null);
WOHTTPConnection httpConnection = new WOHTTPConnection("", 80);
httpConnection.setReceiveTimeout(1000 * 10); // wait only 10 seconds
// for response
if (httpConnection.sendRequest(request)) {
As an example, I can send the following XML request to look up the address 3510 Marvin Rd NE, Olympia, WA:
<?xml version="1.0" ?>
<CustomerID>[some ID]</CustomerID>
<Address>3510 Marvin Rd NE</Address>
...and I get the following XML response from Melissa:
<Address>3510 Marvin Rd NE</Address>
It seems to get all of the correct location information that I'm interested in except for Latitude and Longitude. In the tutorials I've looked at for Melissa XML requests, everything seems to be formatted the same way I have it, and in this Melissa example app, I'm able to get correct latitude and longitude data using the same test address. I've also tried putting in dummy values for latitude and longitude with the request, but these end up being unchanged. How can I format my request so that the response will give me latitude and longitude?
As it turned out, the problem had to do with the subscription to Melissa. It was solved by upgrading the subscription so that it would be possible to get latitude and longitude from XML queries.

Inserting xml node values from reading a file in soap ui

I have a requirement where there is an xml in my file system and I have to read tag values from that xml and populate in my soap request. I have totally no idea how do I do this.
I wrote a groovy script to read file:
File file = new File("C:/Users/Desktop/abc.txt")
fileContent = file.getText()
Now I want to read tag values from my source xml and populate in my soap request xml tags.
My sample xml is
<soapenv:Envelope xmlns:soapenv="" >
I have to read message_id from my sample xml into my soap request message id. Can someone guide how can i do this?
Here is the groovy script to extract the Message ID from the given file
Note that the sample you have provide does not have the proper data, missing namespaces.
//change the file path here
def xml = new File('/absolute/file/path').text
def holder = new XmlHolder(xml)
def messageId = holder.getNodeValue('//*:MESSAGE_ID')
assert messageId, "Message Id is empty or null" "MessageId is : ${messageId}"
If you need the messageId to be used in other steps of the same test case, please store it in a test case level property using below additional statement:
context.testCase.setPropertyValue('MESSAGE_ID', messageId)
Later you can use in other steps (except groovy) as ${#TestCase#MESSAGE_ID}
Use it in another groovy script of same test case as context.expand('${#TestCase#MESSAGE_ID}')

How to extract SOAP response using pysimplesoap?

I am new on using pysimplesoap. I am succeed using pysimplesoap to generate a soap request to a SOAP server, and the soap server is responded correctly, however, I do not know how to extract the information returned.
This is my code on pysimplesoap for the request
> from pysimplesoap.client import SoapClient
> client = SoapClient(location="", action="", namespace="", ns="ns3")
> response ="login", ("ns3:loginName", "administrator"), ("ns3:password", "admin"))
The SOAP response is in below format.
I tried to use the print response or print (response), but nothing show up.
The response object is a pysimplesoap.client.SimpleXMLElement.
Behind the hood, a print(response) will call its __str__() method, the choice have been made, for pysimplesoap that `__str__() returns the text content of the node (if any), if your node contains no text content, like :
<child tag attr="value />
… then, __str__() will return nothing, and so do printing.
Alternatively, you may want to
navigate the XML tree of your answer by using SimpleXMLElement methods :
children() to grab childrens list
tag['attr'] (dict notation) to access attributes of an XML tag
tag.get_name() to get a tag name ;
inspect the full answer as a string (including Soap headers) as string calling repr(response), but it's more for debugging purposes.
See also the basic client documentation online.

Can I create a soap request with multiple elements of the same type?

I'm having a problem with my soap request. This is the code that creates the request:
[return: MessageParameter(Name = "Dealer")]
List<Dealer> GetDealer(String AccountNumber);
This is the request that is generated:
but I need to be able to request multiple AccountNumbers.
Does someone know how to do this without creating a list for AccountNumber because then I'll get an extra element in AccountNumber.
So the request must be like this: