cancel
Showing results for 
Search instead for 
Did you mean: 

User-Agent issue with SoapUI NG (trial)

SOLVED
Occasional Contributor

User-Agent issue with SoapUI NG (trial)

Hi,

 

A have an issue setting the user-agent in my soap requests with SoapUI (5.2.1) then I tried to use Ready!/SoapUI NG (1.4.1), but the problem is identical (http://community.smartbear.com/t5/SoapUI-Open-Source/User-Agent-option-issue/m-p/108121#U108121). Setting User-Agent in the global options or adding an header property in the soap request does not change behaviour.

 

Here are the raw header in SoapUI NG when i want to change User-Agent :

POST https://xxx.xxx.xxx/Authentification HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: SoapUI-metier
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Host: xxx.xxx.xxx

Proxy-Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

 

And here a network dump of the headers :

CONNECT xxx.xxx.xxx:443 HTTP/1.1

Host: xxx.xxx.xxx

Proxy-Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

 

Is there any work-around to get the user-agent option working ?

 

Thanks.

Mathieu.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Regular Contributor

Re: User-Agent issue with SoapUI NG (trial)

Agree! Ready! API doesn't support CONNECT method at all!

 

 @bpcemat: In the screenshots shared, I hope the wireshark dump of second instance is a mismatched one. Is it?

 

Thanks,

Samy

View solution in original post

17 REPLIES 17
Highlighted
Community Hero

Re: User-Agent issue with SoapUI NG (trial)

See if this helps.

go to File -> Preferences -> Http Settings -> User-Agent Header, provide value.

 

preferences.png



Regards,
Rao.
Highlighted
Occasional Contributor

Re: User-Agent issue with SoapUI NG (trial)

😞 I allready tried that. It is why I've got 2 User-Agent header in my raw data.

I suppose SoapUI does not remove de default User-Agent of the Apache Library and erase my own settings when generating requests.

 

Thanks.

Highlighted
Community Hero

Re: User-Agent issue with SoapUI NG (trial)

Some how I could see what I have as user-agent value in preferences, Tried on  SoapUI 4.x, 5.x

 

POST http://10.0.0.1:8080/eml/services/router HTTP/1.1
Connection: close
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Content-Type: text/xml;charset=UTF-8
SOAPAction: "RecordAction"
Authorization: Basic YWRtaW46YWRtaW4=
Content-Length: 6491
Host: 10.0.0.1:8080

Could not reproduce, somehow. Could not try on ReadyAPI though.

This is for soap request only.



Regards,
Rao.
Highlighted
Occasional Contributor

Re: User-Agent issue with SoapUI NG (trial)

Thanks for your test, you gave me an idea, I'm progressing.

 

 

I'm in an enterprise network and use a proxy to connect soap sites. My problem occurs when SoapUI orders the proxy to connect an SLL soap server. The CONNECT request does not have the defined User-Agent (and that's my problem), maybe the soap requests inside the SSL tunnel will have it but i can't tell.

 

I'm looking for a work-around, but I'm not optimistic.

 

 

Best regards.

Highlighted
Regular Contributor

Re: User-Agent issue with SoapUI NG (trial)

In your case,it sounds to be an issue with the environment you test! I could not even able to reproduce this issue in SoapUI Pro 5.2 in an enterprise network. As a work around, I would suggest you to manually edit the request passed by SoapUI through some web debugger tools like Fiddler, HTTP Watch, Burp Suite etc.,

 

Fiddler integration with SoapUI - Refernece - http://www.codeproject.com/Articles/249303/Testing-and-Monitoring-WCF-Service-using-soapUI-an

 

Thanks,

Samy

 

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others, Thanks. ↓↓↓

Highlighted
Occasional Contributor

Re: User-Agent issue with SoapUI NG (trial)

Hi Samy,

 

Here are outputs when I use an http site trough a proxy :

 

soap_http.png

 

wireshark dump :

 

dump_soap_http.png

 

 

Now traces for httpS request (I only add an 's' in the url, same request)  :

 

 

soap_https.png

 

Wireshark dump :

 

dump_soap_https.png

 

 

As you can see, SoapUI does not add my user-agent in this case. I don't know if it is the attended behaviour for soap developpers, but it is problematic for my company, we can't use SoapUi in our environment 😞

 

 

Best regards.

Highlighted
Community Hero

Re: User-Agent issue with SoapUI NG (trial)

Please see this and note that there is nothing set in the preferences -> User-Agent. Instead stead Header.

 

Selection_252.png



Regards,
Rao.
Highlighted
Community Hero

Re: User-Agent issue with SoapUI NG (trial)

Also note that it is using https


Regards,
Rao.
Highlighted
Occasional Contributor

Re: User-Agent issue with SoapUI NG (trial)

Hi,

 

 

I made a lot of tests, and it appears the problem is only with the CONNECT method used to reach https sites trough proxies. Get or Post have the correct user-agent set. I find a work-around by using fiddler and fixing my user-agent in it.

 

 

Thanks for all.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors