Re: [xfire-user] Running a service under SSL

2007-05-28 Thread Dragos Pavel
Hi All,

I made my web service working with the fix for HTTPS described by Andrew
Kerr in a previous post. After I made a custom version of that class to
replace the http with https, I was able to test successfully the
service.

Now everything is fine except one thing: if one is using the short URL
(for example https:// + server + servicepackage) pointing to the welcome
page of XFire (displaying all available services) which looks like this:
-- 
Available Services:

  * myservice [wsdl]



Generated by XFire ( http://xfire.codehaus.org )
---
the link for the wsdl is wrong, instead to point to https it points to
http (the rest of URL is correct but then again same problem with
https). So the wsdl link is broken because it points wrongly to http
instead to https.

Now one has to access the wsdl by using the absolute full URL, meaning
it has to use myservice?wsdl at the end in order to view it in the
browser. 

How can this link on the XFire welcome page be fixed ?
I don't want to publish broken links if you know what I mean and this is
related to XFire internals.

I expect your feedback.






-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-05-25 Thread Dragos Pavel
Hello again,

1) Creating my own binding (using the code snippet mentioned in my
previous email) does help by having a generated wsdl which points to the
correct https location. However after creating and running the related
client it complains about:
Exception from ServiceClient: Could not invoke service.. Nested
exception is org.codehaus.xfire.fault.XFireFault: Invalid endpoint for
service.
So by creating my own binding (in services.xml) to point to https
doesn't makes xfire to use the https to resolve the correct endpoint.
My only solution therefore is to modify that
org.codehaus.xfire.transport.http.XFireServletTransport to return https.

Now I'm comming to point 2 (the build):

2) the xfire 1.2.6 build points to org.mortbay.jetty-5.1.3.jar
The problem is that in the build there are references to
org.mortbay.component.AbstractLifeCycle and to
org.mortbay.component.LifeCycle  
but the source org.mortbay.jetty-5.1.3.jar doesn't contain a component
package !
Beside there are other 4 discrepancies in classes related to the same
source for jetty = org.mortbay.jetty-5.1.3.jar

It's a library problem.
So I ran into this 6 errors:
compile:
[javac] Compiling 137 source files to /home/dragos/httpslib/xfire-
core/target/classes
[javac] /home/dragos/httpslib/xfire-
core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:66:
cannot access org.mortbay.component.AbstractLifeCycle
[javac] file org/mortbay/component/AbstractLifeCycle.class not found
[javac] SslSocketConnector sslConector  = new
SslSocketConnector();
[javac]   ^
[javac] /home/dragos/httpslib/xfire-
core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:71:
cannot find symbol
[javac] symbol  : method addConnector
(org.mortbay.jetty.security.SslSocketConnector)
[javac] location: class org.mortbay.jetty.Server
[javac] httpServer.addConnector(sslConector);
[javac]   ^
[javac] /home/dragos/httpslib/xfire-
core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:77:
cannot access org.mortbay.component.LifeCycle
[javac] file org/mortbay/component/LifeCycle.class not found
[javac]  connector.setPort(port);
[javac]   ^
[javac] /home/dragos/httpslib/xfire-
core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:78:
cannot find symbol
[javac] symbol  : method addConnector(org.mortbay.jetty.Connector)
[javac] location: class org.mortbay.jetty.Server
[javac]  httpServer.addConnector(connector);
[javac]^
[javac] /home/dragos/httpslib/xfire-
core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:84:
cannot find symbol
[javac] symbol  : constructor Context
(org.mortbay.jetty.Server,java.lang.String,int)
[javac] location: class org.mortbay.jetty.servlet.Context
[javac] Context context = new Context
(httpServer,/,Context.SESSIONS);
[javac]   ^
[javac] /home/dragos/httpslib/xfire-
core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:88:
cannot find symbol
[javac] symbol  : constructor ServletHolder
(org.codehaus.xfire.transport.http.XFireServlet)
[javac] location: class org.mortbay.jetty.servlet.ServletHolder
[javac] ServletHolder servlet = new ServletHolder(new
XFireServlet());
[javac] ^
[javac] 6 errors

Anybody any idea ? Over HTTP my service is working fine; I have this
HTTPS problem to solve.





