Skip to main content

Build Wine rpm with 32 bit application support

Wine is a software to allow running Windows applications in Linux, MAC etc. platforms. It is available for installation from package managers like yum (RHEL, CentOS) and apt (Ubuntu). You can find more details on how it works in Wine wiki . But the default Wine package available from package manager does not have support for 32 bit Windows applications. This was the case for me. In Redhat Enterprise Linux 7.3, the wine package did not contain support for 32 bit windows applications. So the only option was to build a separate rpm of wine which will include this support. All the steps are executed on a RHEL 7.3 VM (x86_64). Step 1 Download and run shell script which will make wine 64 and 32 support for RHEL: https://github.com/zma/usefulscripts/blob/master/script/install-wine-i686-centos7.sh It accepts a version no. as CLI parameter e.g. 2.0.3 The script installs wine in /usr/local/ directory by default. We can verify the files that are being copied for wine using "...

Using web service client behind a http proxy server

Web service is a popular medium of communication between devices over a network. But most of the time you find yourself behind a http proxy server to connect to the network. Proxy servers are often found in company networks. The main reasons for their introduction are - security, resource caching, auditing etc. But ultimately they block unauthorized access to internet from the inside network. This leads to the problem we are going to solve now.

We are going to use w3schools temperature converter service (WSDL download) for testing. Make sure you are actually running this code behind a http proxy server. You also need to know the proxy server's host name and the port no.  I'll assume that you can generate the client stubs using JAX-WS (or some other tool). I have used wsconsume tool to generated my stubs.

In my case, com.w3schools.TempConvert is the implementation class and com.w3schools.TempConvertSoap is the interface. Then I have a com.w3schools.client.WSClient class which is the actual client.

The trick here is to initialise a new instance of java.net.ProxySelector class in WSClient code with your proxy settings. To achieve that you need to write a class which extends java.net.ProxySelector. See below - With MyProxySelector class being ready we can set this default proxy in the WSClient code. Like this - Now you can invoke the WSClient to use w3school web service even from behind a proxy.

Comments

  1. does this work behind microsoft isa server?

    ReplyDelete
  2. I have not tested it with ISA server. But I feel it should work as it is another proxy server.

    ReplyDelete
  3. Is it per connection basis or it sets the host and port through out the jvm process as in case of System properties ?

    ReplyDelete
  4. They facilitate seamless communication between applications, enabling dynamic functionalities. Create A Compitition Whether for data retrieval, payment processing, or other tasks, understanding and implementing web services is essential for creating robust.

    ReplyDelete
  5. Web services are essential for device communication over networks, but using an HTTP proxy server can complicate access, especially within corporate environments. These proxy servers enhance security, resource caching, and auditing, effectively blocking unauthorized internet access. To address this, we’ll test a temperature converter service. Ensure your code runs behind an HTTP proxy, and you know the proxy's hostname and port. Generate client stubs using tools like JAX-WS or wsconsume. In my setup, `com.w3schools.TempConvert` serves as the implementation class, while `com.w3schools.TempConvertSoap` is the interface, with `com.w3schools.client.WSClient` as the client.

    ReplyDelete

Post a Comment