(new issue related to yesterday's question.)
I'm using addPort() to access a web service from a JSP. It works, I can get
the data I want. Yay!
My problem is that I had to hardcode the port number of the web service to
get things to work. I have three sets of servers to manage: development,
test, and production. These servers use different ports for this web
service.
Here's my current JSP code:
<%
CMPSWebService service = new CMPSWebService();
QName portName = new QName("http://ws.cmps.digitalriver.com",
"CMPSWebServiceHttpPort");
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
"http://localhost:5309/cmps-1.0/services/CMPSWebService/");
CMPSWebServicePortType port = service.getCMPSWebServiceHttpPort();
LookupProductResponseType resp = port.lookupProduct();
...
%>
I avoided the hostname problem by using localhost, but that pesky port 5309
is in there.
How can I generically do this so I don't hardcode the port number?
Thanks,
Brett
--
View this message in context:
http://cxf.547215.n5.nabble.com/Soap-ws-binding-with-addPort-tp3888711p3888711.html
Sent from the cxf-user mailing list archive at Nabble.com.