On Thu, 2007-24-05 at 17:58 -0400, Dragos Pavel wrote:
 By trying to do this in the services.xml config:
 
 createDefaultBindingsfalse/createDefaultBindings
 bindings xmlns:e=https://acompany.com/;
   soap11Binding name=e:serviceSoap11Binding
 transport=http://schemas.xmlsoap.org/soap/http;
 allowUndefinedEndpoints=true
 endpoints
   endpoint name=e:serviceHttpPort
 url=https://test.dynadocs.com/ws/energy/lixarinterface/service; /
 /endpoints
   /soap11Binding
 /bindings 
 
 One can create his own bindings pointing to https for endpoint
 location ??? I have the https for location in wsdl after this change in
 services.xml config but I still can't validate the generated wsdl.
 
 The 'serviceHttpPort' has an invalid binding - 'serviceSoap11Binding'.
 Check that the 'serviceSoap11Binding' binding is defined.
 
 What's the correct way to this binding configuration ? Sorry but the man
 pages are not very helpful. Any hint will be welcomed.
 
 Thanks in advance.
  
 
 
 On Thu, 2007-24-05 at 17:51 -0400, Dragos Pavel wrote:
  OK I modified the class and I'm using the build all target provided in
  the build.xml   How can one build the XFire source code successfully?
  I run into this dependency and I get errors getting the related jar libs
  from Error getting http://www.ibiblio.org/maven/.
  
  Buildfile: build.xml
  
 

Re: [xfire-user] Running a service under SSL

2007-05-25 Thread Dragos Pavel
Done with the build, needed additional util libraries...

There is a jira for this SSL issue ?


On Fri, 2007-25-05 at 15:10 -0400, Dragos Pavel wrote:
 Hello again,
 
 1) Creating my own binding (using the code snippet mentioned in my
 previous email) does help by having a generated wsdl which points to the
 correct https location. However after creating and running the related
 client it complains about:
 Exception from ServiceClient: Could not invoke service.. Nested
 exception is org.codehaus.xfire.fault.XFireFault: Invalid endpoint for
 service.
 So by creating my own binding (in services.xml) to point to https
 doesn't makes xfire to use the https to resolve the correct endpoint.
 My only solution therefore is to modify that
 org.codehaus.xfire.transport.http.XFireServletTransport to return https.
 
 Now I'm comming to point 2 (the build):
 
 2) the xfire 1.2.6 build points to org.mortbay.jetty-5.1.3.jar
 The problem is that in the build there are references to
 org.mortbay.component.AbstractLifeCycle and to
 org.mortbay.component.LifeCycle  
 but the source org.mortbay.jetty-5.1.3.jar doesn't contain a component
 package !
 Beside there are other 4 discrepancies in classes related to the same
 source for jetty = org.mortbay.jetty-5.1.3.jar
 
 It's a library problem.
 So I ran into this 6 errors:
 compile:
 [javac] Compiling 137 source files to /home/dragos/httpslib/xfire-
 core/target/classes
 [javac] /home/dragos/httpslib/xfire-
 core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:66:
 cannot access org.mortbay.component.AbstractLifeCycle
 [javac] file org/mortbay/component/AbstractLifeCycle.class not found
 [javac] SslSocketConnector sslConector  = new
 SslSocketConnector();
 [javac]   ^
 [javac] /home/dragos/httpslib/xfire-
 core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:71:
 cannot find symbol
 [javac] symbol  : method addConnector
 (org.mortbay.jetty.security.SslSocketConnector)
 [javac] location: class org.mortbay.jetty.Server
 [javac] httpServer.addConnector(sslConector);
 [javac]   ^
 [javac] /home/dragos/httpslib/xfire-
 core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:77:
 cannot access org.mortbay.component.LifeCycle
 [javac] file org/mortbay/component/LifeCycle.class not found
 [javac]  connector.setPort(port);
 [javac]   ^
 [javac] /home/dragos/httpslib/xfire-
 core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:78:
 cannot find symbol
 [javac] symbol  : method addConnector(org.mortbay.jetty.Connector)
 [javac] location: class org.mortbay.jetty.Server
 [javac]  httpServer.addConnector(connector);
 [javac]^
 [javac] /home/dragos/httpslib/xfire-
 core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:84:
 cannot find symbol
 [javac] symbol  : constructor Context
 (org.mortbay.jetty.Server,java.lang.String,int)
 [javac] location: class org.mortbay.jetty.servlet.Context
 [javac] Context context = new Context
 (httpServer,/,Context.SESSIONS);
 [javac]   ^
 [javac] /home/dragos/httpslib/xfire-
 core/src/main/org/codehaus/xfire/server/http/XFireHttpServer.java:88:
 cannot find symbol
 [javac] symbol  : constructor ServletHolder
 (org.codehaus.xfire.transport.http.XFireServlet)
 [javac] location: class org.mortbay.jetty.servlet.ServletHolder
 [javac] ServletHolder servlet = new ServletHolder(new
 XFireServlet());
 [javac] ^
 [javac] 6 errors
 
 Anybody any idea ? Over HTTP my service is working fine; I have this
 HTTPS problem to solve.
 
 
 
 
 
 On Thu, 2007-24-05 at 17:58 -0400, Dragos Pavel wrote:
  By trying to do this in the services.xml config:
  
  createDefaultBindingsfalse/createDefaultBindings
  bindings xmlns:e=https://acompany.com/;
