Discussion:
[jboss-user] [JBoss Web Services] - Is it possible to configure JAX-WS services with an external descriptor?
Carlo Bonamico
2012-09-28 08:03:54 UTC
Permalink
Carlo Bonamico [https://community.jboss.org/people/carlo.bonamico] created the discussion

"Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/762155#762155

--------------------------------------------------------------
Hi,
Something else you might want to try is setting your soap:address to something like " https://replace-me/ https://REPLACE-ME", that should force the https protocol to be use in the soap:address when rewriting it. I think this probably has the side effect of overwriting the webServicePort you might want to >specify though.
Then enabled rewriting of the address in

jbossws.deployer/META-INF/jboss-beans.xml

<bean name="ServiceEndpointManager" class="org.jboss.ws.server.ServiceEndpointManager">
      <!--
        The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
        element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
     
        If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless AlwaysModifySOAPAddress is true.
        If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
      -->
      <property name="webServiceHost">www.external.domain.com</property>
      <property name="webServiceSecurePort">443</property>
      <property name="alwaysModifySOAPAddress">true</property>
      ...
    </bean>

In this way the resulting url exposed in the wsdl is https://www.external.domain.com/path/ https://www.external.domain.com/path/... which is what I needed to achieve.
If nothing of this helps, please create a feature request jira. We might think about adding another configuration option (webServiceProtocol) and achieve what you want throught that.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/762155#762155]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2012-10-01 07:38:58 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/762436#762436

--------------------------------------------------------------
We should probably check if this is still the behaviour with current JBossWS-CXF 4.x / JBoss AS 7.1.x and possibly create a bug jira, as this looks like a bug, the server should be rewriting wsdl soap:address regardless of that coming from an automatically generated contract (java first) or not.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/762436#762436]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Carlo Bonamico
2012-10-01 11:41:11 UTC
Permalink
Carlo Bonamico [https://community.jboss.org/people/carlo.bonamico] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/762483#762483

--------------------------------------------------------------
Hi Alessio,
the server does rewrite the host in both cases (external wsdl and annotations-only), but it does not rewrite the protocol. Following your suggestion
Something else you might want to try is setting your soap:address to something like " https://replace-me/ https://REPLACE-ME", that should force the https protocol to be use in the soap:address when rewriting it. I think this probably has the side effect of overwriting the webServicePort you might want to >specify though.
I used an external wsdl file to specify this https://replaceme https://replaceme address.

Is it possible to specify the address via annotations and/or just an external descriptor (similarl to metro's sun-jaxws.xml)? I would like to avoid explicitely saving the wsdl in order not to maintain its changes when the @WebService annotation class changes.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/762483#762483]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2012-10-04 09:07:17 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/763132#763132

--------------------------------------------------------------
Are you enforcing the CONFIDENTIAL transport guarantee for you endpoint? (through web.xml for pojo deployments or @WebContext(transportGuarantee = ...) for EJB3 endpoints)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/763132#763132]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Carlo Bonamico
2012-10-04 09:59:19 UTC
Permalink
Carlo Bonamico [https://community.jboss.org/people/carlo.bonamico] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/763156#763156

--------------------------------------------------------------
I think I cannot, since Jboss exposes the service over plain HTTP and it is up to the Apache HTTPD + mod_proxy to do the HTTPS encoding in our architecture.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/763156#763156]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2012-10-04 10:10:53 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/763157#763157

--------------------------------------------------------------
ok, right. Well, to answer your question, of course there's no such annotation / additional descriptor for this. I'll do some tests and finally create a jira for this additional feature.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/763157#763157]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Carlo Bonamico
2012-10-04 19:44:55 UTC
Permalink
Carlo Bonamico [https://community.jboss.org/people/carlo.bonamico] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/763324#763324

--------------------------------------------------------------
Hi Alessio, thanks! I understand that there is no annotation to enable just address rewriting to https while the service is actually http. In order to manage the situation at the moment we are using the trick that you suggested
Something else you might want to try is setting your soap:address to something like " https://replace-me/ https://REPLACE-ME", that should force the https protocol to be use in the soap:address when rewriting it.
So at the moment we are specifying this https://replace-me fake address in the manually defined wsdl.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/763324#763324]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Nils Wöhler
2013-04-20 13:45:30 UTC
Permalink
Nils Wöhler [https://community.jboss.org/people/ncwoehler] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/809389#809389

--------------------------------------------------------------
Hi Alessio, did you already file an jira issue for this? We are facing the same problem and I would like to vote for this issue.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/809389#809389]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
shashi Paripalli
2013-05-30 13:35:12 UTC
Permalink
shashi Paripalli [https://community.jboss.org/people/shashi53013] created the discussion

"Re: Is it possible to configure JAX-WS services with an external descriptor?"

To view the discussion, visit: https://community.jboss.org/message/820416#820416

--------------------------------------------------------------
Can anyone please summarize the solution to the above problem as we facing identical problem with the same configurations.as that specified by CARLO.
CARLO can you please provide more information on the file/location where the https://replace-me/ https://REPLACE-ME" is to be placed.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820416#820416]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Loading...