Soap UI: org.apache.xmlbeans.XmlException: error: does not close tag | Even after using ?wsdl and changing proxy settings - soap

In Soap UI 5.5, When i import wsdl directly then i get following error:
Error loading [https://dev.ataccama.online/api/rdm/get_table_export?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: does not close tag .
This is how i am using wsdl
This URL works fine when open directly:
In Proxy Settings, I have done following (Automatic and manual but same error):
Following are my wsdl settings:
When i download wsdl and import then it works.
All available tweaks like add ?wsdl or proxy change not working.

Related

https rest request works in browser and postman not from soap ui

I am trying to hit a rest api, it works fine from browser and postman. But when I try from SOAP UI it throwing "javax.net.ssl.SSLException: Received fatal alert: protocol_version".
I updated SoapUI-5.3.0.vmoptions with this property
-Dsoapui.https.protocols=SSLv3,TLSv1.2. Now its throwing "javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure".
Could you please help me in resolving this issue
I'd rather avoid SSLv3 and activate TLSv1.1 instead : -Dsoapui.https.protocols=TLSv1.1,TLSv1.2
Got it working by following below options based on some other threads.
We need to remove below line from "C:\Program Files\SmartBear\SoapUI-5.3.0\bin\soapui.bat" and use the same to launch soap ui.
if exist "%SOAPUI_HOME%..\jre\bin" goto SET_BUNDLED_JAVA
once we remove that it executes below line from the bat file, it uses our system java which has solved issue.
if exist "%JAVA_HOME%" goto SET_SYSTEM_JAVA

openui5 sdk test suite page fails with response error 404

Using either locally installed openui5-sdk-1.18.10 or here https://openui5.hana.ondemand.com/#resources/testsuite/welcome.html, when trying to access the testsuite, the response is HTTP Status 404 - Resource could not be found!
It seems the referenced link is currently invalid. Try the following instead:
SAPUI5:
https://sapui5.hana.ondemand.com/sdk/resources/testsuite
OpenUI5:
https://openui5.hana.ondemand.com/resources/testsuite

Getting an error while invoking a REST service using Javascript

I have developed a REST Web service to get resources, I am able to access it through Java/Spring Template and even the xml response is coming if I type the URI on browser.
But when I invoke the same URI using XMLHttpRequest in Java script I am getting the below error.
"XMLHttpRequest cannot load URI(actual uri with server name ..etc) . Origin file:// is not allowed by Access-Control-Allow-Origin."
Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101.
My JS code is as below.
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", "http://localhost:8080/rest/apps", false );
xmlHttp.send( null );
Please let me know what would be the problem and help me to resolve this.
Regards,
Sreedhar
here Origin is the local file system, that you're loading the HTML page, that load call via a file:/// . the request is from the same origin. If you're trying to load from somewhere else then you will not get the Error.
Check For this answer

Downloading file by WebClient Exception

I have a problem downloading particular file types by WebClient. So there are no problems with usual types - mp3, doc and others, but when I rename file extension to config it returns me:
InnerException = {System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
when I'm trying to access this file in browser (http://localhost:3182/Silverlight.config) - it's a usual xml file within - server returns me following error page:
Server Error in '/' Application.
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.config' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /Silverlight.config
So I suppose this hapens because of some server configuration, which blocks files of unknown type.
downloading code is simple:
WebClient webClient = new WebClient();
webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(webClient_OpenReadCompleted);
webClient.OpenReadAsync(new Uri("../Silverlight.config", UriKind.RelativeOrAbsolute));
completted eventhandler omitted for simplicity.
I'm not sure this is possible.
The .config extension is handled by the ASP.NET engine, for security reasons (sensitive data like connection strings need to be kept safe and hidden from unauthorized viewers).
This means that visitors cannot view your web.config file's content by simply entering "www.example.com/web.config" into their browser's adress bar.
EDIT : actually you can but I don't recommand it. If you really need to do it, you have to remove the mapping between the .config extension and ASP.NET ISAPI filter in IIS.

Testing Soap 1.2 service in RobotFramework using suds library

I am trying to test soap 1.2 services using RobotFramework. So far, we have only tested soap 1.1 services using suds library for RobotFramework, and suds is not compatible with soap 1.2.
Backwards compatibility is an option for the new services, but it would be better to have a more long-term solution. I am not an experienced programmer, though I can edit code if told what to edit and where.
What happens in the test we have for soap 1.2 services using suds is: suds is unable to interpret the response it gets from the webservice and gives this error: SAXParseException: :159:229: mismatched tag
The soap message is fine, there is no problem using it in SoapUI.
I have found some snippets online that suggest I could get suds library to work with soap 1.2 for my RobotFramework tests. But I have little programming experience and no idea how to incorporate those snippets in suds.
Someone commented on this snippet that this fixed his issue with RobotFramework and suds.
Is there someone out there willing to explain how I could make this work? I can't seem to figure it out on my own. Any suggestions would be greatly appreciated.
from suds.client import Client
from suds.bindings import binding
import logging
USERNAME = 'username'
PASSWORD = 'password'
# Just for debugging purposes.
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
# Telnic's SOAP server expects a SOAP 1.2 envelope, not a SOAP 1.1 envelope
# and will complain if this hack isn't done.
binding.envns = ('SOAP-ENV', 'http://www.w3.org/2003/05/soap-envelope')
client = Client('client.wsdl',
username=USERNAME,
password=PASSWORD,
headers={'Content-Type': 'application/soap+xml'})
# This will now work just fine.
client.service.someRandomMethod()
snippet from: https://gist.github.com/kgaughan/858851
In short Suds does not support SOAP 1.2 bindings. Development has ceased quite some time ago. For this reason the SudsLibrary does not support it either.
Some of the differences I observed using an example service SOAP 1.1/1.2 are:
HTTP header Content-Type:
1.2 = "application/soap+xml"
1.1 = "text/xml".
HTTP header
1.2 = Action
1.1 = SOAPAction
Envelope Namespace
1.2 = "http://www.w3.org/2003/05/soap-envelope"
1.1 = "http://schemas.xmlsoap.org/soap/envelope/"
For each of these a seperate solution was implemented in the example below. The content type could be overwritten. The Action can be added but the SOAPAction can not be removed. The namespace can also be overwritten using the extension library. This should work for you if your service ignores the SOAPaction header attribute.
Test Case.robot
*** Settings ***
Library SudsLibrary
Library SudsLibraryExtension
Library Collections
*** Test Cases ***
TC
${BASE_URL} Set Variable http://www.holidaywebservice.com
${SERVICE} Create Dictionary
... name=HolidayService_v2
... wsdl=HolidayService2.asmx?WSDL
${PORT} Set variable HolidayService2Soap12
${METHOD} Set variable GetCountriesAvailable
Set Binding SOAP-ENV http://www.w3.org/2003/05/soap-envelope
Create Soap Client ${BASE_URL}/${SERVICE.name}/${SERVICE.wsdl}
Set Port ${PORT}
Set Headers Content-Type application/soap+xml
Set Headers Soapaction ${EMPTY}
Set Headers Action "${BASE_URL}/${SERVICE.name}/${METHOD}"
${result} Call Soap Method ${METHOD}
SudsLibraryExtension.py
import suds.bindings
from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError
class SudsLibraryExtension(object):
"""
Extension on the SudsLibrary
"""
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LIBRARY_VERSION = 1.0
def __init__(self, LibraryName='SudsLibrary'):
"""SudsLibraryExtension can be imported with an optional argument.
- ``LibraryName``:
Default value for `LibraryName` is SudsLibrary if not given.
The name can by any Library Name that implements or extends the
SudsLibraryExtension.
"""
try:
self.SudsLibrary = BuiltIn().get_library_instance(LibraryName)
# This is useful for when you run Robot in Validation mode or load
# the library in an IDE that automatically retrieves the documen-
# tation from the library.
except RobotNotRunningError:
pass
def set_binding(self, binding, url):
"""Set Binding can be used to add a binding to the message.
Example Set Binding SOAP-ENV http://www.w3.org/2003/05/soap-envelope
"""
suds.bindings.binding.envns = (binding, url)