soap11Binding name=e:serviceSoap11Binding
  transport=http://schemas.xmlsoap.org/soap/http;
  allowUndefinedEndpoints=true
  endpoints
endpoint name=e:serviceHttpPort
  url=https://test.dynadocs.com/ws/energy/lixarinterface/service; /
  /endpoints
/soap11Binding
  /bindings 
  
  One can create his own bindings pointing to https for endpoint
  location ??? I have the https for location in wsdl after this change in
  services.xml config but I still can't validate the generated wsdl.
  
  The 'serviceHttpPort' has an invalid binding - 'serviceSoap11Binding'.
  Check that the 'serviceSoap11Binding' binding is defined.
  
  What's the correct way to this binding configuration ? Sorry but the man
  pages are not very helpful. Any hint will be welcomed.
  
  Thanks in advance.
   
  
  
  On Thu, 2007-24-05 at 17:51 -0400, Dragos Pavel wrote:
   OK I modified the class and I'm 

Re: [xfire-user] Running a service under SSL

2007-05-24 Thread Dragos Pavel
Hi Yogesh,

Thank you very much for your answer.
I like your solution but unfortunately is not applicable in my case.
In my environment the client has a certificate, the handshake is done on
the server etc; in your case probably you need human interaction from
your clients in order to accept the certificate when they are prompted
for that.

Does somebody successfully created his own bindings in the wsdl ( by
using createDefaultBindingsfalse/createDefaultBindings ...) ?

Thanks.



On Wed, 2007-23-05 at 20:16 -0700, Yogesh Chawla - PD wrote:
 Hi Dragos,
 The specific situation I had was this.  My service was
 secured using HTTPS and Client Certificates.  I didn't
 want my service consumers to need a certificate just
 to see the WSDL.  
 
 We took the WSDL generated by xfire and did a view
 source on it.  I copied what was there and modified
 the WSDL and exposed in an unsecured part of the web
 site (a page that did not require a client
 certificate).  
 
 In our example, the application server tomcat was
 handling the HTTPS connection so the endpoint in the
 WSDL could be modified without affecting any of the
 actual data types in the schema.
 
 As a general observation, the WSDLs generated doing
 code first development are not the nicest looking.  We
 do code first development using XMLBeans but write the
 WSDLs by hand for ease of human readability.  Once
 such WSDL can be found here:
 
 http://wijis.wisconsin.gov/wsdl/PointerCountService.wsdl
 
 We can easily change this part of the WSDL if the port
 or server name changes with minimal impact:
 
   wsdl:service name=PointerCountService
   wsdl:port binding=tns:PointerCountServiceSOAP
   name=PointerCountServiceSOAP
   soap:address
 location=https://wijis.wisconsin.gov:17444/xfire/PointerCount;
 /
   /wsdl:port
   /wsdl:service
 
 Dragos, I am not sure how much help this because we
 might have slightly different situations but hopefully
 this example will help you find your solution.
 
 Cheers,
 Yogesh
 
 -
 To unsubscribe from this list please visit:
 
 http://xircles.codehaus.org/manage_email
 


-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-05-24 Thread Yogesh Chawla - PD
Hi Dragos,
We have the users generate their clients from the WSDL
and when they hit the service they require a client
certficate.  

During run time, the clients don't actually need the
WSDL and the service doesn't need it either.  All of
the HTTPS mutual authentication is handled by the
application server.

I did write an input handler to my service which
retrieves the certificate out of the HTTP Header and
double checks it.  I also match the common name in the
certificate with different access levels in the app.

Let me know if you are interested in any of this.

Thanks,
Yogesh

--- Dragos Pavel [EMAIL PROTECTED] wrote:

 Hi Yogesh,
 
 Thank you very much for your answer.
 I like your solution but unfortunately is not
 applicable in my case.
 In my environment the client has a certificate, the
 handshake is done on
 the server etc; in your case probably you need human
 interaction from
 your clients in order to accept the certificate when
 they are prompted
 for that.
 
 Does somebody successfully created his own bindings
 in the wsdl ( by
 using
 createDefaultBindingsfalse/createDefaultBindings
 ...) ?
 
 Thanks.
 
 
 
 On Wed, 2007-23-05 at 20:16 -0700, Yogesh Chawla -
 PD wrote:
  Hi Dragos,
  The specific situation I had was this.  My service
 was
  secured using HTTPS and Client Certificates.  I
 didn't
  want my service consumers to need a certificate
 just
  to see the WSDL.  
  
  We took the WSDL generated by xfire and did a view
  source on it.  I copied what was there and
 modified
  the WSDL and exposed in an unsecured part of the
 web
  site (a page that did not require a client
  certificate).  
  
  In our example, the application server tomcat was
  handling the HTTPS connection so the endpoint in
 the
  WSDL could be modified without affecting any of
 the
  actual data types in the schema.
  
  As a general observation, the WSDLs generated
 doing
  code first development are not the nicest looking.
  We
  do code first development using XMLBeans but write
 the
  WSDLs by hand for ease of human readability.  Once
  such WSDL can be found here:
  
 

