Updating WSRP ports and URL bindings when Portal is not running on the default port or not bound to localhost
Producer configuration
Portal 2.6.3 (and above) and/or JBoss AS 4.2 (and above) and/or JBoss WS 1.0.4.GA (and above):
Nothing to do (though see JBoss WS version compatibilty information)! Note also that if you are using the self producer, you will need to update the associated consumer configurations (see Consumer Configuration, below).
Older versions:
You should download and activate WSDLPortFixFilter servlet filter.
However, if you still cannot get the proper ports in your WSDL file, let us know on the forums first!
You can pass the full host name using the -b option of the run command when you launch AS. If it is still not working, you can then force the port number by modifying jboss-portal.sar/portal-wsrp.sar/portal-wsrp.jse/WEB-INF/wsdl/wsrp_services.wsdl (if you're not using the source distribution and compiling Portal from scratch, you might need to expand jboss-portal.sar/portal-wsrp.sar/portal-wsrp.jse just like you would expand a JAR file) to change all the soap-address elements to include http://<hostname>:<hostport>/<path-to-service>.
See also JBoss WS FAQ on URL rewriting for more information.
For example, if you configured the Tomcat connector to be on port 80 (pretty standard), wsrp_services.wsdl should be similar to:
<wsdl:definitions targetNamespace="urn:oasis:names:tc:wsrp:v1:wsdl" xmlns:bind="urn:oasis:names:tc:wsrp:v1:bind" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:intf="urn:oasis:names:tc:wsrp:v1:intf" xmlns:tns="urn:oasis:names:tc:wsrp:v1:wsdl"> <import namespace="urn:oasis:names:tc:wsrp:v1:bind" location="wsrp_v1_bindings.wsdl"></import> <wsdl:service name="WSRPService"> <wsdl:port binding="bind:WSRP_v1_Markup_Binding_SOAP" name="WSRPBaseService"> <soap:address location="http://localhost:80/portal-wsrp/ServiceDescriptionService"></soap:address> </wsdl:port> <wsdl:port binding="bind:WSRP_v1_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService"> <soap:address location="http://localhost:80/portal-wsrp/MarkupService"></soap:address> </wsdl:port> <wsdl:port binding="bind:WSRP_v1_Registration_Binding_SOAP" name="WSRPRegistrationService"> <soap:address location="http://localhost:80/portal-wsrp/RegistrationService"></soap:address> </wsdl:port> <wsdl:port binding="bind:WSRP_v1_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService"> <soap:address location="http://localhost:80/portal-wsrp/PortletManagementService"></soap:address> </wsdl:port> </wsdl:service> </wsdl:definitions>
Consumer configuration
Use the correct URL in your -wsrp.xml configuration file. For example, if you want to access Portal's 'self' WSRP producer (assuming you configured Portal to run over port 80 of a host named example.com), the jboss-portal.sar/portal-wsrp.sar/default-wsrp.xml should read:
<deployments> <deployment> <wsrp-producer> <producer-id>self</producer-id> <expiration-cache>120</expiration-cache> <!-- we need to use the individual endpoint configuration because the configuration via wsdl forces an immediate attempt to access the web service description which is not available yet at this point of deployment --> <endpoint-config> <service-description-url>http://example.com:80/portal-wsrp/ServiceDescriptionService</service-description-url> <markup-url>http://example.com:80/portal-wsrp/MarkupService</markup-url> <registration-url>http://example.com:80/portal-wsrp/RegistrationService</registration-url> <portlet-management-url>http://example.com:80/portal-wsrp/PortletManagementService</portlet-management-url> </endpoint-config> <registration-data></registration-data> </wsrp-producer> </deployment> </deployments>
Referenced by:
Comments