Re: disable-address-updates breaks ServiceName?wsdl url

2007-11-27 Thread Willem Jiang


I just find the base-address parameters that you set is start with 
https, cxf_servlet do not support this configuration.


After I went through the  servlet control code, I found the key of your 
issue.
If you set the  disable-address-updates parameter to be true, servlet 
control will not update the endpoint address.
For your case , if you want to override the endpoint address with the 
url that you want , you should not use

the disable-address-updates parameter.

private synchronized void updateDests(HttpServletRequest request) {
   if (disableAddressUpdates) {
   return;
   }
   String base = forcedBaseAddress == null ? getBaseURL(request) : 
forcedBaseAddress;
  
   if (base.equals(lastBase)) {

   return;
   }
   SetString paths = transport.getDestinationsPaths();
   for (String path : paths) {
   ServletDestination d2 = transport.getDestinationForPath(path);
   String ad = d2.getEndpointInfo().getAddress();
   if (ad.equals(path)
   || ad.equals(lastBase + path)) {
   d2.getEndpointInfo().setAddress(base + path);
   if (d2.getEndpointInfo().getExtensor(AddressType.class) 
!= null) {
   
d2.getEndpointInfo().getExtensor(AddressType.class).setLocation(base + 
path);

   }
   }
   }
   lastBase = base;
   }


Willem.


Christian Vest Hansen wrote:

2007/11/27, Willem Jiang [EMAIL PROTECTED]:
  

Can I see your whole web.xml and endpoint configuration file (bean.xml
or cxf-servlet.xml)?
I think there must be something wrong with them.



See mail attachment. I'm attaching these files as-is without any
obfuscation, so excuse if they're a bit big.

  

BTW,
Can you get the wsdl by removing the disable-address-updates and
base-addresses parameters in your web.xml?



Yes.

  

Willem.

Christian Vest Hansen wrote:


I tried this, but I can't seem to hit home on any of these base-addresses:
http://localhost:8080/myapp
http://localhost:8080/myapp/
http://localhost:8080/myapp/services
http://localhost:8080/myapp/services/

Regardless, my point was that I still wanted to access the wsdl at the
same url, just without having updated endpoint urls in the wsdl.


2007/11/25, Willem2 [EMAIL PROTECTED]:

  

If you set the disable-address-updates , you also need to set the
base-address like http://localhost:8080/myapp
Since CXF servlet will not update the endpoint address with the request url,
you need to specify the base-address to build up a real accessible address
for the endpoint.

Willem.


Christian Vest Hansen wrote:



Usually, you can access the WSDL of a service by appending ?wsdl to
the endpoint url and end up with something like this:
http://localhost:8080/myapp/ServiceName?wsdl

However, if you add the disable-address-updates init-param to your
CXFServlet in web.xml like this:


servlet
servlet-nameCXFServlet/servlet-name
display-nameCXF Servlet/display-name

servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class
init-param
param-namedisable-address-updates/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

Then you're no longer able to access the WSDL file at the address above.

Is this correct behaviour? I'de rather like to be able to access the
WSDL regardless of the presence of this init-param.



--
Venlig hilsen / Kind regards,
Christian Vest Hansen.



  

--
View this message in context: 
http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696
Sent from the cxf-user mailing list archive at Nabble.com.






  



  


Re: disable-address-updates breaks ServiceName?wsdl url

2007-11-27 Thread Christian Vest Hansen
So I should only use the base-address parameter. I tried this but the
only working value for base-address, in my instance, seems to be
http://localhost:8080/ldapservice/services - which I think is exactly
what CXF would have chosen had I not provided a base-address
parameter, and therefor not entirely useful for overriding.

Is there anything else I can do to make it work?