http://wijis.wisconsin.gov/wsdl/PointerCountService.wsdl
  
  We can easily change this part of the WSDL if the
 port
  or server name changes with minimal impact:
  
  wsdl:service name=PointerCountService
  wsdl:port binding=tns:PointerCountServiceSOAP
  name=PointerCountServiceSOAP
  soap:address
 

location=https://wijis.wisconsin.gov:17444/xfire/PointerCount;
  /
  /wsdl:port
  /wsdl:service
  
  Dragos, I am not sure how much help this because
 we
  might have slightly different situations but
 hopefully
  this example will help you find your solution.
  
  Cheers,
  Yogesh
  
 

-
  To unsubscribe from this list please visit:
  
  http://xircles.codehaus.org/manage_email
  
 
 

-
 To unsubscribe from this list please visit:
 
 http://xircles.codehaus.org/manage_email
 
 


-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-05-24 Thread Dragos Pavel
OK I modified the class and I'm using the build all target provided in
the build.xml   How can one build the XFire source code successfully?
I run into this dependency and I get errors getting the related jar libs
from Error getting http://www.ibiblio.org/maven/.

Buildfile: build.xml

build-all:

init:

setproxy:

xfire.get-deps:
[mkdir] Created dir: /home/dragos/httpslib/target/lib
[mkdir] Created dir: /home/dragos/httpslib/xfire-core/target/lib

-download-dep:
  [get] Getting: http://www.ibiblio.org/maven/geronimo-
spec/jars/geronimo-spec-activation-1.0.2-rc4.jar
  [get] To: /home/dragos/httpslib/target/lib/geronimo-spec-
activation-1.0.2-rc4.jar
  [get] Error getting http://www.ibiblio.org/maven/geronimo-
spec/jars/geronimo-spec-activation-1.0.2-rc4.jar
to /home/dragos/httpslib/target/lib/geronimo-spec-activation-1.0.2-
rc4.jar

-download-dep:
  [get] Getting: http://www.ibiblio.org/maven/woodstox/jars/wstx-
asl-3.0.1.jar
  [get] To: /home/dragos/httpslib/target/lib/wstx-asl-3.0.1.jar
  [get] Error getting
http://www.ibiblio.org/maven/woodstox/jars/wstx-asl-3.0.1.jar
to /home/dragos/httpslib/target/lib/wstx-asl-3.0.1.jar

-download-dep:
  [get] Getting:
http://www.ibiblio.org/maven/stax/jars/stax-1.2.0.jar
  [get] To: /home/dragos/httpslib/target/lib/stax-1.2.0.jar
  [get] Error getting
http://www.ibiblio.org/maven/stax/jars/stax-1.2.0.jar
to /home/dragos/httpslib/target/lib/stax-1.2.0.jar

-download-dep:
  [get] Getting: http://www.ibiblio.org/maven/stax/jars/stax-
api-1.0.1.jar
  [get] To: /home/dragos/httpslib/target/lib/stax-api-1.0.1.jar
  [get] Error getting http://www.ibiblio.org/maven/stax/jars/stax-
api-1.0.1.jar to /home/dragos/httpslib/target/lib/stax-api-1.0.1.jar

-download-dep:
  [get] Getting: http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar
  [get] To: /home/dragos/httpslib/target/lib/jdom-1.0.jar
  [get] Error getting
http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar
to /home/dragos/httpslib/target/lib/jdom-1.0.jar

.


My proxy is configured right.


Yes, I observed the retrieve work you do in the handler Yeogesh, 
I understand better now. Thanks. 

Suggestions for the HTTPS issue much appreciated, or for the build.


