cancel
Showing results for 
Search instead for 
Did you mean: 

How to set http-headrar before a wsdl-definition is retrieved

Highlighted
New Contributor

How to set http-headrar before a wsdl-definition is retrieved

Hi,

I have a problem, I need to retrieve a wsdl-definition with an url-address i order to create a SOAP-project, eg.

https://[maskin]:8443/my/webservice/test?wsdl

 

the problem is that I need to set a couple of HTTP-headrar that contains a "ticket" in order to grant access to the server. I cannot find a way to do this in SOAP-ui, you can set HTTP-headrar in restrospect, but I need to sett the http-headrar before I can retrieve the wsdl-definition. 

 

It should be a solution to this.

BR Alvaro

6 REPLIES 6
Highlighted
Moderator

Hi @alvarogrm,

Thanks for reaching out.

 

Community, has anyone faced a similar task? Can you please assist?

 


Olga Terentieva
SmartBear Assistant Community Manager

Highlighted
Contributor

Hello,

 

My best understanding of question is how to set a header...

 

In some groovy script that sets property values in a "Properties" named test step, set the desired header content:

   def xrequestid = UUID.randomUUID().toString();
   testRunner.testCase.testSteps["Properties"].setPropertyValue( "x-request-id-value-str", xrequestid);

   def xclientType = 'admin';
   testRunner.testCase.testSteps["Properties"].setPropertyValue( "x-client-type-value-str", xclientType);

 

In headers tab of the request, define Header column value of what is actually needed for the request.  In the Value column of the tab, use property expansion to set it to what is contained in the "Properties" named test step...  

 

Header             |      Value

----------             |     ----------

x-request-id      |     ${Properties#x-request-id-value-str}

x-client-type      |     ${Properties#x-client-type-value-str}

 

I hope I interpreted your question as you meant it.  🙂

Highlighted

Hi all,

 

@Todd_Neuschwang, thank you for your time looking into this, I sincerely appreciate the assistance.

@alvarogrm, have you had a chance to check the solution on your side? Does this work for you?

 


Olga Terentieva
SmartBear Assistant Community Manager

Highlighted

Hi,

 

I havn't had the time, but our test-expert is going to try out the solution, I still appreciate the effort you made in order to help us/me.

BR Alvaro

Highlighted

Hi,

 

our test-expert told me that i doesn't solve the issue, what the solution describes is how to set properties (http-headrar) when invoking the WebService (SOAP), what we want to do is the following:

steps:

1) Setting two http-headrar in SOAP-UI (before the project is created or before a wsdl-definition is used), e.g.

                user_id 

                user_password

2) Now create a soap-ui SOAP-project using and url, eg.

   http://fake.alvaro.se:8080/test?wsdl

 

The problem is that the server uses two security mechanism first cert (no problem here) and apart from that further information must be supplied in the http-header before you can actually communicate with the server, meaning that you cannot get the wsdl-definition from the server if the http-headers are not set.

BR Alvaro

Highlighted

Hi Alvaro,

 

If it is that difficult to get wsdl content through the manually crafted request in SoapUI, may it be an option to get wsdl using any other means (e.g. web browser), save it to the file and use the saved file in SoapUI then? (By specifying it for the Initial WSDL field instead of web address.)

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors