SoapUi generate soap for complextypes - soap

When generating a request using soapUi the tool will generate the soap request xml
But it will not expend complex types, instead it will just add:
<relations xsi:type="misc:ArrayOf_tns1_RequiredData" soapenc:arrayType="urn:RequiredData[]" xmlns:urn="urn:xeroxService"/>
Then its time consuming to understand how to expend this expression...
Is there any way around this? (using soapui 4.0.1 or 5.2.1)

Related

Is Rest-Assured api supporting SOAP

We are trying to perform tests using Rest Assured Api but we aren't getting success with the response. We sent a request but the response is a faultcode (xml). The same request was made successfully using Soapui.
So, we searched a lot, people say that rest assured supports SOAP and others says that doesn't support.
Anyone knows what is the truth? Supports or not?
While it does not specifically support SOAP protocol, nothing stops you from using RestAssured for SOAP Servers testing - because it is just sending and receiving XML over HTTP and RestAssured does this perfectly well.
To be honest, the fact that RestAssured is not specifically designed to support SOAP makes it even more valuable for error testing, which would be really difficult with SOAP-centered clients.
Here's more details how one can verify XML content: https://github.com/rest-assured/rest-assured/wiki/Usage#example-2---xml
Rest-Assured framework only supports testing REST services.
You can read the introductory post by Johan (Rest-Assured committer) in the below link:
https://www.jayway.com/2013/11/29/rest-assured-2-0-testing-your-rest-services-is-easier-than-ever/
Also in the source code of REST-Assured in Github, it is never mentioned about supporting SOAP services, or has code that supports it.
https://github.com/rest-assured/rest-assured
If you want a single framework supporting both REST and SOAP services try the following options.
http://www.citrusframework.org/
https://www.soapui.org/developers-corner/integrating-with-soapui.html
Currently, We are leveraging a REST API framework tool to automate large soap msgs for api testing, fundamentally rest and soap are same.
The only difference is SOAP msg payload is in xml and response is in xml, will have single header and single type of https request -POST.
you just have to write supporting utils for constructing payload and then processing response.

How to use WSDL file, parse SOAP message?

This is my first post here(pardon me if I'm vague).
Actually I've got a wsdl file (which have soap requests, schema, generates pojo) and my task is to
1) Integrate that with eclipse .
2) Send the request to the server.
3) get the response back.
4) And parse the response in Java.
And I'm not at all aware of where to start. Someone suggested of using Apache axis with eclipse (I'm not aware of that too).
Thank you for your help, And also please suggest what is the best way of parsing and how to parse a SOAP message that way in JAVA.
A demo will be so much appreciated.
Thank You.... and sorry if I'm expecting too much, I'm newbie :)
Create auto generated classes from WSDL. You can use various tools that help in generate classes from WSDL file ex: JAVAtoWSDL or ApacheAxis.
Once classes has been generated then you can parse request and create response with JAXB, that is marshall and unmarshall.

In SOAPUI service mocking, is there a way to generate representative values for response fields?

I am trying to develop a SOAP client for a service to which I don't yet have access. I have therefore loaded the wsdl into soapui and am using the soapui service mocking functionality.
When I generate a mock response, the values are always set to '?'. Is there any way to ask soapui to generate representative test values given the type of each field? (The response in question has about 500 fields, so this would be really nice..). Alternatively, is there another tool I could use to generate such a response from a wsdl?
Many thanks!
Ah - answered my own question. Go to preferences -> WSDL and check the box that say sample data for requests. Even though it says for requests, it also generates sample data for responses :-)

LoadUI and SoapUI and Rest API backend does not execute

I am currently using LoadUI and SoapUI for Load Testing a REST API. However each time I ran either my functional tests from SoapUI or my Load Tests based on the SoapUI project the backend code does not execute.
I expected to see the service doing what it was supposed to however nothing happens?
Is this normal behavior for Soap and LoadUI? Are they simply just simulating Load rather than executing the code?
I hope anyone can help me get out of this foggy area where I am at. Also it is the first time I am testing Web services.
Thanks in advance.

Generating soapUI Rest Service Mock

I created a REST service project in version 4.6.0, and added a mock. I'm not able to add an operation for the mock. I get..
No unique operations to mock in project!
I am able to directly modify the onRequest script and set the response status code for GET messages. However, when I switch to POST, which is what I really need, I get a SOAP fault string in the response:
org.apache.xmlbeans.XmlException: Missing/Invalid SOAP Envelope,
expecting [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]
How can I bypass soapUI's SOAP processing of the message? I'm trying to post a plain old XML message, not SOAP.
posting: <test></test>
As Temil Sanchez writes for a question asked on the soapUI forum:
Rest Mocking was not that fully supported in 4.6.3, the only
workaround for Rest Mocking in 4.6.3 is located here :
http://www.soapui.org/Getting-Started/mock-services.html
rest mocking becomes much easier to do in our SoapUI 5.0 Release which
should be available on April 1st. In the meantime we have a Beta that
you can try here:
http://forum.soapui.org/viewtopic.php?f=2&t=23529