On Thu, 2007-24-05 at 10:58 -0700, Yogesh Chawla - PD wrote:
 Hi Dragos,
 We have the users generate their clients from the WSDL
 and when they hit the service they require a client
 certficate.  
 
 During run time, the clients don't actually need the
 WSDL and the service doesn't need it either.  All of
 the HTTPS mutual authentication is handled by the
 application server.
 
 I did write an input handler to my service which
 retrieves the certificate out of the HTTP Header and
 double checks it.  I also match the common name in the
 certificate with different access levels in the app.
 
 Let me know if you are interested in any of this.
 
 Thanks,
 Yogesh
 
 --- Dragos Pavel [EMAIL PROTECTED] wrote:
 
  Hi Yogesh,
  
  Thank you very much for your answer.
  I like your solution but unfortunately is not
  applicable in my case.
  In my environment the client has a certificate, the
  handshake is done on
  the server etc; in your case probably you need human
  interaction from
  your clients in order to accept the certificate when
  they are prompted
  for that.
  
  Does somebody successfully created his own bindings
  in the wsdl ( by
  using
  createDefaultBindingsfalse/createDefaultBindings
  ...) ?
  
  Thanks.
  
  
  
  On Wed, 2007-23-05 at 20:16 -0700, Yogesh Chawla -
  PD wrote:
   Hi Dragos,
   The specific situation I had was this.  My service
  was
   secured using HTTPS and Client Certificates.  I
  didn't
   want my service consumers to need a certificate
  just
   to see the WSDL.  
   
   We took the WSDL generated by xfire and did a view
   source on it.  I copied what was there and
  modified
   the WSDL and exposed in an unsecured part of the
  web
   site (a page that did not require a client
   certificate).  
   
   In our example, the application server tomcat was
   handling the HTTPS connection so the endpoint in
  the
   WSDL could be modified without affecting any of
  the
   actual data types in the schema.
   
   As a general observation, the WSDLs generated
  doing
   code first development are not the nicest looking.
   We
   do code first development using XMLBeans but write
  the
   WSDLs by hand for ease of human readability.  Once
   such WSDL can be found here:
   
  
 
 http://wijis.wisconsin.gov/wsdl/PointerCountService.wsdl
   
   We can easily change this part of the WSDL if the
  port
   or server name changes with minimal impact:
   
 wsdl:service name=PointerCountService
 wsdl:port binding=tns:PointerCountServiceSOAP
 name=PointerCountServiceSOAP
 soap:address
  
 
 location=https://wijis.wisconsin.gov:17444/xfire/PointerCount;
   /
 /wsdl:port
 /wsdl:service
   
   

Re: [xfire-user] Running a service under SSL

2007-05-24 Thread Dragos Pavel
By trying to do this in the services.xml config:

createDefaultBindingsfalse/createDefaultBindings
bindings xmlns:e=https://acompany.com/;
  soap11Binding name=e:serviceSoap11Binding
transport=http://schemas.xmlsoap.org/soap/http;
allowUndefinedEndpoints=true
endpoints
  endpoint name=e:serviceHttpPort
url=https://test.dynadocs.com/ws/energy/lixarinterface/service; /
/endpoints
  /soap11Binding
/bindings 

One can create his own bindings pointing to https for endpoint
location ??? I have the https for location in wsdl after this change in
services.xml config but I still can't validate the generated wsdl.

The 'serviceHttpPort' has an invalid binding - 'serviceSoap11Binding'.
Check that the 'serviceSoap11Binding' binding is defined.

What's the correct way to this binding configuration ? Sorry but the man
pages are not very helpful. Any hint will be welcomed.

Thanks in advance.
 


