English 中文(简体)
JBoss Web Services Behind IIS Through HTTPs
原标题:

This is a tangled web that s woven, I suppose, but it really shouldn t be all that hard. Let me see if I can paint the picture:

I have written a web service, starting with a WSDL, which is to run in JBoss. This is all fine and dandy when I run it on my local machine and point my Netbeans "client generator" (probably just using "wsimport" or whatever behind the scenes) at it to generate a client it works as expected. All of this is working by hitting port 8080 directly and the <soap:address> element looks like so:

<soap:address location="http://localhost:8080/MyoutfitWebService/funService"/>

Now, when this puppy gets deployed, it will be getting requests from IIS forwarded through AJP to, I think, port 8009. IIS handles our client certificate validation and then is supposed to just forward the request to my web service. I can t figure out what to use in my WSDL s <soap:address> element so that I can give the WSDL URL to someone to generate their own client. If I use:

<soap:address location="https://real.server.com/MyoutfitWebService/funService"/>

when I deploy it and point to the WSDL, the <soap:address> element is wrecked and looks something like:

<soap:address location="https://127.0.0.1:8443/MyoutfitWebService/funService"/>

Can someone tell me if I need to modify something in jbossws.sar jboss-beans.xml or what? I m using JBoss Web Services Native 3.0.4.

Thanks for reading.

问题回答

I have no idea how to handle this in IIS but i ll write some notes about Apache

I had the same problem and workarounded it using mod_ext module in apache

Your configuration will look like this

 ExtFilterDefine fixservice mode=output cmd="/bin/sed s/127.0.0.1:8443/real.server.com:443/g"

 <Location "/MyoutfitWebService/services/funService">
      ProxyPass ajp://local.server.com:8009/MyoutfitWebService/funService   
      SetOutputFilter fixservice
 </Location>
 ProxyPass /MyoutfitWebService/funService ajp://local.server.com:8009/MyoutfitWebService/funService

So, your "correct" WSDL address will be

 real.server.com/MyoutfitWebService/services/funService?wsdl 

which will have correct soap:address,

 real.server.com/MyoutfitWebService/funService 

(I have removed https as I can put only one hyperlink here).

There may be a better way but unfortunately I have no time to do deep investigation. This solution just works (I found it couple of minutes ago and already tested)





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签