Re: HTTP Basic Auth with wsdl2java generated Client

2008-03-10 Thread junker66


Will this be addressed in a 2.0.5 or 2.1?

g


Willem2 wrote:
 
 Hi Petrica
 
 Here is the configuration guide of the HTTP Client [1] 
 http://cwiki.apache.org/CXF20DOC/client-http-transport.html
 Your can set the proxy server , and proxy server port , 
 proxyAuthorization etc
 
 But current CXF not support to get the wsdl with the http proxy or basic 
 authentication setting,
 because we don't use the http conduit to get the wsdl.
 
 Willem.
 
 petrica wrote:
 Hello to all,

 I have a similar problem with a generated client ( it's included in mtom
 samples from Apache CXF 2.0 distribution) when I am behind of the
 corporate
 firewall. I can't pass the proxy server and I have the error : Server
 returned HTTP response code: 407 for URL ... 

 TestMtomService tms = new TestMtomService(wsdlURL, SERVICE_NAME);
 TestMtom port = (TestMtom) tms.getPort(PORT_NAME,
 TestMtom.class);
 Binding binding = ((BindingProvider)port).getBinding();
 ((SOAPBinding)binding).setMTOMEnabled(true);

 Client clt = ClientProxy.getClient(port);

 and I tried many posibilities included the code like Alex.

 More , a created a cxf.xml file that is loaded (it seems) by method call
 
 new TestMtomService(wsdlURL, SERVICE_NAME) . I let these settings in it
 :

   

 
  
  
  

   

 Also I created a class named ClientAuthent which extends
 HttpBasicAuthSupplier and override getPreemptiveUserPass 
 public UserPass getPreemptiveUserPass(
 String  conduitName,
 URL currentURL,
 Message message) 
 {
  return  createUserPass( myuser ,mypassword);
 } 


 I don't know what other settings have to do for reading all informations
 for
 ProxyServer, ProxyPort, ProxyUser and ProxyPassword.
 Also, I didn't find out others attributes for  and .

 Maybe this will solve the problem.

 Can somebody help me ?

 Thank in advance for help,
 Petrica
 ==

 Willem Jiang-2 wrote:
   
 Hi Axel,

 I checked the HTTPConduit code, your way to set the http basic 
 authentication is right.

 Can you use tcpmon to check the authentication informantion has been set 
 into the http headers?

 If not, I think it must be the CXF's bug.


 Willem.

 Axel Becker wrote:
 
 Hi,

 i generated the client code with the wsdl2java from an existing wsdl.

 now i want to connect to this service (it is an axis 1 webservice). the
 service ist protected with a http basic authentication. i use the
 following
 code, but it doesnt work :-(

 INFOServiceService ss = new INFOServiceService(SERVICE_URL,
 SERVICE_NAME);

 Client client = ClientProxy.getClient(ss.getINFOService());
 HTTPConduit httpConduit = (HTTPConduit) client.getConduit();

 httpConduit.getAuthorization().setUserName(username1);
 httpConduit.getProxyAuthorization().setUserName(username1);

 INFOService service = ss.getINFOService();
 //do somthing with service

 Where is the mistake?

 Thanks for your help!
 Axel


 PS: the serverside (axis1) code to get the auth parameter is:
 String username = MessageContext.getCurrentContext().getUsername();


   
   
 

   
 
 

-- 
View this message in context: 
http://www.nabble.com/HTTP-Basic-Auth-with-wsdl2java-generated-Client-tp11800307p15950821.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: NullPointerException thrown by CXFServlet

2008-03-07 Thread junker66

Yes, I am using spring 2.5.2 and with the latest 2.0.5 snapshot, the error
went away and the service is now up and running.  Thanks for your help.

g



dkulp wrote:
 
 
 Spring 2.5.2 or 2.0.x?
 
 This LOOKS like 2.5.2.   Logged as bug:
 
 https://issues.apache.org/jira/browse/CXF-1435
 
 Can you try the 2.0.5 snapshots and see if it's fixed?   
 
 Yea, you would thing Spring 2.5.2 would be backwords compatible, with 
 2.5.1, but
 
 Dan
 
 
 
 On Thursday 06 March 2008, junker66 wrote:
 I'm getting the following error while deploying a service in tomcat:

 Mar 6, 2008 3:09:50 PM org.apache.catalina.core.ApplicationContext log
 SEVERE: StandardWrapper.Throwable
 java.lang.NullPointerException
 at
 org.springframework.context.support.AbstractRefreshableConfigApplicati
onContext.setConfigLocations(AbstractRefreshableConfigApplicationContex
t.java:78) at
 org.springframework.context.support.ClassPathXmlApplicationContext.in
it(ClassPathXmlApplicationContext.java:137) at
 org.apache.cxf.bus.spring.BusApplicationContext.init(BusApplicationC
ontext.java:68) at
 org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.
java:84) at
 org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.
java:65) at
 org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.
java:54) at
 org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.j
ava:101) at
 org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:63
) at
 org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFSe
rvlet.java:86) at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.j
ava:1161) at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981
) at
 org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext
.java:4058)


 what could be the issue here?
 any help is appreciated.

 thanks,
 gary
 
 
 
 -- 
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog
 
 

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-thrown-by-CXFServlet-tp15883372p15907016.html
Sent from the cxf-user mailing list archive at Nabble.com.



NullPointerException thrown by CXFServlet

2008-03-06 Thread junker66

I'm getting the following error while deploying a service in tomcat:

Mar 6, 2008 3:09:50 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NullPointerException
at
org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:78)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:137)
at
org.apache.cxf.bus.spring.BusApplicationContext.init(BusApplicationContext.java:68)
at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:84)
at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
at
org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:101)
at
org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:63)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:86)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)


what could be the issue here?
any help is appreciated.

thanks,
gary
-- 
View this message in context: 
http://www.nabble.com/NullPointerException-thrown-by-CXFServlet-tp15883372p15883372.html
Sent from the cxf-user mailing list archive at Nabble.com.