On Thu, 2007-24-05 at 17:51 -0400, Dragos Pavel wrote:
 OK I modified the class and I'm using the build all target provided in
 the build.xml   How can one build the XFire source code successfully?
 I run into this dependency and I get errors getting the related jar libs
 from Error getting http://www.ibiblio.org/maven/.
 
 Buildfile: build.xml
 
 build-all:
 
 init:
 
 setproxy:
 
 xfire.get-deps:
 [mkdir] Created dir: /home/dragos/httpslib/target/lib
 [mkdir] Created dir: /home/dragos/httpslib/xfire-core/target/lib
 
 -download-dep:
   [get] Getting: http://www.ibiblio.org/maven/geronimo-
 spec/jars/geronimo-spec-activation-1.0.2-rc4.jar
   [get] To: /home/dragos/httpslib/target/lib/geronimo-spec-
 activation-1.0.2-rc4.jar
   [get] Error getting http://www.ibiblio.org/maven/geronimo-
 spec/jars/geronimo-spec-activation-1.0.2-rc4.jar
 to /home/dragos/httpslib/target/lib/geronimo-spec-activation-1.0.2-
 rc4.jar
 
 -download-dep:
   [get] Getting: http://www.ibiblio.org/maven/woodstox/jars/wstx-
 asl-3.0.1.jar
   [get] To: /home/dragos/httpslib/target/lib/wstx-asl-3.0.1.jar
   [get] Error getting
 http://www.ibiblio.org/maven/woodstox/jars/wstx-asl-3.0.1.jar
 to /home/dragos/httpslib/target/lib/wstx-asl-3.0.1.jar
 
 -download-dep:
   [get] Getting:
 http://www.ibiblio.org/maven/stax/jars/stax-1.2.0.jar
   [get] To: /home/dragos/httpslib/target/lib/stax-1.2.0.jar
   [get] Error getting
 http://www.ibiblio.org/maven/stax/jars/stax-1.2.0.jar
 to /home/dragos/httpslib/target/lib/stax-1.2.0.jar
 
 -download-dep:
   [get] Getting: http://www.ibiblio.org/maven/stax/jars/stax-
 api-1.0.1.jar
   [get] To: /home/dragos/httpslib/target/lib/stax-api-1.0.1.jar
   [get] Error getting http://www.ibiblio.org/maven/stax/jars/stax-
 api-1.0.1.jar to /home/dragos/httpslib/target/lib/stax-api-1.0.1.jar
 
 -download-dep:
   [get] Getting: http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar
   [get] To: /home/dragos/httpslib/target/lib/jdom-1.0.jar
   [get] Error getting
 http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar
 to /home/dragos/httpslib/target/lib/jdom-1.0.jar
 
 .
 
 
 My proxy is configured right.
 
 
 Yes, I observed the retrieve work you do in the handler Yeogesh, 
 I understand better now. Thanks. 
 
 Suggestions for the HTTPS issue much appreciated, or for the build.
 
 
 On Thu, 2007-24-05 at 10:58 -0700, Yogesh Chawla - PD wrote:
  Hi Dragos,
  We have the users generate their clients from the WSDL
  and when they hit the service they require a client
  certficate.  
  
  During run time, the clients don't actually need the
  WSDL and the service doesn't need it either.  All of
  the HTTPS mutual authentication is handled by the
  application server.
  
  I did write an input handler to my service which
  retrieves the certificate out of the HTTP Header and
  double checks it.  I also match the common name in the
  certificate with different access levels in the app.
  
  Let me know if you are interested in any of this.
  
  Thanks,
  Yogesh
  
  --- Dragos Pavel [EMAIL PROTECTED] wrote:
  
   Hi Yogesh,
   
   Thank you very much for your answer.
   I like your solution but unfortunately is not
   applicable in my case.
   In my environment the client has a certificate, the
   handshake is done on
   the server etc; in your case probably you need human
   interaction from
   your clients in order to accept the certificate when
   they are prompted
   for that.
   
   Does somebody successfully created his own bindings
   in the wsdl ( by
   using
   createDefaultBindingsfalse/createDefaultBindings
   ...) ?
   
   Thanks.
   
   
   
   On Wed, 2007-23-05 at 20:16 -0700, Yogesh Chawla -
   PD wrote:
Hi Dragos,
The specific situation I had was this.  My service
   was
secured using HTTPS and Client Certificates.  I
   didn't
want my service consumers to need a certificate
   just
to see the WSDL.  

We took the WSDL generated by xfire and did a view
source on it.  I copied 

Re: [xfire-user] Running a service under SSL

2007-05-23 Thread Dragos Pavel
Hi All,

If you successfully used JAXB2 over https can you take a quick moment
and give us a little feedback on how did you managed to make it work
properly?  Because of this:

I ran into the same issue = i.e. everything is correct in the generated
wsdl now with the EXCEPTION of the soap:address location : instead to
point to https as it should, it points to http.

We tried to not hack the
org.codehaus.xfire.transport.http.XFireServletTransport class to replace
the http with https ... by trying to modify the config settings in
services.xml as follows:

createDefaultBindingsfalse/createDefaultBindings
bindings
  soap11Binding name=e:serviceSoap11Binding
transport=http://schemas.xmlsoap.org/soap/http;
allowUndefinedEndpoints=false
endpoints
  endpoint name=e:serviceHttpPort
url=https://acompany.com; /
/endpoints
  /soap11Binding
/bindings

in order not to create the default bidings (which are wrong) but to use
our own defined bindings which point correctly to a https url!
Well unfortunatelly it didn't worked; even if I see this in the
generated wsdl after this step:

  wsdl:service name=correctservice 
wsdl:port name=correctserviceHttpPort 
binding=correctserviceSoap11Binding
  wsdlsoap:address location=https://acompany.com/
/wsdl:port
  /wsdl:service

I get this error when I try to validate the new generated wsdl (using
our own defined bindings):

The 'serviceHttpPort' has an invalid binding - 'serviceSoap11Binding'.
Check that the 'serviceSoap11Binding' binding is defined.

Have to say that I checked the wsdl and the 'serviceSoap11Binding'
binding is CORRECTLY defined.


I would appreciate a feedback from the top level moderators of this
forum on this important issue.


There is any way in which we can can fix this through the config ?


To modify the library source class is not quite nice when you deploy
multiple web services ... then recompile the source etc ...