2007/11/27, Willem Jiang [EMAIL PROTECTED]:

 I just find the base-address parameters that you set is start with
 https, cxf_servlet do not support this configuration.

 After I went through the  servlet control code, I found the key of your
 issue.
 If you set the  disable-address-updates parameter to be true, servlet
 control will not update the endpoint address.
 For your case , if you want to override the endpoint address with the
 url that you want , you should not use
 the disable-address-updates parameter.

 private synchronized void updateDests(HttpServletRequest request) {
 if (disableAddressUpdates) {
 return;
 }
 String base = forcedBaseAddress == null ? getBaseURL(request) :
 forcedBaseAddress;

 if (base.equals(lastBase)) {
 return;
 }
 SetString paths = transport.getDestinationsPaths();
 for (String path : paths) {
 ServletDestination d2 = transport.getDestinationForPath(path);
 String ad = d2.getEndpointInfo().getAddress();
 if (ad.equals(path)
 || ad.equals(lastBase + path)) {
 d2.getEndpointInfo().setAddress(base + path);
 if (d2.getEndpointInfo().getExtensor(AddressType.class)
 != null) {

 d2.getEndpointInfo().getExtensor(AddressType.class).setLocation(base +
 path);
 }
 }
 }
 lastBase = base;
 }


 Willem.


 Christian Vest Hansen wrote:
  2007/11/27, Willem Jiang [EMAIL PROTECTED]:
 
  Can I see your whole web.xml and endpoint configuration file (bean.xml
  or cxf-servlet.xml)?
  I think there must be something wrong with them.
 
 
  See mail attachment. I'm attaching these files as-is without any
  obfuscation, so excuse if they're a bit big.
 
 
  BTW,
  Can you get the wsdl by removing the disable-address-updates and
  base-addresses parameters in your web.xml?
 
 
  Yes.
 
 
  Willem.
 
  Christian Vest Hansen wrote:
 
  I tried this, but I can't seem to hit home on any of these base-addresses:
  http://localhost:8080/myapp
  http://localhost:8080/myapp/
  http://localhost:8080/myapp/services
  http://localhost:8080/myapp/services/
 
  Regardless, my point was that I still wanted to access the wsdl at the
  same url, just without having updated endpoint urls in the wsdl.
 
 
  2007/11/25, Willem2 [EMAIL PROTECTED]:
 
 
  If you set the disable-address-updates , you also need to set the
  base-address like http://localhost:8080/myapp
  Since CXF servlet will not update the endpoint address with the request 
  url,
  you need to specify the base-address to build up a real accessible 
  address
  for the endpoint.
 
  Willem.
 
 
  Christian Vest Hansen wrote:
 
 
  Usually, you can access the WSDL of a service by appending ?wsdl to
  the endpoint url and end up with something like this:
  http://localhost:8080/myapp/ServiceName?wsdl
 
  However, if you add the disable-address-updates init-param to your
  CXFServlet in web.xml like this:
 
 
  servlet
  servlet-nameCXFServlet/servlet-name
  display-nameCXF Servlet/display-name
 
  servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class
  init-param
  param-namedisable-address-updates/param-name
  param-valuetrue/param-value
  /init-param
  load-on-startup1/load-on-startup
  /servlet
 
  Then you're no longer able to access the WSDL file at the address above.
 
  Is this correct behaviour? I'de rather like to be able to access the
  WSDL regardless of the presence of this init-param.
 
 
 
  --
  Venlig hilsen / Kind regards,
  Christian Vest Hansen.
 
 
 
 
  --
  View this message in context: 
  http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696
  Sent from the cxf-user mailing list archive at Nabble.com.
 
 
 
 
 
 
 
 
 



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.


Re: disable-address-updates breaks ServiceName?wsdl url

2007-11-26 Thread Christian Vest Hansen
I tried this, but I can't seem to hit home on any of these base-addresses:
http://localhost:8080/myapp
http://localhost:8080/myapp/
http://localhost:8080/myapp/services
http://localhost:8080/myapp/services/

Regardless, my point was that I still wanted to access the wsdl at the
same url, just without having updated endpoint urls in the wsdl.


2007/11/25, Willem2 [EMAIL PROTECTED]:

 If you set the disable-address-updates , you also need to set the
 base-address like http://localhost:8080/myapp
 Since CXF servlet will not update the endpoint address with the request url,
 you need to specify the base-address to build up a real accessible address
 for the endpoint.

 Willem.


 Christian Vest Hansen wrote:
 
  Usually, you can access the WSDL of a service by appending ?wsdl to
  the endpoint url and end up with something like this:
  http://localhost:8080/myapp/ServiceName?wsdl
 
  However, if you add the disable-address-updates init-param to your
  CXFServlet in web.xml like this:
 
 
  servlet
  servlet-nameCXFServlet/servlet-name
  display-nameCXF Servlet/display-name
 
  servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class
  init-param
  param-namedisable-address-updates/param-name
  param-valuetrue/param-value
  /init-param
  load-on-startup1/load-on-startup
  /servlet
 
  Then you're no longer able to access the WSDL file at the address above.
 
  Is this correct behaviour? I'de rather like to be able to access the
  WSDL regardless of the presence of this init-param.
 
 
 
  --
  Venlig hilsen / Kind regards,
  Christian Vest Hansen.
 
 

 --
 View this message in context: 
 http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696
 Sent from the cxf-user mailing list archive at Nabble.com.




