Re: Q: WS-Security X.509 Certificate Token Profile
Fred, Thanks for the tip. Forgive me (I'm most likely wrong!) but that looked like a Username token not an X.509 token request. I've been digging around in http://xfire.codehaus.org/WS-Security but I can't see any wisdom there. Anything else? :) Sincerely, Ada Fred Dushin-3 wrote: All I can recommend is that you have a look at the WS-Security system test in CXF: http://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/ It's based loosely off a WS-Security interoperability scenario with WCF, and uses signature with the DirectReference method, which will send the client's X.509 certificate directly in the SOAP header. -- View this message in context: http://www.nabble.com/Q%3A-WS-Security-X.509-Certificate-Token-Profile-tp16656740p16671272.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Transfer-encoding chunked
Glen, I tried several variations. Again, I've read the paragraph that you've pointed to and tried out two possibilities: 1. Literally interpreted: the service's namespace= {Webservice_Server}. The portname= Webservice_ServerSOAPPort So we get: {Webservice_Server}Webservice_ServerSOAPPort.http-conduit = Not OK 2. Tried this: {http://62.102.2.92/Webservice_Server}Webservice_ServerSOAPPort.http-conduit = Not OK May be, I'm misinterpreting something (I'm rather new to web services)? Didn't have the time to do some debugging. Here's the wsdl fragment: ?xml version=1.0 encoding=iso-8859-1 ? definitions xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:s0=Webservice_Server xmlns=http://schemas.xmlsoap.org/wsdl/; targetNamespace=Webservice_Server types binding name=Webservice_ServerSOAPBinding type=s0:Webservice_ServerSOAPPortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document / operation name=Query_Data_PerFir soap:operation soapAction=Webservice_Server/Query_Data_PerFir style=document / input soap:body use=literal / /input output soap:body use=literal / /output /operation operation name=Wissen_Werknemer soap:operation soapAction=Webservice_Server/Wissen_Werknemer style=document / input soap:body use=literal / /input output soap:body use=literal / /output /operation operation name=Check_Update_Werknemer soap:operation soapAction=Webservice_Server/Check_Update_Werknemer style=document / input soap:body use=literal / /input output soap:body use=literal / /output /operation operation name=Query_Data_PerFir_1 soap:operation soapAction=Webservice_Server/Query_Data_PerFir_1 style=document / input soap:body use=literal / /input output soap:body use=literal / /output /operation /binding service name=Webservice_Server port name=Webservice_ServerSOAPPort binding=s0:Webservice_ServerSOAPBinding soap:address location=http://xx.xxx.x.xx/Webservice_Server/Webservice_Server.soap; / /port /service /definitions Glen Mazza-2 wrote: If you have followed the instructions in the paragraph starting with The first thing to notice is... on [1] closely in order to come up with the exact name, and it still doesn't work, then possibly we have a CXF bug. It can be tricky to get right. Glen [1] http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html Am Donnerstag, den 10.04.2008, 05:32 -0700 schrieb gbuys: OK, using wildcard *.http-conduit as the conduit name did the trick. I still don't see why the specified name doesn't work though... gbuys wrote: Hi All, I'm having an issue calling a webservice on MS IIS from JBoss 4.2.2 with Apache CXF 2.0.4 client deployed in a Spring application. The deployed service doesn't seem to support client calls from JBoss with Transfer-encoding chunked in the request header. Sometimes the service system gives a response but most of the time it hangs or returns an error message. I've deployed exactly the same client code (generated with soapUI using CXF 2.0.4.-incubator) in a stand alone program in Eclipse. This program sends requests to the service with a content-length specified in the request header. This works perfectly well, the IIS server quickly responds and remains stable. So it appears to me that JBoss is actually responsible for putting the 'Transfer-encoding chunked' in the header. How can I reconfigure my JBoss to send requests with fixed content length. As a matter of fact, I think I should configure that only the web service requests have content-length specified. All other requests/responses should remain chunked. Or do I have to configure CXF or change my service client code to force the requests having a content-length header? I did some experiments with a cxf.xml in my classpath without succes (ip address
Re: Multiple addresses for a service
I guess we could preserve the existing behavior while still use the correct bean. We just need to take into account the path separator / and only select the one that has a full match. On Mon, Apr 14, 2008 at 4:15 AM, Willem Jiang [EMAIL PROTECTED] wrote: That is because CXF support to map a Http request to a soap request, such as http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/cxf;. To implement this by default , CXF use the match the first policy(call the String.startWith()) to lookup the proper destination. With these policy http://localhost:8080/MyThingInstance?wsdl; and http://localhost:8080/MyThingInstance2?wsdl; requests will be dispatched destination which address is MyThingInstance. So you always get the same WSDL with these two URL. If you want to get the different wsdl definitions from Address1 and Address2 , you need to avoid the Address2 starting with Address1. Willem Arul Dhesiaseelan wrote: Thanks Dan. But when I implement as shown below. MyThing implementor = new MyThingImpl(); String address = http://localhost:8080/MyThingInstance; javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address, implementor); MyThing implementor2 = new MyThingImpl(); String address2 = http://localhost:8080/MyThingInstance2; javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address2, implementor2); I tried to access http://localhost:8080/MyThingInstance?wsdl and http://localhost:8080/MyThingInstance2?wsdl. Both the WSDL has the same service definition. I do not see MyThingInstance2 anywhere in the WSDL. Am I missing something? Best regards Arul Daniel Kulp wrote: On Wednesday 09 April 2008, Arul Dhesiaseelan wrote: Daniel Kulp wrote: On Wednesday 09 April 2008, Benson Margulies wrote: A bit of googling got me nowhere here. I want to publish a service on both a http: address and a local: address. Two jaxws:endpoints? Can they point to the same #implementation bean? Yep. It's the same as if you did: MyThing thing = new MyThingImpl(); Endpoint.publish(address1, thing); Endpoint.publish(address2, thing); Dan, Does this work? MyThing thing1 = new MyThingImpl(); MyThing thing2 = new MyThingImpl(); Endpoint.publish(address1, thing1); Endpoint.publish(address2, thing2); When I invoke the service at address1, it should invoke thing1 and address2 should invoke thing2. Thanks! Arul Yep. That's exactly how it's supposed to work. -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
REST, error handling, HTTP status codes
Hello, I'm looking into providing some REST based services with CXF. The examples are great but I can't see something demonstrating error handling. While error handling with REST doesn't seem to be particularly well defined, HTTP status codes would surfice. How easy is this to achieve with CXF? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
RE: [HelloWorld JavaScript client] problem on IE.
Thanks a lot. My tests are ok now. Regards Brice Vandeputte -Message d'origine- De : Benson Margulies [mailto:[EMAIL PROTECTED] Envoyé : vendredi 11 avril 2008 20:25 À : cxf-user@incubator.apache.org Objet : Re: [HelloWorld JavaScript client] problem on IE. There's a new snapshot.
Re: REST, error handling, HTTP status codes
Hi This would be fairly easy to do with JAX-RS. There's a number of ways to propogate HTTP errors with JAX-RS from your application code : 1. throw WenApplicationException public void putIt(String s) { throw new WebApplicationException() } By default it will cause 500. 2. You can also use a Response object, either directly or by wrapping it into a WebApplicationException public void putIt(String s) { throw new WebApplicationException( Response.status(406).entity(descitptionOfProblemInXml).build()) } WebApplicationException is a RuntimeException so you can use (possibly) at any level in your app... or just @ProduceMime(application/atom+entry) @Path({id}) public Response getIt(Long id) { Entry e = find(id); if (e == null) { return Response.status(errorCode).entity(descitptionOfProblemInXml).build(); } else { return Response.entity(e).build(); } } Cheers, Sergey Hello, I'm looking into providing some REST based services with CXF. The examples are great but I can't see something demonstrating error handling. While error handling with REST doesn't seem to be particularly well defined, HTTP status codes would surfice. How easy is this to achieve with CXF? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: REST, error handling, HTTP status codes
That's great. Is this included in one of the examples, or do you have something you can zip up and send me? The example set with CXF is brilliant - running stuff that actually works (with ant) makes the product so much easier to comprehend. John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com Sergey Beryozkin [EMAIL PROTECTED] 14/04/2008 09:54 Please respond to cxf-user@incubator.apache.org To cxf-user@incubator.apache.org cc Subject Re: REST, error handling, HTTP status codes Hi This would be fairly easy to do with JAX-RS. There's a number of ways to propogate HTTP errors with JAX-RS from your application code : 1. throw WenApplicationException public void putIt(String s) { throw new WebApplicationException() } By default it will cause 500. 2. You can also use a Response object, either directly or by wrapping it into a WebApplicationException public void putIt(String s) { throw new WebApplicationException( Response.status(406).entity(descitptionOfProblemInXml).build()) } WebApplicationException is a RuntimeException so you can use (possibly) at any level in your app... or just @ProduceMime(application/atom+entry) @Path({id}) public Response getIt(Long id) { Entry e = find(id); if (e == null) { return Response.status(errorCode).entity(descitptionOfProblemInXml).build(); } else { return Response.entity(e).build(); } } Cheers, Sergey Hello, I'm looking into providing some REST based services with CXF. The examples are great but I can't see something demonstrating error handling. While error handling with REST doesn't seem to be particularly well defined, HTTP status codes would surfice. How easy is this to achieve with CXF? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: REST, error handling, HTTP status codes
Is jax-rs included with CXF? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: REST, error handling, HTTP status codes
Hiya, I'll look at 2.1. This document is very useful: http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html It probably just needs a little work to expand on some of the topics to answer questions covering status codes, security, etc. John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com Sergey Beryozkin [EMAIL PROTECTED] 14/04/2008 10:23 Please respond to cxf-user@incubator.apache.org To cxf-user@incubator.apache.org cc Subject Re: REST, error handling, HTTP status codes Hi It's shipped with 2.1-SNAPSHOT. Have a look please at a few JAX-RS demos available in the distribution. I was also about to create a demo showing how one can easily do AtomPub with CXF and JAX-RS but I haven't had time due to time constraints. I've promised a number of times to document what one can do with CXF and JAX-RS, haven't had time to do it either, but with the 2.1 release approaching (according to Dan) I'll need to do it soon. CXF JAX-RS support 0.6 version of jsr-311 api. Jersey, RestEasy, Restlests are working with 0.7. CXF JAX-RS is likely to be able to support a number of scenarious, due its good and simple integration with Spring. Cheers, Sergey Is jax-rs included with CXF? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Qualified/unqualified namespace interoperability problem
Hi all, I have an interoperability problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a VBA client program using MS Office 2003 Web Services Toolkit 2.03. When sending a request from the VBA client to the server, the response fails with the fault Found element {http://annuaire.ciss.lu}questions but could not find matching RPC/Literal part. If I'm correct, the VBA client sends the request using qualified namespace for element questions but CXF expects an unqualified namespace. Due to technical constraints, I have to use RPC/Literal encoding and cannot switch to e.g. Document/Literal. This is my web service: package lu.ciss.annuaire.services; @WebService(name=SimpleServiceName, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface SimpleService { @WebMethod(operationName=GetAnswers) @WebResult(name=answer) public String getAnswers(@WebParam(name=questions) String[] questions); } The VBA client sends the following request: ?xml version=1.0 encoding=UTF-8 standalone=no? SOAP-ENV:Envelope xmlns:SOAPSDK1=http://www.w3.org/2001/XMLSchema; xmlns:SOAPSDK2=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAPSDK3=http://schemas.xmlsoap.org/soap/encoding/; xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; SOAP-ENV:Body SOAPSDK4:GetAnswers xmlns:SOAPSDK4=http://annuaire.ciss.lu; SOAPSDK4:questions SOAPSDK3:arrayType=SOAPSDK1:string[5] SOAPSDK3:offset=[1] SOAPSDK2:type=SOAPSDK3:Array itemWhat?/item itemWhy?/item itemWhere?/item itemWho?/item itemWhen?/item /SOAPSDK4:questions /SOAPSDK4:GetAnswers /SOAP-ENV:Body /SOAP-ENV:Envelope As you can see the questions parameter is qualified. I know of the @XmlSchema annotation that you can place in the packge-info.java, but I don't know how to set the elementFormDefault to qualified for the namespace http://jaxb.dev.java.net/array;. Moreover the problem remains the same when using only simple types (e.g. integers or strings) instead of an array: the elements describing the parameters are always qualified. Here is an extract of the WSDL: ?xml version=1.0 encoding=UTF-8 standalone=no? wsdl:definitions xmlns:ns1=http://annuaire.ciss.lu; xmlns:ns2=http://jaxb.dev.java.net/array; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=SimpleServiceName targetNamespace=http://annuaire.ciss.lu; wsdl:types xs:schema xmlns=http://jaxb.dev.java.net/array; xmlns:xs=http://www.w3.org/2001/XMLSchema; attributeFormDefault=unqualified elementFormDefault=unqualified targetNamespace=http://jaxb.dev.java.net/array; xs:complexType final=#all name=stringArray xs:sequence xs:element maxOccurs=unbounded minOccurs=0 name=item nillable=true type=xs:string / /xs:sequence /xs:complexType /xs:schema /wsdl:types wsdl:message name=GetAnswers wsdl:part name=questions type=ns2:stringArray/wsdl:part /wsdl:message wsdl:message name=GetAnswersResponse wsdl:part name=answer type=xsd:string/wsdl:part /wsdl:message wsdl:portType name=SimpleServiceName wsdl:operation name=GetAnswers wsdl:input message=ns1:GetAnswers name=GetAnswers /wsdl:input wsdl:output message=ns1:GetAnswersResponse name=GetAnswersResponse /wsdl:output /wsdl:operation /wsdl:portType /wsdl:definitions Can anyone confirm that the problem originates from the fact that elementFormDefault is set to unqualified and setting it to qualified could solve the problem? If so, how is it possible to instruct CXF in general that parameter elements are always qualified? Moreover, perhaps someone uses CXF with the MS Web services toolkit and can share his experiences with me? Unfortunately, the toolkit seems quite buggy ... :-( Thank you very much for any comments. Best regards, Pierre
Re: [CXF] deployment problems
Tryed also with CXF 2.0.5.. same results. Oh, in the last post i mess with copy/paste.. this is my endpoint definition: jaxws:endpoint id=ese6ordine serviceName=s:OrdineService implementor=isi.esercitazione.java2wsdl.Server address=/ordine xmlns:s=http://www.rivenditore.org/Ordine; wsdlLocation = WEB-INF/ordini.wsdl / Still stuck, thx, again Lorenzo Cencio wrote: Again with this issue: This is my enpoint definition: jaxws:endpoint id=ese6ordine serviceName=s:OrdineService implementor=isi.esercitazione.java2wsdl.Server address=/ordine WEB-INF/ordini.wsdl xmlns:s=http://www.rivenditore.org/Ordine; wsdlLocation = WEB-INF/ordini.wsdl / If i remove the wsdlLocation, the wsdl is correctly generated and everything works fine (all calls are replyed with my message). If i leave, the http://localhost:8080/ese6/ordine?wsdl is correctly showign WEB-INF/ordini.wsdl but all calls are threat as oneway... if u need i can send the war and sources. Thx for any help, Lorenzo Cencio wrote: dkulp wrote: Couple questions: 1) What version of CXF? apache-apache-cxf-2.0.4-incubator dkulp wrote: 2) What deployment environment? Tomcat? Yes, Tomcat dkulp wrote: 3) What's logged to the servers logs? Nothing on server logs.. Just a Error reading XMLStreamReader on client side for Request/Response operation. dkulp wrote: Looking at the code, if res = msgFac.createMessage(); throws an exception, the return is null and nothing would get written out. It might be best to wrapper the exceptions with a WebServiceException or SOAPFaultException and throw that so the proper exception handling could occur. I try to writeOut the response just before the return, and it's fine. I also try to catch any error doing a throw new WebServiceException(e); but no message is going out.. dkulp wrote: Another note: Instead of creating all the logger beans and the Bus bean and configuring all the interceptors and such, it's probably easier to just do: cxf:bus cxf:features cxf:logging/ /cxf:features /cxf:bus ns: xmlns:cxf=http://cxf.apache.org/core; spring validation info: http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd Certainly less verbose. :-) Yes :D it's more clean and easy to read. thx for the tip, Thx Dan, if u need any other info or have any solution to test just tell Regards, Lorenzo On Friday 11 April 2008, Cencio wrote: Hi all, I have a provider implementation for a service, then i want deploy with a specified wsdl and every msg should call the invoke() method I deploy it and my specified wsdl if correctly displayed, but every msg sent to the service is threat as OneWay (an empty 200ok is sent every time... ) Here is the config: web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app context-param param-namecontextConfigLocation/param-name param-valueWEB-INF/beans.xml/param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/*/url-pattern /servlet-mapping /web-app beans.xml beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:jaxws=http://cxf.apache.org/jaxws; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd; import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf-extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-servlet.xml / bean id=logInbound class=org.apache.cxf.interceptor.LoggingInInterceptor/ bean id=logOutbound class=org.apache.cxf.interceptor.LoggingOutInterceptor/ bean id=cxf class=org.apache.cxf.bus.CXFBusImpl property name=inInterceptors list ref bean=logInbound/ /list /property property name=outInterceptors list ref bean=logOutbound/ /list /property property
Re: xmlns problem
yes, this was the problem, I was using Artix IDE to generate jar. As i was not compiling from the SOURCE folder in my Java Project, it did not put the package-info.java file in the jar, and hence getting this problem. Thanks again. dkulp wrote: On Thursday 10 April 2008, mmansoor wrote: My SOAP message has an object Foo, which has a body type as anyType. I am using JAXB to generate that anyType body. Now when i look at the Message that is being generated, there is one extra tag as : ns4:Body xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:ns6=http://my.a.b.c.com/v1; xmlns= xsi:type=FooInner Any idea how can i remove this extra [xmlns=] attribute ?. Thanks I'd probably need to see the entire xml message as well as the objects themselves, but usually jaxb only generates that xmlns= thing when it really should be there. For example, are you Foo.java and FooInner objects in the same package? Is there a package-info.java for the FooInner type that specifies elementFormDefault=QUALIFED? -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog -- View this message in context: http://www.nabble.com/xmlns-problem-tp16617506p16678513.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: [CXF] deployment problems [maybe bug?]
Ok... it don't seems a configuration error... In my wsdl i have 2 operation, a request/response and a Oneway. If i remove the Oneway it works!! If i add it all operations are threated as Oneway.. Seems a bug.. someone can try to reproduce it? Cencio wrote: Tryed also with CXF 2.0.5.. same results. Oh, in the last post i mess with copy/paste.. this is my endpoint definition: jaxws:endpoint id=ese6ordine serviceName=s:OrdineService implementor=isi.esercitazione.java2wsdl.Server address=/ordine xmlns:s=http://www.rivenditore.org/Ordine; wsdlLocation = WEB-INF/ordini.wsdl / Still stuck, thx, again Lorenzo Cencio wrote: Again with this issue: This is my enpoint definition: jaxws:endpoint id=ese6ordine serviceName=s:OrdineService implementor=isi.esercitazione.java2wsdl.Server address=/ordine WEB-INF/ordini.wsdl xmlns:s=http://www.rivenditore.org/Ordine; wsdlLocation = WEB-INF/ordini.wsdl / If i remove the wsdlLocation, the wsdl is correctly generated and everything works fine (all calls are replyed with my message). If i leave, the http://localhost:8080/ese6/ordine?wsdl is correctly showign WEB-INF/ordini.wsdl but all calls are threat as oneway... if u need i can send the war and sources. Thx for any help, Lorenzo Cencio wrote: dkulp wrote: Couple questions: 1) What version of CXF? apache-apache-cxf-2.0.4-incubator dkulp wrote: 2) What deployment environment? Tomcat? Yes, Tomcat dkulp wrote: 3) What's logged to the servers logs? Nothing on server logs.. Just a Error reading XMLStreamReader on client side for Request/Response operation. dkulp wrote: Looking at the code, if res = msgFac.createMessage(); throws an exception, the return is null and nothing would get written out. It might be best to wrapper the exceptions with a WebServiceException or SOAPFaultException and throw that so the proper exception handling could occur. I try to writeOut the response just before the return, and it's fine. I also try to catch any error doing a throw new WebServiceException(e); but no message is going out.. dkulp wrote: Another note: Instead of creating all the logger beans and the Bus bean and configuring all the interceptors and such, it's probably easier to just do: cxf:bus cxf:features cxf:logging/ /cxf:features /cxf:bus ns: xmlns:cxf=http://cxf.apache.org/core; spring validation info: http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd Certainly less verbose. :-) Yes :D it's more clean and easy to read. thx for the tip, Thx Dan, if u need any other info or have any solution to test just tell Regards, Lorenzo On Friday 11 April 2008, Cencio wrote: Hi all, I have a provider implementation for a service, then i want deploy with a specified wsdl and every msg should call the invoke() method I deploy it and my specified wsdl if correctly displayed, but every msg sent to the service is threat as OneWay (an empty 200ok is sent every time... ) Here is the config: web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app context-param param-namecontextConfigLocation/param-name param-valueWEB-INF/beans.xml/param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/*/url-pattern /servlet-mapping /web-app beans.xml beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:jaxws=http://cxf.apache.org/jaxws; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd; import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf-extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-servlet.xml / bean id=logInbound class=org.apache.cxf.interceptor.LoggingInInterceptor/ bean id=logOutbound class=org.apache.cxf.interceptor.LoggingOutInterceptor/ bean id=cxf class=org.apache.cxf.bus.CXFBusImpl property name=inInterceptors
Re: Qualified/unqualified namespace interoperability problem
Pierre, The WSI-Basic Profile specifically states that in RPC/Literal, the part accessor elements are ALWAYS to be unqualified. This is per WSI-BP spec. Basically, in RPC/Literal, the wrapper element (operationName) is qualified, the part accessor elements are unqualified, and the subelements of the parts are controlled by the schema. SOAPSDK4:GetAnswers xmlns:SOAPSDK4=http://annuaire.ciss.lu; SOAPSDK4:questions SOAPSDK3:arrayType=SOAPSDK1:string[5] SOAPSDK3:offset=[1] SOAPSDK2:type=SOAPSDK3:Array itemWhat?/item This looks like the VBA client is generating a RPC/Encoded message, not an RPC literal. The SOAPSDK3:arrayType attribute is the key. That would only be there for an Encoded message. CXF doesn't support RPC/Encoded. Dan On Monday 14 April 2008, pierre post wrote: Hi all, I have an interoperability problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a VBA client program using MS Office 2003 Web Services Toolkit 2.03. When sending a request from the VBA client to the server, the response fails with the fault Found element {http://annuaire.ciss.lu}questions but could not find matching RPC/Literal part. If I'm correct, the VBA client sends the request using qualified namespace for element questions but CXF expects an unqualified namespace. Due to technical constraints, I have to use RPC/Literal encoding and cannot switch to e.g. Document/Literal. This is my web service: package lu.ciss.annuaire.services; @WebService(name=SimpleServiceName, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface SimpleService { @WebMethod(operationName=GetAnswers) @WebResult(name=answer) public String getAnswers(@WebParam(name=questions) String[] questions); } The VBA client sends the following request: ?xml version=1.0 encoding=UTF-8 standalone=no? SOAP-ENV:Envelope xmlns:SOAPSDK1=http://www.w3.org/2001/XMLSchema; xmlns:SOAPSDK2=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAPSDK3=http://schemas.xmlsoap.org/soap/encoding/; xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; SOAP-ENV:Body SOAPSDK4:GetAnswers xmlns:SOAPSDK4=http://annuaire.ciss.lu; SOAPSDK4:questions SOAPSDK3:arrayType=SOAPSDK1:string[5] SOAPSDK3:offset=[1] SOAPSDK2:type=SOAPSDK3:Array itemWhat?/item itemWhy?/item itemWhere?/item itemWho?/item itemWhen?/item /SOAPSDK4:questions /SOAPSDK4:GetAnswers /SOAP-ENV:Body /SOAP-ENV:Envelope As you can see the questions parameter is qualified. I know of the @XmlSchema annotation that you can place in the packge-info.java, but I don't know how to set the elementFormDefault to qualified for the namespace http://jaxb.dev.java.net/array;. Moreover the problem remains the same when using only simple types (e.g. integers or strings) instead of an array: the elements describing the parameters are always qualified. Here is an extract of the WSDL: ?xml version=1.0 encoding=UTF-8 standalone=no? wsdl:definitions xmlns:ns1=http://annuaire.ciss.lu; xmlns:ns2=http://jaxb.dev.java.net/array; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=SimpleServiceName targetNamespace=http://annuaire.ciss.lu; wsdl:types xs:schema xmlns=http://jaxb.dev.java.net/array; xmlns:xs=http://www.w3.org/2001/XMLSchema; attributeFormDefault=unqualified elementFormDefault=unqualified targetNamespace=http://jaxb.dev.java.net/array; xs:complexType final=#all name=stringArray xs:sequence xs:element maxOccurs=unbounded minOccurs=0 name=item nillable=true type=xs:string / /xs:sequence /xs:complexType /xs:schema /wsdl:types wsdl:message name=GetAnswers wsdl:part name=questions type=ns2:stringArray/wsdl:part /wsdl:message wsdl:message name=GetAnswersResponse wsdl:part name=answer type=xsd:string/wsdl:part /wsdl:message wsdl:portType name=SimpleServiceName wsdl:operation name=GetAnswers wsdl:input message=ns1:GetAnswers name=GetAnswers /wsdl:input wsdl:output message=ns1:GetAnswersResponse name=GetAnswersResponse /wsdl:output /wsdl:operation /wsdl:portType /wsdl:definitions Can anyone confirm that the problem originates from the fact that elementFormDefault is set to unqualified and setting it to qualified could solve the problem? If so, how is it possible to instruct CXF in general that parameter elements are always qualified? Moreover, perhaps someone uses CXF with the MS Web services toolkit and can share his experiences with me? Unfortunately, the toolkit seems quite
Re: [CXF] deployment problems
On Monday 14 April 2008, Cencio wrote: If i remove the wsdlLocation, the wsdl is correctly generated and everything works fine (all calls are replyed with my message). If i leave, the http://localhost:8080/ese6/ordine?wsdl is correctly showign WEB-INF/ordini.wsdl but all calls are threat as oneway... if u need i can send the war and sources. If you could, that would be GREAT! Having a reproducable testcase makes it MUCH easier to figure out what's going on. You can send it directly to me at [EMAIL PROTECTED] to avoid the apache spam filters that tend to rip of attachments. Dan Thx for any help, Lorenzo -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
ws-transaction
Are there any plans on implementing ws-transaction specs with apache cxf or is there any work going on regarding this yet? Thanks,
Re: [CXF] deployment problems
I got the testcase, thanks. Just to clarify, I need to uncomment the operation in the wsdl as well. That said, if I do that, it actually works for me with the 2.1 trunk. I get: [java] Invoking notifica... [java] Invoking submitOrdine... [java] submitOrdine.result=123456 That said, it's wrong. If I wireshark the actual wire transfer, the notifica operation is returning an empty soap message response. Thus, there is an issue. Actually, now that I think about it, there were a LOT of changes in the one-way stuff for 2.1 as the 2.1 JAX-WS TCK has a WHOLE bunch of new tests for one-ways that the 2.0 tck doesn't have. Thus, it may be working just because of those changes. I'll have to get a 2.0.x environment setup. That will take a bit longer, but I do want to get it properly working for 2.1 since we hope to release 2.1 later this week so that's actually going to be my priority for today. Dan On Monday 14 April 2008, Cencio1980 wrote: Hi Dan, that's my testcase. As i told you in the last mail i found that removing OneWay operation the request/response one now works. if i add it all operations works as oneway. check build.xml for the tomcat path.. ant deployto deploy ant run_Client to run the client (edit client/org/rivenditore/ordine/OrdineInterface_OrdineInterfaceEndpoint_ Client.java uncomment the call for oneway operation to add it) Thx, Lorenzo -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
[2.0.5] Help to get soap message from Spring service...
I am trying to setup a UserService via Spring that takes a userId, and returns a User object. I setup a LoggingInterceptor, and I seem to be getting a user object back: *INFO: Outbound Message --- Encoding: UTF-8 Headers: {SOAPAction=[], Accept=[*]} Messages: Payload: soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUser xmlns:ns1=http://service.baselogic.com/; userId-1/userId/ns1:getUser/soap:Body/soap:Envelope -- 14-Apr-2008 10:02:32 org.apache.cxf.interceptor.LoggingInInterceptor logging INFO: Inbound Message Encoding: UTF-8 Headers: {Content-Length=[1576], Date=[Mon, 14 Apr 2008 17:02:32 GMT], SOAPAction=[], Server=[Apache-Coyote/1.1], content-type=[text/xml;charse t=UTF-8]} Messages: Message: Payload: soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUserResponse xmlns:ns1=http://service.baselogi c.com/returnns2:address xmlns:ns2=http://domain.baselogic.com ns2:address725 Florida Street #5/ns2:addressns2:citySan Francisco/ns2 :cityns2:countryUS/ns2:countryns2:id-1 /ns2:idns2:postalCode94110/ns2:postalCodens2:provinceCA/ns2:provincens2:version1/ns2:ve rsion/ns2:addressns2:confirmPassword xmlns:ns2= http://domain.baselogic.com; xmlns:ns3= http://www.w3.org/2001/XMLSchema-instance; ns3:nil=t rue /ns2:email xmlns:ns2=http://domain.baselogic.com; [EMAIL PROTECTED]/ns2:emailns2:firstName xmlns:ns2= http://domain.baselogic.com; Mick/ns2:firstNamens2:id xmlns:ns2=http://domain.baselogic.com;-1/ns2:idns2:lastName xmlns:ns2=http://domain.baselogic.com;Knutson/ns 2:lastNamens2:password xmlns:ns2=http://domain.baselogic.com;12dea96fec20593566ab75692c9949596833adc9/ns2:passwordns2:passwordHint xmlns:n s2=http://domain.baselogic.com;A male kitty./ns2:passwordHintns2:phoneNumber xmlns:ns2= http://domain.baselogic.com;(415) 555-1804/ns2:pho neNumberns2:roles xmlns:ns2=http://domain.baselogic.com; xmlns:ns3= http://www.w3.org/2001/XMLSchema-instance; ns3:nil=true /ns2:username xmlns:ns2=http://domain.baselogic.com;mickknutson/ns2:usernamens2:version xmlns:ns2=http://domain.baselogic.com;1/ns2:versionns2:websit e xmlns:ns2=http://domain.baselogic.com;http://baselogic.com /ns2:website/return/ns1:getUserResponse/soap:Body/soap:Envelope * So when I do this: *UserManager userManager = (UserManager) factory.create();* then *userManager.getUser(-1);* I get a null User Object. Not the object I see in my soap envelope above. How do I get my User Object? All the examples I see show me to do the same thing I am already doing, but this does not work Thanks for your help -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---
Embedded jetty with session support
Hi all, where can I find more information regarding jetty-configuration? I took a look at the http://cwiki.apache.org/CXF20DOC/jetty-configuration.html page, but some things are still unclear to me, e.g. how does this fit in the server configuration/initialization and what should be done on the client side? What I want to setup is: unit testing framework = cxf + embedded jetty with session support The setup should be as easy as possible. Thanks for any help! -- View this message in context: http://www.nabble.com/Embedded-jetty-with-session-support-tp16685265p16685265.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: [2.0.5] Help to get soap message from Spring service...
Few questions: 1) Is there a wsdl for this service? 2) How is your factory configured/created? Do you have the code? 3) Is your factory a simple frontend or jaxws? If jaxws, is the UserManager class properly annotated? It looks like the service is either RPC/Literal or it's using a mix of schema qualifications. The schema with the targetNamespace of: http://service.baselogic.com/ seems to be unqualified and the schema with targetNamespace of: http://domain.baselogic.com is qualified. Do you have generated types for the http://service.baselogic.com stuff or are you letting CXF do it? Most likely, the best bet is to go with the JAX-WS factory and make sure the interface is properly annotated. Dan On Monday 14 April 2008, Mick Knutson wrote: I am trying to setup a UserService via Spring that takes a userId, and returns a User object. I setup a LoggingInterceptor, and I seem to be getting a user object back: *INFO: Outbound Message --- Encoding: UTF-8 Headers: {SOAPAction=[], Accept=[*]} Messages: Payload: soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUser xmlns:ns1=http://service.baselogic.com/; userId-1/userId/ns1:getUser/soap:Body/soap:Envelope -- 14-Apr-2008 10:02:32 org.apache.cxf.interceptor.LoggingInInterceptor logging INFO: Inbound Message Encoding: UTF-8 Headers: {Content-Length=[1576], Date=[Mon, 14 Apr 2008 17:02:32 GMT], SOAPAction=[], Server=[Apache-Coyote/1.1], content-type=[text/xml;charse t=UTF-8]} Messages: Message: Payload: soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUserResp onse xmlns:ns1=http://service.baselogi c.com/returnns2:address xmlns:ns2=http://domain.baselogic.com ns2:address725 Florida Street #5/ns2:addressns2:citySan Francisco/ns2 :cityns2:countryUS/ns2:countryns2:id-1 /ns2:idns2:postalCode94110/ns2:postalCodens2:provinceCA/ns2:p rovincens2:version1/ns2:ve rsion/ns2:addressns2:confirmPassword xmlns:ns2= http://domain.baselogic.com; xmlns:ns3= http://www.w3.org/2001/XMLSchema-instance; ns3:nil=t rue /ns2:email xmlns:ns2=http://domain.baselogic.com; [EMAIL PROTECTED]/ns2:emailns2:firstName xmlns:ns2= http://domain.baselogic.com; Mick/ns2:firstNamens2:id xmlns:ns2=http://domain.baselogic.com;-1/ns2:idns2:lastName xmlns:ns2=http://domain.baselogic.com;Knutson/ns 2:lastNamens2:password xmlns:ns2=http://domain.baselogic.com;12dea96fec20593566ab75692c9949 596833adc9/ns2:passwordns2:passwordHint xmlns:n s2=http://domain.baselogic.com;A male kitty./ns2:passwordHintns2:phoneNumber xmlns:ns2= http://domain.baselogic.com;(415) 555-1804/ns2:pho neNumberns2:roles xmlns:ns2=http://domain.baselogic.com; xmlns:ns3= http://www.w3.org/2001/XMLSchema-instance; ns3:nil=true /ns2:username xmlns:ns2=http://domain.baselogic.com;mickknutson/ns2:usernamens2 :version xmlns:ns2=http://domain.baselogic.com;1/ns2:versionns2:websit e xmlns:ns2=http://domain.baselogic.com;http://baselogic.com /ns2:website/return/ns1:getUserResponse/soap:Body/soap:Envelo pe * So when I do this: *UserManager userManager = (UserManager) factory.create();* then *userManager.getUser(-1);* I get a null User Object. Not the object I see in my soap envelope above. How do I get my User Object? All the examples I see show me to do the same thing I am already doing, but this does not work Thanks for your help -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Embedded jetty with session support
Hm... well, this isn't quite as easy as I had hoped it would be due to a protected method that probably should be public. Right now, the ONLY way to configure the session support is via a spring config. Thus, in your test, you could have a spring xml config to configure the session support and create a Bus based on that prior to publishing your service.The OTHER option is to publish a dummy service on the port you want so the jetty engine starts up, grab the JettyHTTPServerEngineFactory from the bus, get the JettyHTTPServerEngine for the port, call the setSessionSupport(true) method, then publish the real service you want. The main problem is that the method: JettyHTTPServerEngine createJettyHTTPServerEngine(int port, String protocol) on the JettyHTTPServerEngineFactory is not public. I'm going to make it public in my next commit. Ideally, you would get the JettyHTTPServerEngineFactory from the Bus, call that method to get the engine for the port you want, configure it, then publish your service. Right now, the dummy service needs to be published first to make sure that method is called. Dan On Monday 14 April 2008, versus wrote: Hi all, where can I find more information regarding jetty-configuration? I took a look at the http://cwiki.apache.org/CXF20DOC/jetty-configuration.html page, but some things are still unclear to me, e.g. how does this fit in the server configuration/initialization and what should be done on the client side? What I want to setup is: unit testing framework = cxf + embedded jetty with session support The setup should be as easy as possible. Thanks for any help! -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: [CXF] deployment problems
This is now fixed on trunk. I'll get another 2.1 snapshot out later today as there are several other fixes that need to get out to people to test as well. Dan On Monday 14 April 2008, Daniel Kulp wrote: I got the testcase, thanks. Just to clarify, I need to uncomment the operation in the wsdl as well. That said, if I do that, it actually works for me with the 2.1 trunk. I get: [java] Invoking notifica... [java] Invoking submitOrdine... [java] submitOrdine.result=123456 That said, it's wrong. If I wireshark the actual wire transfer, the notifica operation is returning an empty soap message response. Thus, there is an issue. Actually, now that I think about it, there were a LOT of changes in the one-way stuff for 2.1 as the 2.1 JAX-WS TCK has a WHOLE bunch of new tests for one-ways that the 2.0 tck doesn't have. Thus, it may be working just because of those changes. I'll have to get a 2.0.x environment setup. That will take a bit longer, but I do want to get it properly working for 2.1 since we hope to release 2.1 later this week so that's actually going to be my priority for today. Dan On Monday 14 April 2008, Cencio1980 wrote: Hi Dan, that's my testcase. As i told you in the last mail i found that removing OneWay operation the request/response one now works. if i add it all operations works as oneway. check build.xml for the tomcat path.. ant deployto deploy ant run_Client to run the client (edit client/org/rivenditore/ordine/OrdineInterface_OrdineInterfaceEndpoin t_ Client.java uncomment the call for oneway operation to add it) Thx, Lorenzo -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Q: WS-Security X.509 Certificate Token Profile
Even this? !-- -- !-- This bean is an Out interceptor which will add a Timestamp, -- !-- sign the Timstamp and Body, and then encrypt the Timestamp -- !-- and Body. It uses 3DES as the symmetric key algorithm. -- !-- -- bean class=org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor id=TimestampSignEncrypt_Request constructor-arg map entry key=action value=Timestamp Signature Encrypt/ !-- entry key=action value=Timestamp Signature/ -- entry key=user value=alice/ entry key=signaturePropFile value=org/apache/cxf/ systest/ws/security/alice.properties/ entry key=encryptionPropFile value=org/apache/cxf/ systest/ws/security/bob.properties/ entry key=encryptionUser value=Bob/ entry key=signatureKeyIdentifier value=DirectReference/ entry key=passwordCallbackClass value=org.apache.cxf.systest.ws.security.KeystorePasswordCallback/ entry key=signatureParts value={Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd }Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body/ !-- -- !-- Recommendation: signatures should be encrypted -- !-- -- entry key=encryptionParts value={Element}{http://www.w3.org/2000/09/xmldsig# }Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body/ !-- entry key=encryptionKeyTransportAlgorithm value=RSA15/ -- entry key=encryptionSymAlgorithm value=http://www.w3.org/2001/04/xmlenc#tripledes-cbc / /map /constructor-arg /bean !-- -- !-- This bean is an In interceptor which validated a signed, -- !-- encrypted resposne, and timestamped. -- !-- -- !-- -- bean class=org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor id=TimestampSignEncrypt_Response constructor-arg map entry key=action value=Timestamp Signature Encrypt/ entry key=signaturePropFile value=org/apache/cxf/ systest/ws/security/bob.properties/ entry key=decryptionPropFile value=org/apache/cxf/ systest/ws/security/alice.properties/ entry key=passwordCallbackClass value=org.apache.cxf.systest.ws.security.KeystorePasswordCallback/ /map /constructor-arg /bean On Apr 14, 2008, at 2:51 AM, adam_j_bradley wrote: Fred, Thanks for the tip. Forgive me (I'm most likely wrong!) but that looked like a Username token not an X.509 token request. I've been digging around in http://xfire.codehaus.org/WS-Security but I can't see any wisdom there. Anything else? :) Sincerely, Ada Fred Dushin-3 wrote: All I can recommend is that you have a look at the WS-Security system test in CXF: http://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/ It's based loosely off a WS-Security interoperability scenario with WCF, and uses signature with the DirectReference method, which will send the client's X.509 certificate directly in the SOAP header. -- View this message in context: http://www.nabble.com/Q%3A-WS-Security-X.509-Certificate-Token-Profile-tp16656740p16671272.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Really Silly Deploy on Tomcat without Spring
That message is coming out of the Sun reference implementation, not CXF. Somehow, the RI is being picked up in stead of CXF. Can you make sure the CXF jars are properly in the war or available in the app server classpath? In particular, if you aren't using the CXF bundle jar, you would need the cxf-rt-frontend-jaxws jar. Also, is this java 6? You might also want to try java 5 which doesn't have the RI built in to make sure it's not getting confused. Dan On Monday 14 April 2008, Rafael Ribeiro wrote: Hi all, After googling for a few hours, I (think I) am about to run a relly silly application using CXF on Tomcat without Spring. I made a servlet that extends CXFNonSpringServlet and its init is: public void init() throws ServletException { super.init(); Endpoint.publish(http://localhost/foo/services/hello;, new FooImpl()); } and I get this exception: com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class foo.bar.jaxws.Hello is not found. Have you run APT to generate them? I somehow followed http://cwiki.apache.org/CXF20DOC/servlet-transport.html since it is too vague and it seems like some steps were accidentally (or intentionally) omitted. Am I doing everything wrong or I had only missed something really stupid (or simple)? best regards, Rafael Ribeiro -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Really Silly Deploy on Tomcat without Spring
Hi dkulp, First, tks a lot for the first post! :D It seems like I am now nearer than I was before ;). So... After changing from JVM 1.6 to 1.5 and adding a few (missing) libraries to classpath I got this exception: java.lang.RuntimeException: Could not find destination factory for transport http://schemas.xmlsoap.org/soap/http at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:76) at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90) at org.apache.cxf.endpoint.ServerImpl.init(ServerImpl.java:69) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:160) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:304) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183) at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:74) at javax.xml.ws.Endpoint.publish(Endpoint.java:156) at foo.bar.ServiceServlet.init(ServiceServlet.java:15) About using the CXF bundle, I found somewhere (not sure whether on some forum or even here) that it could be problematic to use Servlet support with Jetty support on classpath and then I tried to switch from the jar at lib dir on distribution to the separate jars at modules dir. Is it true or I could have sticked to the bundle jar? dkulp wrote: That message is coming out of the Sun reference implementation, not CXF. Somehow, the RI is being picked up in stead of CXF. Can you make sure the CXF jars are properly in the war or available in the app server classpath? In particular, if you aren't using the CXF bundle jar, you would need the cxf-rt-frontend-jaxws jar. Also, is this java 6? You might also want to try java 5 which doesn't have the RI built in to make sure it's not getting confused. Dan On Monday 14 April 2008, Rafael Ribeiro wrote: Hi all, After googling for a few hours, I (think I) am about to run a relly silly application using CXF on Tomcat without Spring. I made a servlet that extends CXFNonSpringServlet and its init is: public void init() throws ServletException { super.init(); Endpoint.publish(http://localhost/foo/services/hello;, new FooImpl()); } and I get this exception: com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class foo.bar.jaxws.Hello is not found. Have you run APT to generate them? I somehow followed http://cwiki.apache.org/CXF20DOC/servlet-transport.html since it is too vague and it seems like some steps were accidentally (or intentionally) omitted. Am I doing everything wrong or I had only missed something really stupid (or simple)? best regards, Rafael Ribeiro -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog -- View this message in context: http://www.nabble.com/Really-Silly-Deploy-on-Tomcat-without-Spring-tp16689619p16690809.html Sent from the cxf-user mailing list archive at Nabble.com.
WSS and JAAS
Hello CXF gurus, I have a question related to using WSS to delegate auth calls to JAAS. I obtain the user name and password at run-time and send it in a Web Services Security (WSS) UsernameToken to the server and on the server side I would like to use JAAS authentication to authenticate the user name and password in the server application. How can I invoke a JAAS module from within the server side callback handler? Does CXF support any built in interceptors to achieve this? Thanks! Arul
Re: Multiple addresses for a service
So my service names should start with a unique name like... 1Address, 2Address, 3Address. Is this a limitation of this implementation? Thanks! Arul Willem Jiang wrote: That is because CXF support to map a Http request to a soap request, such as http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/cxf;. To implement this by default , CXF use the match the first policy(call the String.startWith()) to lookup the proper destination. With these policy http://localhost:8080/MyThingInstance?wsdl; and http://localhost:8080/MyThingInstance2?wsdl; requests will be dispatched destination which address is MyThingInstance. So you always get the same WSDL with these two URL. If you want to get the different wsdl definitions from Address1 and Address2 , you need to avoid the Address2 starting with Address1. Willem Arul Dhesiaseelan wrote: Thanks Dan. But when I implement as shown below. MyThing implementor = new MyThingImpl(); String address = http://localhost:8080/MyThingInstance; javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address, implementor); MyThing implementor2 = new MyThingImpl(); String address2 = http://localhost:8080/MyThingInstance2; javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address2, implementor2); I tried to access http://localhost:8080/MyThingInstance?wsdl and http://localhost:8080/MyThingInstance2?wsdl. Both the WSDL has the same service definition. I do not see MyThingInstance2 anywhere in the WSDL. Am I missing something? Best regards Arul Daniel Kulp wrote: On Wednesday 09 April 2008, Arul Dhesiaseelan wrote: Daniel Kulp wrote: On Wednesday 09 April 2008, Benson Margulies wrote: A bit of googling got me nowhere here. I want to publish a service on both a http: address and a local: address. Two jaxws:endpoints? Can they point to the same #implementation bean? Yep. It's the same as if you did: MyThing thing = new MyThingImpl(); Endpoint.publish(address1, thing); Endpoint.publish(address2, thing); Dan, Does this work? MyThing thing1 = new MyThingImpl(); MyThing thing2 = new MyThingImpl(); Endpoint.publish(address1, thing1); Endpoint.publish(address2, thing2); When I invoke the service at address1, it should invoke thing1 and address2 should invoke thing2. Thanks! Arul Yep. That's exactly how it's supposed to work. _ Scanned by MessageLabs for the Super Flux Friends _
[2.0.5] no write methods....
I am getting this error now: *INFO: Interceptor has thrown exception, unwinding now java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException: No write method for property {http://domain.baselogic.com}version in class com.baselogic.domain.Address at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:92) at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:44) * Here is my address object and versioned objects: *Address:* [EMAIL PROTECTED] @Table(name = address) public class Address extends IdentifiedObject implements Serializable { private static final long serialVersionUID = 3617859655330969141L; protected String address; protected String city; protected String province; protected String country; protected String postalCode; public Address() { } public Address(Long id) { setId(id); } * *VersionedObject: [EMAIL PROTECTED] public class VersionedObject implements Serializable { private static final long serialVersionUID = 1L; protected Integer version; @Version public Integer getVersion() { return version; } protected void setVersion(Integer version) { this.version = version; } } * So what is the issue with @Version? When I remove this set/get method, everything is fine. -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---