BTW: What Yogesh Chawla mentioned didn't worked for me = and I tried
that in the first place...; wrote the WSDL and generated stubs, then
client in the top-down design = needles to say, I ran into multiple
problems described in other threads, then tried to implement a
workaround to use original wsdl instead of generated one... = now I am
sure about the root cause = in this design the generated wsdl contains a
duplicate wrong schema (issue described as well in xfire jira bugs, but
from last autumn...) even if your wsdl is correct and contains a valid
schema = now taking that valid schema of that context putting it in a
Service.xsd and modifying the project to use the schema first apprach is
fixing this problem and the generated wsdl is correct; I managed to
bring up the service only by using this schema first approach/scenario.
I wonder how exactly you implemented your other suggestion Yogesh : 
 or published the actual WSDL generated by xfire as a
 static page with the changes that I needed.
How exactly did you do this ?
 Would something like that work for you?
well it's easy to say that when we encounter so many obstacles, but I hope with 
perseverence and some corroboration from the forum would work for me as well 
and in a good design (not really having to modify that class for example...).


Regards,
Dragos









-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-04-16 Thread Tomek Sztelak

Hi Andrew,
Can you create jira issue with this ? I'll take a look at it some time later.

On 4/15/07, Yogesh Chawla - PD [EMAIL PROTECTED] wrote:

Hi Andrew,
It looks like you are having problems with the
autogenerated WSDL.  I have never cared much for the
WSDL that is autogenerated.  Instead I have either
written a WSDL and generated stubs from it or
published the actual WSDL generated by xfire as a
static page with the changes that I needed.

Would something like that work for you?

-Yogesh

--- Andrew Kerr [EMAIL PROTECTED] wrote:

 I'd really appreciate some help with this.  I spent
 hours looking
 through the XFire source today, and I could not for
 the life of me
 figure out how the URL in:

 wsdlsoap:address

location=http://www.something.com/mywebapp/services/MyService/

 is generated.

 A few more details: we're using the
 XFireConfigurableServlet in a web
 application.  We use the jsr181 service factory for
 all of our web
 services.  The wsdl always looks the same, which
 leads me to believe
 that the code somehow uses the default localhost
 domain name and web
 application context to generate the URL.

 Any pointers appreciated.

 Thanks,
 Andrew

 Andrew Kerr wrote:
  Hi there,
 
  We are porting our application to run entirely
 behind SSL.  Our client
  application is correctly loading the WSDL
 documents via SSL, but
  unfortunately, the links to the services in the
 generated WSDL are
  pointing to the unencrypted http version of the
 service.
 
  We are using JSR 181 annotations.
 
  Here is the offending part of the WSDL:
 
  wsdl:service name=MyService
 wsdl:port name=MyServiceHttpPort
 binding=tns:MyServiceHttpBinding
 wsdlsoap:address
 

location=http://www.something.com/mywebapp/services/MyService/
 /wsdl:port
  /wsdl:service
 
  How do I configure the annotations to set that URL
 to use https?
 
  Many thanks,
  Andrew Kerr
 
 
 

-
  To unsubscribe from this list please visit:
 
 http://xircles.codehaus.org/manage_email
 


-
 To unsubscribe from this list please visit:

 http://xircles.codehaus.org/manage_email




-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email





--
-
When one of our products stops working, we'll blame another vendor
within 24 hours.

-
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-04-16 Thread Andrew Kerr

Hi Tomek,

I was finally able to narrow this down to the 
org.codehaus.xfire.transport.http.XFireServletTransport.getServiceURL() 
method.