-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.


Re: disable-address-updates breaks ServiceName?wsdl url

2007-11-26 Thread Willem Jiang
Can I see your whole web.xml and endpoint configuration file (bean.xml 
or cxf-servlet.xml)?

I think there must be something wrong with them.
BTW, 
Can you get the wsdl by removing the disable-address-updates and 
base-addresses parameters in your web.xml?


Willem.

Christian Vest Hansen wrote:

I tried this, but I can't seem to hit home on any of these base-addresses:
http://localhost:8080/myapp
http://localhost:8080/myapp/
http://localhost:8080/myapp/services
http://localhost:8080/myapp/services/

Regardless, my point was that I still wanted to access the wsdl at the
same url, just without having updated endpoint urls in the wsdl.


2007/11/25, Willem2 [EMAIL PROTECTED]:
  

If you set the disable-address-updates , you also need to set the
base-address like http://localhost:8080/myapp
Since CXF servlet will not update the endpoint address with the request url,
you need to specify the base-address to build up a real accessible address
for the endpoint.

Willem.


Christian Vest Hansen wrote:


Usually, you can access the WSDL of a service by appending ?wsdl to
the endpoint url and end up with something like this:
http://localhost:8080/myapp/ServiceName?wsdl

However, if you add the disable-address-updates init-param to your
CXFServlet in web.xml like this:


servlet
servlet-nameCXFServlet/servlet-name
display-nameCXF Servlet/display-name

servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class
init-param
param-namedisable-address-updates/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

Then you're no longer able to access the WSDL file at the address above.

Is this correct behaviour? I'de rather like to be able to access the
WSDL regardless of the presence of this init-param.



--
Venlig hilsen / Kind regards,
Christian Vest Hansen.


  

--
View this message in context: 
http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696
Sent from the cxf-user mailing list archive at Nabble.com.






  


Re: disable-address-updates breaks ServiceName?wsdl url

2007-11-24 Thread Willem2

If you set the disable-address-updates , you also need to set the
base-address like http://localhost:8080/myapp
Since CXF servlet will not update the endpoint address with the request url,
you need to specify the base-address to build up a real accessible address
for the endpoint.

Willem.
 

Christian Vest Hansen wrote:
 
 Usually, you can access the WSDL of a service by appending ?wsdl to
 the endpoint url and end up with something like this:
 http://localhost:8080/myapp/ServiceName?wsdl
 
 However, if you add the disable-address-updates init-param to your
 CXFServlet in web.xml like this:
 
 
 servlet
 servlet-nameCXFServlet/servlet-name
 display-nameCXF Servlet/display-name

 servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class
 init-param
 param-namedisable-address-updates/param-name
 param-valuetrue/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
 
 Then you're no longer able to access the WSDL file at the address above.
 
 Is this correct behaviour? I'de rather like to be able to access the
 WSDL regardless of the presence of this init-param.
 
 
 
 -- 
 Venlig hilsen / Kind regards,
 Christian Vest Hansen.
 
 

-- 
View this message in context: 
http://www.nabble.com/disable-address-updates-breaks-ServiceName-wsdl-url-tf4862292.html#a13931696
Sent from the cxf-user mailing list archive at Nabble.com.



disable-address-updates breaks ServiceName?wsdl url

2007-11-23 Thread Christian Vest Hansen
Usually, you can access the WSDL of a service by appending ?wsdl to
the endpoint url and end up with something like this:
http://localhost:8080/myapp/ServiceName?wsdl

However, if you add the disable-address-updates init-param to your
CXFServlet in web.xml like this:


servlet
servlet-nameCXFServlet/servlet-name
display-nameCXF Servlet/display-name

servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class
init-param
param-namedisable-address-updates/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

Then you're no longer able to access the WSDL file at the address above.

Is this correct behaviour? I'de rather like to be able to access the
WSDL regardless of the presence of this init-param.



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.