I have a problem: I am trying to consume a SOAP API, and the request of the SOAP requires a value and an array list that contains many fields. I need to pass it to the API with the document name without any attributes, like this:
-- I need to delete it from document list
I have tried to drop it from the API itself, but unfortunately, this solution didn’t work, and I cannot modify the request after import Api as a wsdl file.
Could you please help me resolve this issue? Thank you.
Not sure what you mean by this. A screenshot would help a lot. If you need a certain data structure in a certain endpoint/service call, basically you need to match your object structure with your document. If you create an object and make that an array you will only have a list of that object. An example of the JSON you are trying to produce would help us understand what you need hence help you better.
Again not clear about what you mean by drop from the API. If you drop any object from the pipeline it is gone in next iteration, no exceptions. Is it possible you dropped them in a loop hence you are only dropping a single element from the list?
Kindly find the attached document clarifying the actual problem in the Soap UI. The request should pass as shown in the picture with the array container but without any element in the array. If you refer to the picture from the SAG Designer, you can find the array and the element in the array or the attribute of the array. I need to drop it when I see the picture three from the API documentation.
Unfortunately, we can’t drop or modify this file as per the API documentation. Can you please advise me on how we can solve this problem?
Kindly find the attached document clarifying the actual problem in the Soap UI. The request should pass as shown in the picture with the array container but without any element in the array. If you refer to the picture from the SAG Designer, you can find the array and the element in the array or the attribute of the array. I need to drop it when I see the picture three from the API documentation.
Unfortunately, we can’t drop or modify this file as per the API documentation. Can you please advise me on how we can solve this problem?
looks like a definition mismatch for me.
The array container is defined as “zero or more repetitions” in SoapUI, while it should be “zero or one” according to the Designer screenshot.
The content definition of the container is not shown in the SoapUI screenshot, but should be defined as “one or more” according to the Designer screenshots.
Therefore, when the array container is present, it should contain at least one content element.
You can then loop over the list of content elements.
The request contains element and this array,
this array maybe contains zero element or more than one element, but I need to pass the empty array because I don’t need to use the array as the input of the request i need to send the empty array always, but the owner of the Api put the validation on the Api to receive the array empty.
how we can solve this problem or modify the request after import the wsdl file for this Api .
in this case I would suggest you provide us the complete snippet of the schema section from WSDL where the array container arrayOfCardDataTypeUser_7 is defined (including subtype for cardDataTypeUser type).
Most likley you will have to discuss this with the API provider afterwards to correct the definition.