I'm not sure that what I was seeing is technically a bug in XFire.  Our 
SSL is configured at the hardware level, in a load balancer.  As such, 
Apache and Tomcat aren't even aware that the connection is encrypted 
(which it isn't behind the load balancer).


What appears to be happening is that HttpServletRequest.getScheme() 
returns http under this circumstance.


Perhaps this could be added to the set of possible configurable 
properties in the future?


In the meantime, I made a custom version of this class to replace the 
http with https, and I'm up and running again.


Thanks,
Andrew

Tomek Sztelak wrote:

Hi Andrew,
Can you create jira issue with this ? I'll take a look at it some time 
later.


On 4/15/07, Yogesh Chawla - PD [EMAIL PROTECTED] wrote:

Hi Andrew,
It looks like you are having problems with the
autogenerated WSDL.  I have never cared much for the
WSDL that is autogenerated.  Instead I have either
written a WSDL and generated stubs from it or
published the actual WSDL generated by xfire as a
static page with the changes that I needed.

Would something like that work for you?

-Yogesh

--- Andrew Kerr [EMAIL PROTECTED] wrote:

 I'd really appreciate some help with this.  I spent
 hours looking
 through the XFire source today, and I could not for
 the life of me
 figure out how the URL in:

 wsdlsoap:address

location=http://www.something.com/mywebapp/services/MyService/

 is generated.

 A few more details: we're using the
 XFireConfigurableServlet in a web
 application.  We use the jsr181 service factory for
 all of our web
 services.  The wsdl always looks the same, which
 leads me to believe
 that the code somehow uses the default localhost
 domain name and web
 application context to generate the URL.

 Any pointers appreciated.

 Thanks,
 Andrew

 Andrew Kerr wrote:
  Hi there,
 
  We are porting our application to run entirely
 behind SSL.  Our client
  application is correctly loading the WSDL
 documents via SSL, but
  unfortunately, the links to the services in the
 generated WSDL are
  pointing to the unencrypted http version of the
 service.
 
  We are using JSR 181 annotations.
 
  Here is the offending part of the WSDL:
 
  wsdl:service name=MyService
 wsdl:port name=MyServiceHttpPort
 binding=tns:MyServiceHttpBinding
 wsdlsoap:address
 

location=http://www.something.com/mywebapp/services/MyService/
 /wsdl:port
  /wsdl:service
 
  How do I configure the annotations to set that URL
 to use https?
 
  Many thanks,
  Andrew Kerr
 
 
 

-
  To unsubscribe from this list please visit:
 
 http://xircles.codehaus.org/manage_email
 


-
 To unsubscribe from this list please visit:

 http://xircles.codehaus.org/manage_email




-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email







-
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-04-15 Thread Yogesh Chawla - PD
Hi Andrew,
It looks like you are having problems with the
autogenerated WSDL.  I have never cared much for the
WSDL that is autogenerated.  Instead I have either
written a WSDL and generated stubs from it or
published the actual WSDL generated by xfire as a
static page with the changes that I needed.

Would something like that work for you?

-Yogesh

--- Andrew Kerr [EMAIL PROTECTED] wrote:

 I'd really appreciate some help with this.  I spent
 hours looking 
 through the XFire source today, and I could not for
 the life of me 
 figure out how the URL in:
 
 wsdlsoap:address 

location=http://www.something.com/mywebapp/services/MyService/
 
 is generated.
 
 A few more details: we're using the
 XFireConfigurableServlet in a web 
 application.  We use the jsr181 service factory for
 all of our web 
 services.  The wsdl always looks the same, which
 leads me to believe 
 that the code somehow uses the default localhost
 domain name and web 
 application context to generate the URL.
 
 Any pointers appreciated.
 
 Thanks,
 Andrew
 
 Andrew Kerr wrote:
  Hi there,
  
  We are porting our application to run entirely
 behind SSL.  Our client 
  application is correctly loading the WSDL
 documents via SSL, but 
  unfortunately, the links to the services in the
 generated WSDL are 
  pointing to the unencrypted http version of the
 service.
  
  We are using JSR 181 annotations.
  
  Here is the offending part of the WSDL:
  
  wsdl:service name=MyService
 wsdl:port name=MyServiceHttpPort
 binding=tns:MyServiceHttpBinding
 wsdlsoap:address 
 

location=http://www.something.com/mywebapp/services/MyService/
 /wsdl:port
  /wsdl:service
  
  How do I configure the annotations to set that URL
 to use https?
  
  Many thanks,
  Andrew Kerr
  
  
 

-
  To unsubscribe from this list please visit:
  
 http://xircles.codehaus.org/manage_email
  
 

-
 To unsubscribe from this list please visit:
 
 http://xircles.codehaus.org/manage_email
 
 


-
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email



Re: [xfire-user] Running a service under SSL

2007-04-13 Thread Andrew Kerr
I'd really appreciate some help with this.  I spent hours looking 
through the XFire source today, and I could not for the life of me 
figure out how the URL in:


wsdlsoap:address 
location=http://www.something.com/mywebapp/services/MyService/


is generated.

A few more details: we're using the XFireConfigurableServlet in a web 
application.  We use the jsr181 service factory for all of our web 
services.  The wsdl always looks the same, which leads me to believe 
that the code somehow uses the default localhost domain name and web 
application context to generate the URL.


Any pointers appreciated.

Thanks,
Andrew

Andrew Kerr wrote:

Hi there,

We are porting our application to run entirely behind SSL.  Our client 
application is correctly loading the WSDL documents via SSL, but 
unfortunately, the links to the services in the generated WSDL are 
pointing to the unencrypted http version of the service.


We are using JSR 181 annotations.

Here is the offending part of the WSDL:

wsdl:service name=MyService
   wsdl:port name=MyServiceHttpPort binding=tns:MyServiceHttpBinding
   wsdlsoap:address 
location=http://www.something.com/mywebapp/services/MyService/

   /wsdl:port
/wsdl:service

How do I configure the annotations to set that URL to use https?

Many thanks,
Andrew Kerr


-
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email



-
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email