[All the features described here apply to JBoss 4.2.3GA]
Tuesday, March 16, 2010
Rashes On My 3 Month Sons Cheeck
locator service - Access to Stateless session beans from a POJO (with new EJB 3.1)
[All the features described here apply to JBoss 4.2.3GA]
If different within JBoss published Session Beans as Web Service will be here by default simply generates the appropriate WSDL. [All the features described here apply to JBoss 4.2.3GA]
Here is an example of a corresponding SLSB:
@ WebService @ SoapBinding
(parameter style =
SoapBinding parameter style.. WRAPPED )
Public
String getData();
} @Stateless @WebContext
(contextRoot = "/ExampleWS" ) @WebService
(ExampleService. class )
@Local (ExampleService. class
)
ExampleServiceBean implements ExampleService { @Override
public String getData() {
return "ExampleData" ; }
} This WSDL can be found at foglender Address: http://localhost:8080/ExampleWS/ExampleServiceBean?wsdl
... \u0026lt;service name='ExampleServiceBeanService'>
\u0026lt;port binding='tns:ExampleServiceBeanBinding' name='ExampleServiceBeanPort'> \u0026lt;soap: address location = 'http:// pluto : 8080/ExampleWS/ExampleServiceBean '/> \u0026lt;/ port>
\u0026lt;/ service>
...
pluto is my local Computer name. And that is precisely the problem. Within the WSDL file is used, the DNS name of the server.
If you want to now access outside the private network via Web services to the computer can, "pluto" are not naturally resolved. This occurs, for example, when a Web server is in the DMZ and on AppServer that is within the private network wants to access via web service. In the firewall for this extra 1 port was opened, the WSDL file can still be displayed, then the service is not callable L
remedy this, the following parameters when starting the server:
\u0026lt;JBOSS_HOME> \\ server \\ default \\ deploy \\ jbossws.sar \\ jbossws.beans \\ META-INF \\ jboss-beans.xml
following section is relevant here:
= "WSServerConfig"
class
=
"org.jboss.wsf.stack.jbws.NativeServerConfig" = "mbeanServer"
><
inject bean
=
"WSMBeanServerLocator" property = "mbeanServer"
/></ property > <!--
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 'modifySOAPAddress' is true. If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
If 'webServiceHost' is not set, JBossWS uses requesters protocol host when rewriting the <soap:address> .
-->
< property name
= "webServiceHost" >
${jboss.bind.address} </ property >
< property
name = "modifySOAPAddress"
> true </ property >
<!-- Set these properties to explicitly define the ports that will be used for rewriting the SOAP address. Otherwise the ports will be identified by querying the list of installed connectors.
If multiple connectors are found the port of the first connector is used. <property name="webServiceSecurePort">8443</property> <property name="webServicePort">8080</property> - bean>
> alternative to the parameters can jboss.bind.address even at start-b parameters are used.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment