Re: CXF in OC4J

2008-04-23 Thread Glen Mazza
Chad, I would go ahead and update OC4J with the Xerces parser--that is a
very common procedure for that app server, indeed so common that the
process for it is defined within the OC4J manuals.  More information on
this and a few other tricks I have found with OC4J are here:

http://www.jroller.com/gmazza/entry/migrating_spring_based_webapp_from

(as of right now, JRoller is down for some reason, but hopefully will be
back up soon.)

HTH,
Glen


2008-04-23 [EMAIL PROTECTED] wrote:
 I've followed the guide @
 http://cwiki.apache.org/CXF20DOC/appserverguide.html#AppServerGuide-Disc
 laimer, but still have a problem.  After it's all done, my WAR is trying
 to load orcale's implementation of
 javax.xml.parsers.DocumentBuilderFactory.  But, it can't find it because
 I've unchecked the oracle.xml shared library (as per the guide).  The
 only way I could find to get around this was to set a System property
 that forces it to use a different (xerces) implementation.  However,
 after doing that, OC4J starts to break because it can't find the xerces
 implementation.  
 
  
 
 Do I have any other options besides setting a system property and then
 going down the path of getting the xerces implementation into OC4J's
 classpath?
 
  
 
 Thanks,
 
  
 
 Chad Sturtz
 
 Accenture - Consultant
 
  
 
 
 
 
 
 This message is for the designated recipient only and may contain privileged, 
 proprietary, or otherwise private information.  If you have received it in 
 error, please notify the sender immediately and delete the original.  Any 
 other use of the email by you is prohibited.



Re: Attributes portName, serviceName and endpointInterface are not allowed in the @WebService annotation

2008-04-22 Thread Glen Mazza

You're placing those attributes in the SEI (service endpoint interface, which
is autogenerated by wsdl2java), which is incorrect--they are supposed to go
with the SEI *implementation* (the class that implements it).

See sample here:  http://www.jroller.com/gmazza/date/20080417#WFstep6 

DoubleItPortTypeImpl is the SEI impl, the autogenerated DoubleItPortType
is the SEI.

HTH,
Glen


jblack4 wrote:
 
 I am using the example code from the link below as a reference, but the
 webapp fails to initialize with the a stack trace.
  http://www.lumidant.com/blog/web-services-tutorial-with-apache-cxf/
 http://www.lumidant.com/blog/web-services-tutorial-with-apache-cxf/ 
 
 I also found a number of examples where the @Webservice annotation has
 multiple combinations of the attributes in question, so I'm looking for
 some definitive help.
 
 I tried using cxf 2.0.2-incubator, 2.0.4-incubator, 2.0.5-incubator all
 with the same issue (on Tomcat 6.0.16).
 
 
 Apr 22, 2008 11:29:23 AM org.apache.catalina.core.ApplicationContext log
 INFO: Initializing Spring root WebApplicationContext
 Apr 22, 2008 11:29:28 AM org.apache.catalina.core.StandardContext
 listenerStart
 SEVERE: Exception sending context initialized event to listener instance
 of class org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.BeanCreationException: Error creating
 bean with name 'userAdd': Invocation of init method failed; nested
 exception is javax.xml.ws.WebServiceException: Attributes portName,
 serviceName and endpointInterface are not allowed in the @WebService
 annotation of an SEI.
 Caused by: javax.xml.ws.WebServiceException: Attributes portName,
 serviceName and endpointInterface are not allowed in the @WebService
 annotation of an SEI.
   at
 org.apache.cxf.jaxws.support.JaxWsImplementorInfo.initialise(JaxWsImplementorInfo.java:291)
   at
 org.apache.cxf.jaxws.support.JaxWsImplementorInfo.init(JaxWsImplementorInfo.java:57)
   at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:253)
   at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232)
   at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183)
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Attributes-portName%2C-serviceName-and-endpointInterface-are-not-allowed-in-the-%40WebService-annotation-tp16824963p16825362.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: create artifacts from WSDL published on the internet

2008-04-22 Thread Glen Mazza

Not directly, but with Linux there's the wget command that returns the
result from an HTML page (or a WSDL...), which you perhaps can pipe into a
file which you can then use as an argument to wsdl2java.

There's also an issue of dynamic clients, which I don't know much about but
may be what you're looking for, I don't know:
http://cwiki.apache.org/CXF20DOC/dynamic-clients.html

HTH,
Glen



Davide Gesino wrote:
 
 It is possible to generate java artifacts and stubs with wsdl2java loading
 the wsdl file from the internet? (something like
 http://myhost:myport/service?wsdl )
 

-- 
View this message in context: 
http://www.nabble.com/create-artifacts-from-WSDL-published-on-the-internet-tp16824292p16825417.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to increase Service time-out

2008-04-22 Thread Glen Mazza
Another option is asynchronous client calls, first paragraph of here:
http://www.jroller.com/gmazza/date/20080308



2008-04-22 Arul Dhesiaseelan wrote:
 [EMAIL PROTECTED] wrote:
  When debugging our services, sometimes the time spent debugging is greater 
  that the time-out period for the client call. How can I increase the 
  allowed time-out period?
 
  Thanks...
 
  Chris
 
  _
  Scanned by MessageLabs for the Super Flux Friends
  _

 Can you try adding this to your client?
 
 HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
 httpClientPolicy.setConnectionTimeout(0);
 httpClientPolicy.setAllowChunking(true);
 ((HTTPConduit) 
 proxyFactory.getClientFactoryBean().getClient().getConduit()).setClient(httpClientPolicy);
 
 Cheers,
 Arul
 



Re: Using CXF In Existing Spring Context

2008-04-22 Thread Glen Mazza
Steps #7 and #8 here (look at the web.xml and ws-beans.xml file):
http://www.jroller.com/gmazza/date/20080417#WFstep7

Also, you can configure multiple config files separated by commas,
similar to here to keep your web service stuff separate:
http://www.jroller.com/gmazza/date/20061128

HTH,
Glen

2008-04-22 Urciolo, Kevin wrote:
 I would like to use CXF in an existing spring context.  The examples
 appear to have a CXF Servlet read a spring configuration file and create
 a separate context.  I want to inject beans I have defined in an
 existing context in to my CXF services.  What is the best way to
 accomplish this?
 
 Thanks



Re: CXF WS-Addressing

2008-04-21 Thread Glen Mazza
I don't know, but perhaps Steps 7 and 8 of my example
(http://www.jroller.com/gmazza/date/20080417) might give you a hint.

Glen


2008-04-21 stevewu wrote:
 Hi all,
 I am converting the ws-addressing sample in cxf 2.0.5 to a servlet version.
 When I deploy and run, I am getting the following error. I checked CXF users
 guide on how to configure WS-Addressing but it doesn't help. I included the
 build.xml and cxf-servlet.xml that I used to create the war file. Am I
 misising some configuration on the server
 side?
 
 SteveWu
 
 client-servlet:
  [java]
 URL===http://localhost:8080/helloworldaddr/services/hello_world_addr?wsdl
  [java] Invoking sayHi...
  [java] Apr 21, 2008 1:14:13 PM
 org.apache.cxf.ws.addressing.soap.MAPCodec encode
  [java] INFO: Outbound WS-Addressing headers
  [java] Apr 21, 2008 1:14:13 PM
 org.apache.cxf.ws.addressing.soap.MAPCodec encodeAsExposed
  [java] INFO: MessageID : urn:uuid:ddd32553-8aa0-4ed9-88f3-0b809bd0d4eb
  [java] Apr 21, 2008 1:14:13 PM
 org.apache.cxf.ws.addressing.soap.MAPCodec encodeAsExposed
  [java] INFO: To : http://localhost:9050/SoapContext/SoapPort
  [java] Apr 21, 2008 1:14:13 PM
 org.apache.cxf.ws.addressing.soap.MAPCodec encodeAsExposed
  [java] INFO: ReplyTo : http://localhost:9990/decoupled_endpoint
  [java] Apr 21, 2008 1:14:13 PM
 org.apache.cxf.ws.addressing.soap.MAPCodec encodeAsExposed
  [java] INFO: FaultTo : http://localhost:9990/decoupled_endpoint
  [java] javax.xml.ws.soap.SOAPFaultException: Connection refused:
 connect
  [java] at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
  [java] at $Proxy33.sayHi(Unknown Source)
  [java] at demo.ws_addressing.client.Client.main(Client.java:76)
  [java] Caused by: org.apache.cxf.interceptor.Fault: Connection refused:
 connect
  [java] at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:75)
  [java] at
 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
  [java] at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
  [java] at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
  [java] at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
  [java] at
 org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
  [java] at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
  [java] ... 2 more
  [java] Caused by: com.ctc.wstx.exc.WstxIOException: Connection refused:
 connect
  [java] at
 com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
  [java] at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:73)
  [java] ... 8 more
  [java] Caused by: java.net.ConnectException: Connection refused:
 connect
  [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
  [java] at
 java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  [java] at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  [java] at
 java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  [java] at java.net.Socket.connect(Socket.java:519)
  [java] at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
  [java] at
 sun.net.www.http.HttpClient.openServer(HttpClient.java:382)
  [java] at
 sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
  [java] at sun.net.www.http.HttpClient.init(HttpClient.java:231)
  [java] at sun.net.www.http.HttpClient.New(HttpClient.java:304)
  [java] at sun.net.www.http.HttpClient.New(HttpClient.java:316)
  [java] at
 sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
  [java] at
 sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
  [java] at
 sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
  [java] at
 sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857)
  [java] at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1766)
  [java] at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1734)
  [java] at
 org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
  [java] at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
  [java] at
 com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
  [java] at
 com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
  [java] ... 9 more
 http://www.nabble.com/file/p16808296/cxf-servlet.xml cxf-servlet.xml 
 

Re: Exception logging on server:

2008-04-21 Thread Glen Mazza
Here's information on our logging options:

http://cwiki.apache.org/CXF20DOC/debugging.html



2008-04-21 (月) の 16:02 -0700 に greenstar さんは書きました:
 It appears to print Exception.getMessage().  NullPointerException has no
 message, which explains why it prints null in this case.
 
 How can I configure CXF to print the exception class and optionally the
 stack trace (on the server)?
 
 
 greenstar wrote:
  
  I have recently upgraded from XFire 1.2.6 to CXF 2.0.5, (within JBoss
  4.2.0.GA/Java1.6.0_06).
  
  When using JAXWS, when my services throws an exception from the business
  code, the exception stack is not logged.  For example, when my application
  throws a NullPointerException, only the following is mentioned in the log
  (instead of printing that stack trace or the exception class at the very
  least):
  
15:36:41,796 ERROR [STDERR] Apr 21, 2008 3:36:41 PM
  org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Application has thrown exception, unwinding now: null
  
  ...
  
 



Re: servlet transport question

2008-04-20 Thread Glen Mazza

2008-04-20 (日) の 15:22 +0200 に Leos Literak さんは書きました:
 Hi,
 
 I want to add soap stack to my web application. I decided for CXF. This 
 page http://cwiki.apache.org/CXF20DOC/servlet-transport.html shows it 
 could be possible. I set up web.xml and now I want to bind the servlet 
 to bus, as specified in documentation:
 
 // cxf is the instance of the CXFServlet
 Bus bus = cxf.getBus();
 BusFactory.setDefaultBus(bus);
 Endpoint.publish(/Greeter, new GreeterImpl());
 
 The question is: how can I get the CXFServlet instance? J2EE's 
 getServlet() method is deprecated.
 
 1) I dont want to add spring to my project so I want to use programmatic 
 way.

There's a CXFNonSpringServlet that you can use that may be of help for
you, but IIRC it is not in heavy use and therefore not very well
documented:

[1]
http://www.nabble.com/forum/Search.jtp?forum=16914local=yquery=cxfnonspringservlet


 2) My application is a web application running in jetty container, so 
 starting jetty within jetty is not good option.

Here's everything I know for Tomcat:
http://www.jroller.com/gmazza/date/20080417


 3) Endpoint has no method publish, but EndpointImpl.
 
 Thank you
 
 Leos
 
 PS1 documentation says that to build samples you need ant 1.6. I've got 
 CXFServlet, but it fails, that verbose attribute is not supported
 
 PS2 javadoc from installer does not contain CXFServlet

It's here, but our JavaDoc is pretty weak:
http://incubator.apache.org/cxf/javadoc/latest/org/apache/cxf/transport/servlet/CXFServlet.html

Glen




Re: How to use wsdl2js output?

2008-04-20 Thread Glen Mazza
I've never used our wsdl2js functionality, but apparently there are four
js_ samples here[1] that might provides hints for you.

HTH,
Glen

[1]
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/



2008-04-20 Tim Perrett wrote:
 Hey chaps,
 
 Just having a play around with the wsdl2js stuff in 2.1 snapshot. I've  
 generated a tester service based on 
 http://webservices.daelab.net/temperatureconversions/TemperatureConversions.wso?WSDL
  
   but Im not sure how to use that outputed JS file?
 
 All the prototype classes are in there, but I cant see which one I  
 would need to call? Has anyone got any advice?
 
 Cheers
 
 Tim



Re: A simple tutorial using CXF and JPA on NetBeans 6.1

2008-04-19 Thread Glen Mazza
I added it to our wiki articles page[1], it may take a couple of hours
to show up though--thanks!

Glen

[1] http://incubator.apache.org/cxf/resources-and-articles.html

 http://wiki.netbeans.org/ApacheCXFonNetBeans
 
 This may be useful for beginners.
 
 Cheers,
 Arul
 



Re: bi-directional relationships

2008-04-11 Thread Glen Mazza
Chris, for advanced JAXB questions, you might just want to go ahead and
ask on the Sun forum[1].  We use their JAXB, and the JAXB specialists
tend to congregate on that site.

Regards,
Glen

[1] http://forums.java.net/jive/forum.jspa?forumID=46

Am Freitag, den 11.04.2008, 14:33 -0700 schrieb
[EMAIL PROTECTED]:
 I've begun to play with this type of implementation, using the @XmlIDREF 
 and @XmlAttribute annotations and I've found a few issues.
 
 1) As stated below, your client generated classes have the references to 
 parent objects defined as data type Object. (an annoyance but workable)
 2) As stated in the documentation: You'd also need to ensure that the 
 referenced objects are contained somewhere else (like in the Root class in 
 this case), or else Bar objects will never be marshalled. 
 
 This one is difficult. I have a parent class that I return from my 
 Services methods that contain all the information associated to the user 
 and the request:
 UserAcct - Quote - SalesResp
 
 When this gets returned to the client the objects are just as the server 
 sent them back.  But when I send a child object back over to the server 
 all the references to the parents are lost.
 
 Example:  addSalesRep(SalesRepDTO salesRep) {
 ...
 
 The SalesRep object no longer has the parent Quote. That is because the 
 original container no longer exists. I would need to define a new contain 
 to be used to hold the object structure. 
 
 I've tried several things to get around this, like placing a 
 @XmlRootElement on my SalesRepDTO class on both the server and client 
 classes but to no avail. There just doesn't seem to be a way to make this 
 work how I would expect it to. The references to the parents are always 
 lost when sending the objects from the client to the server.
 
 Any suggestions?
 
 Chris Mathrusse
 [EMAIL PROTECTED]
 Sybase, Inc
 One Sybase Drive
 Dublin, CA 94568
 (925) 236-5553
 
 
 
 [EMAIL PROTECTED] 
 04/11/2008 12:50 PM
 Please respond to
 cxf-user@incubator.apache.org
 
 
 To
 cxf-user@incubator.apache.org
 cc
 
 Subject
 Re: bi-directional relationships
 
 
 
 
 
 
 I've started playing with this and it seems to work correctly. (More 
 testing needed) But one issue I came across was in the generated Client 
 objects. 
 
 My server side object looks as follows:
 
 public class QuoteDTO {
 @XmlAttribute @XmlIDREF
 protected CustomerDTO customer;
 
 
 But my generated Client object looks as follows:
 public class QuoteDTO {
 @XmlAttribute
 @XmlIDREF
 protected Object customer;
 
 
 So now when my client attempts to access the customer the specific data 
 type is lost. Is there any work around for this?
 
 Thanks...
 
 Chris Mathrusse
 [EMAIL PROTECTED]
 Sybase, Inc
 One Sybase Drive
 Dublin, CA 94568
 (925) 236-5553
 
 
 
 Daniel Kulp [EMAIL PROTECTED] 
 04/11/2008 12:44 PM
 Please respond to
 cxf-user@incubator.apache.org
 
 
 To
 cxf-user@incubator.apache.org
 cc
 
 Subject
 Re: bi-directional relationships
 
 
 
 
 
 
 
 Wow.   This is neet.   I didn't know about this one at all.  I honestly 
 though JAXB wouldn't do it.   I learned something today.  :-)
 
 Thanks Glen!
 Dan
 
 
 On Thursday 10 April 2008, Glen Mazza wrote:
  Here you go:
  https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html
 
  Glen
 
  Am Donnerstag, den 10.04.2008, 16:12 -0700 schrieb
 
  [EMAIL PROTECTED]:
   I'm using CXF 2.0.5. My Web Service is as follows:
   @WebService(endpointInterface = com.sybase.it.quoting.QuoteBroker,
   portName = QuoteBroker, targetNamespace =
   http://quoting.it.sybase.com;, name = QuoteBroker)
   @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED, style =
   Style.DOCUMENT, use = Use.LITERAL)
   @Service(quoteBroker)
   public abstract class QuoteBrokerImpl implements QuoteBroker ...
  
  
   I am returning DTO's from my web service that are populated with
   data from my Hibernate objects. The problem that I am running into
   now is the following exception:
  
   INFO: Interceptor has thrown exception, unwinding now
   org.apache.cxf.interceptor.Fault: Marshalling Error: A cycle is
   detected in the object graph. This will cause infinitely deep XML:
   [EMAIL PROTECTED] -
   [EMAIL PROTECTED] -
   [EMAIL PROTECTED]
  
   This is due to the relationship that is defined.  Quote -
   QuoteLineItem - Quote
   Because the relationship is bi-directional I am seeing this
   exception occurring. The Web Service is a replacement of an old Axis
   1.0 RPC/Encoded web service. Now that I have it running with CXF
   using
   Document/Literal/Wrapped I am seeing this issue.
  
   How have others resolved/worked around this issue?
  
   Thanks...
  
   Chris Mathrusse
   [EMAIL PROTECTED]
   Sybase, Inc
   One Sybase Drive
   Dublin, CA 94568
   (925) 236-5553
 
 
 



Re: Using cxf with external web-services

2008-04-11 Thread Glen Mazza
Perhaps my client example may help you:
http://www.jroller.com/gmazza/date/20070929

Glen

Am Freitag, den 11.04.2008, 18:21 +0100 schrieb Tim Perrett:
 This interested me, as Im trying to get to grips with CXF.
 
 I just tried to put together a basic client (and even tried the WSDL  
 below) but im getting odd problems when trying to run it. Even in its  
 most simple form (very similar to the hello world on the wiki - 
 http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html 
   ) I get this error:
 
 timperrett$ java com.timperrett.soap.temperature.App
 Starting...
 Exception in thread main java.lang.NoClassDefFoundError: javax/xml/ 
 ws/Service
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
  at  
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
  at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 
 280)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 
 374)
  at com.timperrett.soap.temperature.App.main(App.java:31)
 
 Line 31 in my (extremely basic) application reads:
 
 31: GlobalWeather weather = new GlobalWeather();
 
 I have all the relevant imports etc but still no joy - any ideas?
 
 Cheers
 
 Tim
 
 
 
 
 On 11 Apr 2008, at 16:37, Daniel Kulp wrote:
 
  For the most part, you can just do:
 
  wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL
 
  Then in your code, just do:
 
  GlobalWeather weather = new GlobalWeather();
  GlobalWeatherSoap port = weather.getGlobalWeatherSoap();
  String result = port.getWeather(city, country);
 



Re: Unexpected EOF in prolog

2008-04-11 Thread Glen Mazza
I don't know what version of CXF you're using but 2.0.5 has some changes
that *might* reduce the number of com.ctc.wstx.exc.WstxEOFExceptions you
will be getting, and hopefully provide you a more useful error message:
http://www.jroller.com/gmazza/date/20080327

HTH,
Glen

Am Freitag, den 11.04.2008, 10:26 -0800 schrieb Mick Knutson:
 I have an echo web service working when deployed to tomcat 5.5 and sending
 requests through soapUI. It seems to work great.
 
 But now I am trying to create a client via spring 2.5, and test this through
 testNG. *I keep getting this error when I create this client:*
 
 *!-- Web service dynamic proxy --
 bean id=echoClient
   class=com.baselogic.service.EchoImpl
   factory-bean=echoClientFactory
   factory-method=create/
 
 !-- Factory to create the dynamic proxy --
 bean id=echoClientFactory
 class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
 property name=serviceClass
 value=com.baselogic.service.EchoService/
 property name=address value=
 http://localhost:8080//cxf/EchoService/
 property name=serviceFactory ref=jaxwsAndAegisServiceFactory/
 /bean
 
 *
 *And here is my testNG test:*
 *@Test(groups = {functional})
 public void testEcho() throws Exception {
 log.debug(testGetUser);
 
 try {
 Object echo1 = applicationContext.getBean(echoClient);
 
 log.debug(==);
 log.debug(StringUtil.toString(echo1.getClass()));
 
 log.debug(==);
 EchoService echo = (EchoService)
 applicationContext.getBean(echoClient);
 
 
 log.debug(==);
 log.debug(echo.echoString(this is a
 test)); //-- This lines throws the error
 
 log.debug(==);
 AssertJUnit.assertNotNull(echo.echoString(this is a
 test));
 //AssertJUnit.assertEquals(mknutson, user.getUsername());
 }
 catch (Exception e) {
 e.printStackTrace();
 throw e;
 }
 }
 *
 
 
 *Here is my error:*
 
 *  exception class=javax.xml.ws.soap.SOAPFaultException
 message
   ![CDATA[Error reading XMLStreamReader.]]
 /message
 full-stacktrace
   ![CDATA[javax.xml.ws.soap.SOAPFaultException: Error reading
 XMLStreamReader.
 at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:211)
 at $Proxy39.echoString(Unknown Source)
 at
 com.baselogic.service.UserServiceTest.testEcho(UserServiceTest.java:79)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
 at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
 at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:607)
 at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:874)
 at
 org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
 at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
 at org.testng.TestRunner.runWorkers(TestRunner.java:689)
 at org.testng.TestRunner.privateRun(TestRunner.java:566)
 at org.testng.TestRunner.run(TestRunner.java:466)
 at org.testng.SuiteRunner.runTest(SuiteRunner.java:301)
 at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:296)
 at org.testng.SuiteRunner.privateRun(SuiteRunner.java:276)
 at org.testng.SuiteRunner.run(SuiteRunner.java:191)
 at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
 at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
 at org.testng.TestNG.run(TestNG.java:701)
 at
 org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
 at
 org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
 org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
 at
 org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
 Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading
 XMLStreamReader.
 at
 

Re: Transfer-encoding chunked

2008-04-11 Thread Glen Mazza
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 replaced with x's):
  
  beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

  xmlns:http-conf=http://cxf.apache.org/transports/http/configuration;

  xsi:schemaLocation=http://cxf.apache.org/transports/http/configuration
 http://cxf.apache.org/schemas/configuration/http-conf.xsd
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd;
  
http-conf:conduit 

  name={http://xx.xx.xx.xx/Webservice_Server/}Webservice_Server.http-conduit;
 
http-conf:client AllowChunking=false/
/http-conf:conduit
http-conf:conduit 

  name={http://localhost:8080/axis2/services/}Version.http-conduit;
http-conf:client AllowChunking=false/
/http-conf:conduit

  /beans
  
  
  Any help is greatly appreciated! 
  (Of course, the guys on the web service side should find out why their IIS
  becomes unstable, but i'd like to find out what i can change on the client
  side as well...)
  
  
  
 



Re: Transfer-encoding chunked

2008-04-10 Thread Glen Mazza
You seem to have done what I did[1, Step #8], but it is apparently not
working for you.  Perhaps the name field of the http-conf:conduit is
incorrect and hence CXF is not picking up the command.  Using
name=*.http-conduit as shown near the top here[2] might fix your
problem. 

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20070817
[2]
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html

Am Donnerstag, den 10.04.2008, 03:03 -0700 schrieb gbuys: 
 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-servlet.xml in my WEB-INF without succes (ip address replaced with x's):
 
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:http-conf=http://cxf.apache.org/transports/http/configuration;
   
 xsi:schemaLocation=http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd;
 
   http-conf:conduit 
   
 name={http://xx.xx.xx.xx/Webservice_Server/}Webservice_Server.http-conduit; 
   
   http-conf:client AllowChunking=false/
   /http-conf:conduit
   http-conf:conduit 
   
 name={http://localhost:8080/axis2/services/}Version.http-conduit;
   http-conf:client AllowChunking=false/
   /http-conf:conduit
   
 /beans
 
 
 Any help is greatly appreciated! 
 (Of course, the guys on the web service side should find out why their IIS
 becomes unstable, but i'd like to find out what i can change on the client
 side as well...)
 
 



Re: bi-directional relationships

2008-04-10 Thread Glen Mazza
Here you go:
https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html

Glen

Am Donnerstag, den 10.04.2008, 16:12 -0700 schrieb
[EMAIL PROTECTED]:
 I'm using CXF 2.0.5. My Web Service is as follows:
 @WebService(endpointInterface = com.sybase.it.quoting.QuoteBroker, 
 portName = QuoteBroker, targetNamespace = 
 http://quoting.it.sybase.com;, name = QuoteBroker)
 @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED, style = 
 Style.DOCUMENT, use = Use.LITERAL)
 @Service(quoteBroker)
 public abstract class QuoteBrokerImpl implements QuoteBroker ...
 
 
 I am returning DTO's from my web service that are populated with data from 
 my Hibernate objects. The problem that I am running into now is the 
 following exception:
 
 INFO: Interceptor has thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault: Marshalling Error: A cycle is detected 
 in the object graph. This will cause infinitely deep XML: 
 [EMAIL PROTECTED] - 
 [EMAIL PROTECTED] - 
 [EMAIL PROTECTED]
 
 This is due to the relationship that is defined.  Quote - QuoteLineItem 
 - Quote
 Because the relationship is bi-directional I am seeing this exception 
 occurring. The Web Service is a replacement of an old Axis 1.0 RPC/Encoded 
 web service. Now that I have it running with CXF using 
 Document/Literal/Wrapped I am seeing this issue. 
 
 How have others resolved/worked around this issue?
 
 Thanks...
 
 Chris Mathrusse
 [EMAIL PROTECTED]
 Sybase, Inc
 One Sybase Drive
 Dublin, CA 94568
 (925) 236-5553



Re: JiBX and CXF

2008-04-10 Thread Glen Mazza
I wouldn't say it looks very good for JiBX support--I have not heard
much demand for it lately on this list.  Axis2 has it I believe, and
Spring Web Services may be another option for you.

Glen

Am Donnerstag, den 10.04.2008, 14:46 -0700 schrieb ron_honeyman:
 I noticed on the CXF Roadmap
 (http://cwiki.apache.org/confluence/display/CXF/Roadmap) page it references
 JiBX and the possiblility that it may be in version 2.1 or may slip to
 version 2.2. I was curious if anyone could tell me if it has been included
 with 2.1 or not? If it has is there any documentation I could look at for
 integrating with it.
 
 Thanks
 
 Ron Honeyman
 



Re: Problems resolving schemas using http, when wsdl is in a jar

2008-04-10 Thread Glen Mazza
Am Donnerstag, den 10.04.2008, 23:08 +0200 schrieb
[EMAIL PROTECTED]:

 It works just fine until I realize that I want to import XSD schemas
 in my
 WSDLs to allow validation of the SOAP requests.
 Now, I have several webservices sharing XSDs (one entity model for
 several
 services and so on) so I don't want to package the XSDs in the JAR
 that
 contains the implementation code and the WSDL for the actual service.

I would reconsider.  Just because the XSDs are there does not mean that
you have to maintain them in separate places, only that they need to get
copied there when you create the WAR file.  It would certainly speed
things up and reduce network traffic, no?  Since it's on localhost
(i.e., your Tomcat server) already, perhaps you can make a file system
or JAR reference anyway.

JSR-109[1] recommends placing the WSDLs and XSDs in the WEB-INF/wsdl
directory, in Section 8.2.5, Publishing the Deployed WSDL:  The
recommended practice is to place WSDL files referenced by a wsdlLocation
element in the Web service annotations or wsdl-
file element and their relative imported documents under the
[WEB-INF/]wsdl directory.

Further, section 4.2.12 of JSR-109 also suggests that you should be
using OASIS XML Catalogs for XSDs URI resolution.  They refer you to
Section 4.4 of the JAX-WS specification[2], which AFAICT mandates that
JAX-WS implementations like CXF send URI resolution first through the
catalog if present.

[1] http://jcp.org/aboutJava/communityprocess/mrel/jsr109/index.html
[2] http://jcp.org/en/jsr/detail?id=224



 This method totally ignores that my URI starts with 'http' it just
 assumes a
 JAR, CLASSPATH or FILESYSTEM path. This seems kind of silly? Any URL should
 be possible to resolve? 

You can check if Metro performs more to your liking in this regard:
http://www.jroller.com/gmazza/date/20071019 (I don't know personally,
I've never tested this.)

Keep in mind, a direct http:// resolution might be burdensome to
external servers not related to your company.  If I have an
EmployeeData.xsd that I have downloadable from my site, I would want you
to download it *once* and place it on your machine, not hit my machine
everytime someone requests your WSDL.  A server can't rely on everyone
properly using caching.

Regards,
Glen




Re: interceptors and faults

2008-04-09 Thread Glen Mazza
Server faults go into separate interceptor chains (second paragraph of
[1])--I have not done this before, but you should be able to reuse the
interceptors you have on your normal non-error chains for the error
situations.

HTH,
Glen

[1] http://cwiki.apache.org/CXF20DOC/interceptors.html


Am Mittwoch, den 09.04.2008, 11:14 +0200 schrieb Florian Rosenberg:
 hi all,
 
 I'm writing a automated system for monitoring certain quality of service 
 properties (e.g., response time, etc) from a client-side perspective. 
 this works quite well as long as no fault occur on the service provider 
 that i'm trying to invoke. I use a couple of interceptors in the IN and 
 OUT chains to achieve it.
 
 in case of a fault that occurs on the server, I need to be aware of this 
 fault at the client side (e.g., I need to log the fault message etc into 
 a database).
 
 the problem I'm struggling with it the following: if a fault occurs on 
 the server my incoming interceptor chain at the client side is not 
 processed to the latest phase where I have my interceptor that stores 
 all the stuff into the database. the interceptor chain stops after the 
 READ phase on my client (thats what I could see in the debugger).
 
 I've experimented a bit with a simple interceptor that just dumps a 
 message to the console upon calling handleMessage() and handleFault(). 
 I've added to every phase in the IN and FAULT chain, nevertheless 
 handleFault() is never called upon receiving a fault message from the 
 server.
 
 could someone please clarify how faults from the server can be handled 
 in the client-side interceptor chains (i'm using cxf v2.05)?
 
 thanks,
 -Florian
 



Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-09 Thread Glen Mazza
Am Mittwoch, den 09.04.2008, 10:21 +0100 schrieb Tim Perrett:
 
 
 Hey Daniel,
 
 Thanks for your interesting reply.
 
  Thus, to get it working for CXF, you would need to modify the schema  
  to
  put the proper s:import in place to import the schema schema, then
  include the binding file to deal with the duplicate classes.
 
  Alternatively, use the workround on that blog with wsgen to  
  generated the
  code, then use CXF at runtime.   It's just straight JAX-WS code so it
  should work.
 
 Ideally im looking for a solution that lets me generate the classes  
 without needing to modify the WSDL, as that syntax is used through a  
 whole bunch of services that I need to consume so im reluctant to  
 monkey patch the service.
 
 Is it not possible to include the binding files (as shown on the blog)  
 directly with cxf's wsdl2java tool? I gave it a whirl but with no  
 luck. Is there a solution similar to that we can fashion? Otherwise,  
 when I generate using wsimport, I get the following warnings:
 

The wsdl2java tool[1] apparently has a -b (binding file) option.
[1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html



 [WARNING] src-resolve.4.2: Error resolving component 's:schema'. It  
 was detected that 's:schema' is in namespace 
 'http://www.w3.org/2001/XMLSchema' 
 , but components from this namespace are not referenceable from schema  
 document 'icp.wsdl#types?schema1'. If this is the incorrect namespace,  
 perhaps the prefix of 's:schema' needs to be changed. If this is the  
 correct namespace, then an appropriate 'import' tag should be added to  
 'icp.wsdl#types?schema1'.
line 113 of icp.wsdl#types?schema1
 
 [WARNING] Ignoring SOAP port InteractiveCampaign_SSPSoap12: it uses  
 non-standard SOAP 1.2 binding.
 You must specify the -extension option to use this binding.
 

Hmmm.  I'm not sure if that -extension option is for CXF's wsdl2java or
JAXB internally.  If the former, [1] above needs to be updated with that
option.

Glen


 I appreciate these are not CXF error directly, but how can I work  
 around this with wsdl2java? If thats even at all possible?
 
 Many thanks for any advice you guys can give
 
 Cheers
 
 Tim
 
 



Re: Deploy into websphere 6.1

2008-04-08 Thread Glen Mazza
What happens if you place those JARs within your WAR (WEB-INF/lib
directory)?  Perhaps there is a precedence issue that is resulting in
the older SAAJ jar still be picked up--placing it in the WAR might fix
the issue.

Also, googling CXF SAAJ Websphere (without quotes) returns 366
hits--could any of them be of help for you?

Regards,
Glen

Am Dienstag, den 08.04.2008, 15:12 -0700 schrieb Tong:
 Hi,
 
 Deployed my CXF war into websphere 6.1. It's mostly working except fault
 processing. I am getting 
java.lang.NoSuchMethodError: javax/xml/soap/Detail.addDetailEntry
 I guess websphere has an older version of saaj. so I copied both
 saaj-api-1.3 jar and saaj-impl-1.3.jar to
 $WebSphere_HOME/java/jre/lib/endorsed. But it does not work. It's
 complaining about 
 java.lang.NoClassDefFoundError:
 com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
 which is right there in saaj-impl-1.3.jar.
 
 Any idea please?
 
 Thanks
 Tong
 



Re: CXF Service End Points reloaded every time in WebLogic

2008-04-07 Thread Glen Mazza
If that is the case, that means CXF is not the problem, it is some
deployment option of Weblogic (i.e., you would have the same problem
with *any* web application deployed on it, web services or graphical web
app.)  

What I would do is skeletonize your web application (remove CXF and
everything else to the bare minimum)--confirm you are still getting the
same load/unload error, and if so, ask on a WebLogic mailing list for
help.

Glen

Am Montag, den 07.04.2008, 09:09 -0700 schrieb Tong:
 Hi Glen,
 
 In this case, what happens is that WebLogic unloads our web app altogether
 and reloads almost every time or every other time a new request comes in.
 When I traced into CXF source code, I see the init and destroy method of
 CXFServlet gets called all the time.  
 
 Do you know anything that will cause WebLogic to unload our web app?
 
 Thanks
 Tong
 
 
 Glen Mazza-2 wrote:
  
  I have not worked with this type of problem before.  Possible guesses:
  
  1.) Anything in our WebLogic docs[1] that may be relevant for your
  problem?
  
  2.) We have two types of configuration for web services--via a
  cxf-servlet.xml file and directly through Spring configuration[2].  If
  you try the cxf-servlet.xml method, does the problem go away?  It might
  be something Spring-related that is causing the reinitialization to be
  occurring each time.
  
  HTH,
  Glen
  
  [1]
  http://cwiki.apache.org/confluence/display/CXF20DOC/AppServerGuide#AppServerGuide-WebLogic
  [2]
  http://cwiki.apache.org/CXF20DOC/configuration.html#Configuration-Serverconfigurationfiles
  
  
  Am Samstag, den 05.04.2008, 11:14 -0700 schrieb stevewu:
  Hi all,
  
  I deployed my web services in WebLogic with an EAR file.Every time I
  access
  a web service it rebuild all the end points defined in cxf-servlet.xml.
  Is
  there some parameters that I can set, so that the endpoints will be build
  only once when I start the service?
  
  Entries in cxf-servlet.xml
  ?xml version=1.0 encoding=UTF-8?
  
  beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:cxf=http://cxf.apache.org/core;
xmlns:wsa=http://cxf.apache.org/ws/addressing;
xmlns:jaxws=http://cxf.apache.org/jaxws;
xmlns:soap=http://cxf.apache.org/bindings/soap;
xsi:schemaLocation=
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://cxf.apache.org/bindings/soap
  http://cxf.apache.org/schemas/configuration/soap.xsd
  http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
  http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd;
  

  
  jaxws:endpoint
  id=LoginService
  implementor=com.myworld.ws.jaxws.provider.LoginProvider
  wsdlLocation=WEB-INF/wsdl/Login.wsdl
  address=/LoginService
  jaxws:features
   bean class=org.apache.cxf.feature.LoggingFeature/
  /jaxws:features
  /jaxws:endpoint
  ..
  /beans
  
  Below is the top part of the console output before it rebuild the end
  points.
  
  
  Apr 5, 2008 12:38:59 PM org.apache.cxf.transport.servlet.CXFServlet
  loadSpringBus
  INFO: Load the bus without application context
  log4j:WARN No appenders could be found for logger
  (org.apache.cxf.bus.spring.BusApplicationContext).
  log4j:WARN Please initialize the log4j system properly.
  Apr 5, 2008 12:39:04 PM
  org.apache.cxf.configuration.spring.ConfigurerImpl
  init
  INFO: Could not find the configuration file cxf.xml on the classpath.
  Apr 5, 2008 12:39:06 PM
  org.apache.cxf.transport.servlet.AbstractCXFServlet
  replaceDestinationFactory
  INFO: Replaced the http destionFactory with servlet transport factory
  Apr 5, 2008 12:39:06 PM org.apache.cxf.transport.servlet.CXFServlet
  loadAdditionalConfig
  INFO: Build endpoints from config-location: /WEB-INF/cxf-servlet.xml
  
  
  
  
 



Re: CXF Service End Points reloaded every time in WebLogic

2008-04-06 Thread Glen Mazza
I have not worked with this type of problem before.  Possible guesses:

1.) Anything in our WebLogic docs[1] that may be relevant for your
problem?

2.) We have two types of configuration for web services--via a
cxf-servlet.xml file and directly through Spring configuration[2].  If
you try the cxf-servlet.xml method, does the problem go away?  It might
be something Spring-related that is causing the reinitialization to be
occurring each time.

HTH,
Glen

[1]
http://cwiki.apache.org/confluence/display/CXF20DOC/AppServerGuide#AppServerGuide-WebLogic
[2]
http://cwiki.apache.org/CXF20DOC/configuration.html#Configuration-Serverconfigurationfiles


Am Samstag, den 05.04.2008, 11:14 -0700 schrieb stevewu:
 Hi all,
 
 I deployed my web services in WebLogic with an EAR file.Every time I access
 a web service it rebuild all the end points defined in cxf-servlet.xml. Is
 there some parameters that I can set, so that the endpoints will be build
 only once when I start the service?
 
 Entries in cxf-servlet.xml
 ?xml version=1.0 encoding=UTF-8?
 
 beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:cxf=http://cxf.apache.org/core;
   xmlns:wsa=http://cxf.apache.org/ws/addressing;
   xmlns:jaxws=http://cxf.apache.org/jaxws;
   xmlns:soap=http://cxf.apache.org/bindings/soap;
   xsi:schemaLocation=
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
 http://cxf.apache.org/bindings/soap
 http://cxf.apache.org/schemas/configuration/soap.xsd
 http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
 http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd;
 
   
 
 jaxws:endpoint
 id=LoginService
 implementor=com.myworld.ws.jaxws.provider.LoginProvider
 wsdlLocation=WEB-INF/wsdl/Login.wsdl
 address=/LoginService
 jaxws:features
  bean class=org.apache.cxf.feature.LoggingFeature/
 /jaxws:features
 /jaxws:endpoint
 ..
 /beans
 
 Below is the top part of the console output before it rebuild the end
 points.
 
 
 Apr 5, 2008 12:38:59 PM org.apache.cxf.transport.servlet.CXFServlet
 loadSpringBus
 INFO: Load the bus without application context
 log4j:WARN No appenders could be found for logger
 (org.apache.cxf.bus.spring.BusApplicationContext).
 log4j:WARN Please initialize the log4j system properly.
 Apr 5, 2008 12:39:04 PM org.apache.cxf.configuration.spring.ConfigurerImpl
 init
 INFO: Could not find the configuration file cxf.xml on the classpath.
 Apr 5, 2008 12:39:06 PM org.apache.cxf.transport.servlet.AbstractCXFServlet
 replaceDestinationFactory
 INFO: Replaced the http destionFactory with servlet transport factory
 Apr 5, 2008 12:39:06 PM org.apache.cxf.transport.servlet.CXFServlet
 loadAdditionalConfig
 INFO: Build endpoints from config-location: /WEB-INF/cxf-servlet.xml
 



Re: Problem with secure connections via https

2008-04-03 Thread Glen Mazza
I only know the wsdl2java way of doing this, and Luba in past has not
desired to go this route.  As I've said earlier, I don't think SSL with
the simple front end is a robust design that should be taught to
users.  

[1] shows how to create a wsdl2java-based web service client with a
cxf.xml file (whose contents are not relevant for SSL); the example at
the top of [2] gives a CXF.xml file that can be used at the client
(Although just looking at it, I don't think that cxf.xml is correct
because nowhere is it declaring SSL to be the protocol.  If no one else
does, I'll take a look at it.  Per Olsen's blog entry referenced at the
top of [2] gives a better example of a starter cxf.xml configuration
file for SSL.)

Glen

[1] http://www.jroller.com/gmazza/date/20070817
[2]
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html
 

Am Donnerstag, den 03.04.2008, 07:35 -0400 schrieb Benson Margulies:
 I'm not very useful, personally, on https, hopefully Glen or someone will
 wade in now that you've given us a full picture.
 
 On Thu, Apr 3, 2008 at 5:52 AM, Alpin, Luba [EMAIL PROTECTED] wrote:
 
  You are right! I do it right now.
 
  I have a problem with secure connections via https,
 
  I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and
  ServerFactoryBean/ClientProxyFactoryBean result the same - service
  publishing succeeded, but client methods call fails.
  I got different exceptions depends on my configuration. Current my
  sample for instance used Interceptor action -
  WSHandlerConstants.USERNAME_TOKEN and failed with following exception:
  (application provided null or empty password) Next to the exception you
  can see my client configuration code, with password and user name
  supplied. ('configClientInterceptors' method) and my client creation
  code ('TestJaxWsProxyFactoryBean' method)
  I haven't any working sample to start with to use https.
  Can somebody help me please.
  Regards,
  Luba.
 
  org.apache.cxf.binding.soap.SoapFault: Security processing failed.
 at
  org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
  OutInterceptor.java:184)
 at
  org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
  OutInterceptor.java:43)
 at
  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
  hain.java:220)
 at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
 at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
 at
  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
 at
  org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
 at $Proxy15.sayHi(Unknown Source)
 at
  cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
 at cxf_client.TestClient.main(TestClient.java:104)
  Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
  application provided null or empty password
 at
  org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
 at
  org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
  ction.java:31)
 at
  org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
  92)
 at
  org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
  OutInterceptor.java:169)
 ... 9 more
  Hit uncaught exception org.apache.cxf.binding.soap.SoapFault
 
 private void configClientInterceptors(Client client) {
 String name = myname;
 String password = mypassword;
 String passwordKey = password;
 String actions = WSHandlerConstants.USERNAME_TOKEN;
  //in
 WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
 wsIn.setProperty(WSHandlerConstants.ACTION, actions);
 wsIn.setProperty(WSHandlerConstants.USER, name);
 wsIn.setProperty(passwordKey, password);
 client.getInInterceptors().add(wsIn);
 client.getInInterceptors().add(new SAAJInInterceptor());
  //out
 WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
 wsOut.setProperty(WSHandlerConstants.ACTION, actions);
 wsOut.setProperty(WSHandlerConstants.USER, name);
 wsOut.setProperty(passwordKey, password);
 
 client.getOutInterceptors().add(wsOut);
 client.getOutInterceptors().add(new SAAJOutInterceptor());
 }
 
 public void TestJaxWsProxyFactoryBean() {
 JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
 Client client;
 proxyFac.setServiceClass(HelloWorld.class);
 proxyFac.setAddress(ADDRESS + /HelloWorld);
 
 HelloWorld echo = (HelloWorld) proxyFac.create();
 
 client = ClientProxy.getClient(echo);
 HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
 TLSClientParameters tlsParams = new TLSClientParameters();
 tlsParams.setSecureSocketProtocol(SSL);
 

Re: Interceptors

2008-04-03 Thread Glen Mazza
I'm confused--intercept faults from outbound requests to a third web
service when the third service is not available  If the third web
service was not available, how could it be returning faults to your
other two web services' requests?

Glen

Am Donnerstag, den 03.04.2008, 16:10 -0700 schrieb Web Man:
 I have created an interceptor (AbstractPhaseInterceptor) that is used by two
 Web services.  One of the functions of the interceptor is to intercept
 faults from outbound requests to a third web service when the third service
 is not available.  When one service runs it all functions correctly but when
 two are running the exceptions are dumped to the log as if the interceptor
 was not there.  Since this is a polling application the exception can be
 annoying.



Re: SoapWithAttachments

2008-04-03 Thread Glen Mazza
Here's another example: http://www.jroller.com/gmazza/date/20071102


Am Freitag, den 04.04.2008, 07:58 +0800 schrieb Freeman Fang:
 Hi Vijay,
 
 We have mtom demo in the kit, which shows how SOAP message
 with an attachment and XML-binary Optimized Packaging(mtom)  work.
 
 Regards
 
 Freeman
 
 Vijay Allam wrote:
  I have a third part webservice that returns an attachment. How do I get the
  attachment with CXF client. Any example code is apreciated.
 
  --Vijay 
 
  On 4/3/08 9:57 AM, Cencio [EMAIL PROTECTED] wrote:
 

  Hi,
 
  i'm still unable to retrieve the wsdl from my service... i post all my 
  info:
 
  web.xml:
 
  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 name=outFaultInterceptors
  list
  ref bean=logOutbound/
  /list
  /property
  /bean
  jaxws:endpoint
id=ese5
address=ordine
implementor=org.rivenditore.ordine.OrdineInterfaceImpl /
 
  /beans
 
 
 
 
 
  ordine.wsdl
 
 
 
  wsdl:definitions
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:ele=http://www.rivenditore.org/ordiniElements;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:ord=http://www.rivenditore.org/Ordine;
 targetNamespace=http://www.rivenditore.org/Ordine;
 
  wsdl:import namespace=http://www.rivenditore.org/submitOrdineTypes;
  location=submitOrdine.xsd /
 
  wsdl:types
  xsd:schema
  targetNamespace=http://www.rivenditore.org/ordiniElements;
 xmlns:soType=http://www.rivenditore.org/submitOrdineTypes;
 xsd:element name=notifica type=xsd:string/
 xsd:element name=esito type=soType:esitoType/
 xsd:element name=ordine type=soType:ordineType/
  /xsd:schema
  /wsdl:types
 
 wsdl:message name=NotificaMessage
wsdl:part name=parameter element=ele:notifica/
 /wsdl:message
 
 
 wsdl:message name=SubmitOrdineRequestMessage
wsdl:part name=parameter element=ele:ordine/
 /wsdl:message
 
 wsdl:message name=SubmitOrdineResponseMessage
wsdl:part name=parameter element=ele:esito/
 /wsdl:message
 
 wsdl:portType name=OrdineInterface
 
wsdl:operation name=SubmitOrdine
   wsdl:input message=ord:SubmitOrdineRequestMessage/
   wsdl:output message=ord:SubmitOrdineResponseMessage/
/wsdl:operation
 
wsdl:operation name=Notifica
  wsdl:output message=ord:NotificaMessage/
/wsdl:operation
 
  /wsdl:portType
 
 wsdl:binding name=OrdineInterfaceBinding type=ord:OrdineInterface
soap:binding style=document
  transport=http://schemas.xmlsoap.org/soap/http/
 
wsdl:operation name=SubmitOrdine
   soap:operation
  soapAction=http://www.rivenditore.org/service/ordini/#SubmitOrdine/
   wsdl:input
  soap:body use=literal/
   /wsdl:input
   wsdl:output
  soap:body use=literal/
   /wsdl:output

Re: Possible to use CXF without Spring ?

2008-04-03 Thread Glen Mazza
This might help:
http://www.nabble.com/CXFNonSpringServlet-How-To--td15356670.html

Am Donnerstag, den 03.04.2008, 17:42 -0400 schrieb Daniel Kulp:
 CXF can be used without spring for some very basic use cases.   
 Basically, simple JAXWS+JAXB client/server with no configuration (or use 
 API's for configuration) and none of the complex things like 
 ws-security/ws-rm that requires said configuration.   
 
 Once you need to start configuring things, though, you may need the 
 spring configs or you would need to write your own things to call on the 
 API's to configure stuff.
 
 That said, I haven't tests the non-spring support lately.  :-(
 
 Dan
 
 On Thursday 03 April 2008, Valerio Schiavoni wrote:
  this might sound weird but: how could I use cxf without its Spring
  support ?
 
 
  Within our framework we already use another component-model (Fractal,
  see http://fractal.objectweb.org), and having both at the same time is
  a bit too much. Everything works fine, let me be clear, but I'd like
  to explore a solution without having cxf import (transitively) all its
  Spring depedencies.
 
  Thanks,
  Valerio
 
 
 



Re: Re-2: Using CXF in OSGi

2008-04-03 Thread Glen Mazza
That sounds like a hint, Guillaume...   ;-)

Am Donnerstag, den 03.04.2008, 12:04 + schrieb
[EMAIL PROTECTED]:
 Will Spring-DM also be a part of this example?
 
  Original Message 
 Subject: Re: Using CXF in OSGi (03-Apr-2008 13:48)
 From:Guillaume Nodet [EMAIL PROTECTED]
 To:  cxf-user@incubator.apache.org
 
  I'm just working on an example right now.  I'll post more details asap.
  
  On Thu, Apr 3, 2008 at 1:29 PM, [EMAIL PROTECTED] wrote:
  
   Hello!
  
   Are there already some working bundles of CXF for OSGi? I found a solved
   bug (CXF-490) on JIRA which says this is done. Does anyone have some 
   advice
   on how to use it? Maybe examples?
  
   Best regards,
  
   Fabian
  
  
  
  
  -- 
  Cheers,
  Guillaume Nodet
  
  Blog: http://gnodet.blogspot.com/
  
 
 



Re: NTLM Support?

2008-04-02 Thread Glen Mazza

Hmmm, because they very heavily interact with and emphasize interoperability
with Microsoft[1], you may wish to take a good look at GlassFish Metro
first.  While I doubt Metro can handle everything you want below, it will
probably get you closest to where you want to be.

Glen

[1]
http://weblogs.java.net/blog/haroldcarr/archive/2008/03/metro_web_servi_2.html


mrusso wrote:
 
 I can't seem to find anything related to configuring CXF to support NTLM. 
 Has anyone tried this or found any documentation / examples that they
 could point me towards?
 
 I'm trying to consume a Custom Microsoft SharePoint Web Service from our
 Java Portal (Spring / Hibernate on WebSphere) over SSL with NTLM.  I'm
 told by the SharePoint admins that I can use Basic Authentication, but my
 tests have shown that it keeps asking me for NTLM credentials.
 
 I'm generating a client from a provided .WSDL.  My plan is to work from
 the ground up, starting with No SSL, No Authentication.  Add
 Authentication to the SharePoint instance, retest, add SSL, retest, etc. 
 Rinse, Repeat.  My initial tests tell me that OOB CXF doesn't talk nicely
 with Integrated Windows Authentication, but I'm pretty new to this arena,
 so I'm not ruling out user error.
 
 I've followed this process with Axis2 with some success, but the generated
 files are horrendous, and we already are using CXF to serve to a flex
 client, so I'd like to keep it in the family, so to speak.
 
 Thanks for your time,
 
 Mario
 

-- 
View this message in context: 
http://www.nabble.com/NTLM-Support--tp16447079p16447433.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WSDL First Development Cycle - specifically wsdl:port address question

2008-04-01 Thread Glen Mazza
I haven't given this much thought before but I'm not sure why it matters
what the address is in the WSDL that is sent from the service to the
client.  By virtue of the fact that the client accessed the service
using the ...?wsdl URL in order to get the WSDL to begin with, it
already knows what URL to use to get to the web service--the same one it
used to get the WSDL.  Furthermore, it arguably should not use the URL
in the downloaded WSDL at that stage.  Might that not be a
security/safety risk?

For the following three web services below from commercial companies,
none of the URLs in the soap:address match that of the URL used to get
the WSDL.  (Or am I missing something?)

[1] http://developer.ebay.com/webservices/latest/ShoppingService.wsdl
[2] http://sdpwsparam.strikeiron.com/sdpNFLTeams?WSDL
[3]
http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl?

Regards,
Glen


Am Dienstag, den 01.04.2008, 15:31 -0600 schrieb Brent Moore:
 Dan,
 
 I've created a JIRA [1] with an attached war for an echo service that
 exhibits the behavior I'm talking about.  If I understand you
 correctly, the bogushost address should be replaced with the real
 address of the service.  But at least on my tomcat 5.5.23 it doesn't
 happen.  
 
 Once it does happen, is there a way to influence which of the aliases
 for the box it uses?  Some of our boxes serve multiple virtual hosts.
 
 
 [1] http://jira.codehaus.org/browse/CXF-1497 
 
 
 Thanks for the help.
 
 
 Brent
 
 Daniel Kulp wrote: 
  If the client is grabbing the wsdl view the ?wsdl flag to the endpoint, 
  it SHOULD be getting a modified wsdl that has the proper address in it.   
  If that's not the case, that might be a bug, but it's probably a 
  configuration issue as I know we have several tests that test this (and 
  the TCK requires it to work).  Thus, I'd probably like to see a war that 
  demonstrates this.
  
  Also, the client can always be reconfigured post-creation to hit any url 
  you give it.   It DOESN'T need to use the url in the wsdl.   If the 
  container can provide a new URL, just set the ENDPOINT_ADDRESS_PROPERY 
  thing on the client's request context and it will use that address 
  instead.
  
  Dan
  
  
  
  On Tuesday 01 April 2008, bdm wrote:

   Glen,
   
   Thanks for the response but I may not have been clear on what I'm
   trying to accomplish.
   
   In our normal development life cycle, once code (a .war file in this
   case) leaves development for test and production we do not change
   anything in the code or the accompanying configuration files (spring
   context, etc).  All of the differences in the environments (database
   connections, etc) are handled by the container - tomcat in this case. 
   We would like to implement the same type of configuration with our web
   service deployments.
   
   In [1] - the last sentence of note 4 reads - Note the URL specified
   in the wsdl:port section (under wsdl:service) is ignored by the
   servlet container. It is used, however, by the web service client
   which reads in this WSDL to determine where to route the requests.
   
   This is exactly the problem.  Yes the web service deploys correctly
   and the servlet container ignores the address given in the provided
   WSDL.  But, the WSDL is delivered unmodified to any requesting client
   with the address given in the WSDL and not the address of the service.
I tried this yesterday one last time before posting to the list using
   2.0.4 of CXF.
   
   I'm not sure if that is a bug or a feature, I'm just trying to figure
   out how to implement our standard practice given the current behavior
   of CXF.
   
   Brent
   
   Glen Mazza-2 wrote:
   
Note #4 of here[1] shows how the WSDL URL is created when you deploy
to an application server; as you can see, what you have in the wsdl
file is pretty much ignored web-service provider side.

For the client, it is just an issue of modifying the
ENDPOINT_ADDRESS_PROPERTY as shown in Step #7 here[2].  You can use
Spring Dependency Injection for that if helpful.

Glen

[1] http://www.jroller.com/gmazza/date/20071019#notes
[2] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1
  
  
  
  

 
 -- 
 *
 Brent Moore
 Platform Engineering
 Office of Information Technology
 Brigham Young University
 
 Character is what you have left when
 you've lost everything you can lose.
   - Evan Esar
 



Re: CXF via https - Client can't send message ( simple frontend java configuration ServerFactoryBean/ClientProxyFactoryBean)

2008-04-01 Thread Glen Mazza
I don't know if that is supported (or even if it should be for that
matter).  Being informally defined, the simple front end is not very
secure, and wanting to use HTTPS on top of it is somewhat of a
contradiction.  So if you want to use HTTPS, I think you should learn
the JAXWS front end.  Like learning Ant and Maven, it is time well
spent, and this way you can switch over to Metro or possibly Axis
quickly if you come across a bad bug in CXF.  (The simple frontend isn't
supported anywhere outside of CXF.)

Glen


Am Dienstag, den 01.04.2008, 16:30 +0100 schrieb Alpin, Luba:
 I need a help with client side.
 In 'apache-cxf-2.0.5-incubator\samples' directory doesn't exist sample
 of using https with configuration of simple frontend. And existing
 sample I can't do working.
 Please help me with working example.
 Regards,
 Luba.



RE: Problems in using TLS

2008-04-01 Thread Glen Mazza
Brendan,

What happens if you use SSL instead of TLS?  AFAIK they are
synonyms.

Regards,
Glen

Am Dienstag, den 01.04.2008, 13:27 +0200 schrieb Brendan Maguire
(brmaguir):
 Thanks for the reply Daniel.
 
 I tried using the 2.0.5 libraries but am still getting the exact same
 errors.
 
 Am I setting it up correctly using the cxf.xml file? Any other ideas on
 what the problem could be?
 
 Cheers,
 Brenan
 
 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
 Sent: 27 March 2008 18:38
 To: cxf-user@incubator.apache.org
 Cc: Brendan Maguire (brmaguir)
 Subject: Re: Problems in using TLS
 
 
 I don't suppose there would be any chance of you trying the 2.0.5 stuff
 we're voting on?
 http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/
 
 I made some changes to the TLS stuff in 2.0.5 to make it work better and
 with less configuration.
 
 Dan
 
 
 
 On Thursday 27 March 2008, brmaguir wrote:
  Hey,
 
  I'm trying to communicate with a web service using Apache CXF using 
  TLS. When I specify TLS in the cxf.xml file using:
 
  http-conf:tlsClientParameters 
  secureSocketProtocol=TLS sec:trustManagers
  sec:keyStore password=password
  url=file:\C:/path/to/keystore/ /sec:trustManagers
  sec:cipherSuitesFilter
  sec:include.*.*./sec:include
  /sec:cipherSuitesFilter
  /http-conf:tlsClientParameters
 
  it is failing with the following error:
 
  27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain
  doIntercept INFO: Interceptor has thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault: Connection reset
  at
  org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart
 s(AbstractOutDat abindingInterceptor.java:75)
  at
  org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInt
 erceptor.java:68 )
  at
  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
 rChain.java:207) at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135
 ) at $Proxy35.login(Unknown Source)
  at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
  at thirdPartyAPI.test.Test.main(Test.java:61)
  Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
  at
 com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
  at
  org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart
 s(AbstractOutDat abindingInterceptor.java:73)
  ... 9 more
  Caused by: java.net.SocketException: Connection reset
  at java.net.SocketInputStream.read(Unknown Source)
  at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown
 Source)
  at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
  Source) at
  com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unk
 nown Source)
  at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
  Source)
  at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
  Source)
  at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
  Source) at
  sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(
 Unknown Source)
  at
  sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
  Source)
  at
  sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unkn
 own Source)
  at
  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHe
 adersTrustCachin g(HTTPConduit.java:1766)
  at
  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstW
 rite(HTTPConduit .java:1734)
  at
  org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOut
 putStream.java:4 2)
  at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
  at
  com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
  at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
  ... 10 more
  Exception in thread main javax.xml.ws.soap.SOAPFaultException:
  Connection reset
  at
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175
 ) at $Proxy35.login(Unknown Source)
  at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
  at thirdPartyAPI.test.Test.main(Test.java:61)
  Caused by: org.apache.cxf.interceptor.Fault: Connection reset
  at
  org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart
 s(AbstractOutDat abindingInterceptor.java:75)
  at
  org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInt
 erceptor.java:68 )
  at
  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
 rChain.java:207) at
  

Re: Problem with CXF inheritance exception

2008-03-31 Thread Glen Mazza
I believe you'd get the very same result with Metro (try it [1])--CXF is
performing according to spec. If you're unhappy with JAX-WS' design on
this issue, sending comments to the JSR[2] over the matter would
probably be the best solution.

Regards,
Glen

[1] http://www.jroller.com/gmazza/date/20070929
[2] http://jcp.org/en/jsr/detail?id=224

Am Montag, den 31.03.2008, 09:55 +0200 schrieb Eric Gueidao:
 Hello,
 
 I'm working on project with CXF and I try to keep the inheritance between
 exceptions in my WSDL but it doesn't work.
 It works well with data objects but when I generate the WSDL of my service 
 with
 java2wsdl (2.0.4 and 2.0.5) or java2ws (2.1) I lose the inheritance between
 exceptions.
 Do you know, please, how to do for keeping inheritance between exceptions? If
 it's impossible to do it, can I be able to do it in the future CXF version?
 
 Thank you in advance,
 GUEIDAO Eric
 



Re: HTTPS Client: how to authenticate a client

2008-03-30 Thread Glen Mazza
Resending...

Am Sonntag, den 30.03.2008, 20:24 -0400 schrieb Glen Mazza:
 I have not done that before, but I think that process is configured from
 the servlet/JEE container's end.  (CXF does not authenticate the client,
 the application server does.)  Reading the documentation for your
 servlet container would probably help you the most here.
 
 If you're using our embedded Jetty option for the web service provider,
 it has a sec:clientAuthentication option, set the want/required to
 true as shown here:
 http://cwiki.apache.org/confluence/display/CXF20DOC/Standalone+HTTP
 +Transport
 
 HTH,
 Glen
 
 Am Samstag, den 29.03.2008, 17:40 +0100 schrieb [EMAIL PROTECTED]:
  Hi to you all!
  I would like to ask if someone knows how to authenticate a client in 
  cxf. I have configured the cxf.xml file (including the part truststore 
  and keystore) but now how can I tell the client what certificate to use 
  in order to authenticate itself with the server?
  Thanks
  




Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https

2008-03-27 Thread Glen Mazza
This may be the problem:  Try -Dcxf.config.file instead of
-Dcxf.config.file.url, perhaps.

Am Donnerstag, den 27.03.2008, 10:00 +0100 schrieb
[EMAIL PROTECTED]:
 First of all thank you boys! 
 I really appreciate your valuable help.
 
  How did you feed the CXF configuration to the server?
 
 I am working under eclipse; I have specified this argument (into the 
 run section) 
 -Dcxf.config.file.url=C:/Documents and Settings/ SecureServer.xml. 
 (I have used   )
 The file SecureServer.xml is included in the first mail.
 
 I am interested in developing a server which listens on connections 
 via https;
 this is my server:
 package com.hw.server;
 
 String address = https://localhost:9001/helloWorld;;
 IHelloWorld implementor = new HelloWorldImpl();
 Service.publish(address, implementor);
 System.out.println(Server ready);
 
 I am currently using the 2.0.5 snapshot downloaded from cxf website 
 but nothing has changed and I continue having the same error (protocol 
 mismatch).
 
 Another thing you could explain me: what's the difference between sec:
 keyManagers and sec:trustManager and why do I have to specify the 
 password twice (inside keyPassoword=  and inside password= ) ?
 
   sec:keyManagers keyPassword=password
sec:keyStore type=JKS password=password 
 file=C:/certs/cherry.jks/
   /sec:keyManagers
   sec:trustManagers
   sec:keyStore type=JKS password=password
file=C:/certs/truststore.jks/
   /sec:trustManagers
 
 Thank you.
 
 
 
 __
 
 Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE 
 fino al 27/03/08!
 http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
 



Re: convert a SOAP Fault to the contained java exception

2008-03-26 Thread Glen Mazza
Providing you have the WSDL, you should be able to run wsdl2java and
have a ProcessingFailureException class that will contain that
information.  Look at [1], in particular Step #4 - the wsdl:message
CorrelationIdNotFoundFault, Step #6, getAdditionResults() method to
see how this object gets thrown from the web service provider, and Step
#10, how this CorrelationIdNotFoundFault exception gets caught and its
underlying data (your exception and reason fields below) read.

If you're not using JAX-WS' generated Java objects but just using the
Dispatch interface, you can parse the results, look at here[2], Step #6,
for two of three parsing options (Search on JAX-WS Dispatch provides
three usage options), and here[3] for JAXBContext (search for private
void invokeAddNumbers() -- the entire string, including ()'s.)

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20080308
[2] http://www.jroller.com/gmazza/date/20071102
[3] http://www.javapassion.com/handsonlabs/wsjaxwsadv/#Exercise_1


Am Mittwoch, den 26.03.2008, 00:54 -0700 schrieb Davide Gesino:
 Assume I receive an answer such as:
 
 //INFO - ?xml version=1.0 encoding=UTF-8?
 //soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
 //  soap:Body
 //soap:Fault
 //  faultcodesoap:Server/faultcode
 //  faultstringprocessing failure exception/faultstring
 //  detail
 //ProcessingFailureException xmlns=tmf854.v1
 //  exceptionEXCPT_INTERNAL_ERROR/exception
 //  reasonsession_token_unexisting/reason
 ///ProcessingFailureException
 //  /detail
 ///soap:Fault
 //  /soap:Body
 ///soap:Envelope
 
 how can I recover the contained java exception? There is some utility code
 in CXF that does that??



Re: WARNING: dispatch failed!

2008-03-26 Thread Glen Mazza
Just a guess, but that sounds something like a denial-of-service
attack--you may be overquerying the web service, and it is running out
of threads as a result.

Querying the WSDL just to see if the web service is working would seem
to be inaccurate.  I can imagine the former working but the latter not
for many reasons (e.g., the database being down.)

Have you explored using asynchronous clients (links at the first
paragraph of [1])--that may provide an alternative solution for what you
are looking for.

Glen

[1] http://www.jroller.com/gmazza/date/20080308

Am Mittwoch, den 26.03.2008, 14:28 + schrieb Shaw, Richard A:
 Does anybody know why I would get the following error  ?
 
 26-Mar-2008 11:52:11 sun.reflect.GeneratedMethodAccessor19 invoke
 WARNING: dispatch failed!
 
 I have a client which communicated with a service every minute. The service 
 reads some data from a database and returns it. A few hours ago my server 
 started to log the error above every minute. Which suggests that it is still 
 receveived communcation from the client evey minute, however it has stopped 
 providing its wsdl definition. I was asking for the wsdl from my web browser 
 just to check that the server was still running. 
 
 I've restarted my service now and everything is working fine again (I didn't 
 restart the client).
 
 I'm using cxf-2.0-incubator-RC.jar from 23rd April 2007
 
 Richard Shaw
 
 ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
 
 Richard Shaw  
 Technical Design Authority - Information Solutions Consultancy  
 Intelligent Transport Systems 
 
 Atkins Highways and Transportation 
 Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
 
 Tel: +44 (0) 1372 756407 
 Fax: +44 (0) 1372 740055
 Mob: 07740 817586 
 E-mail: [EMAIL PROTECTED]
 
 www.atkinsglobal.com/its
 
 
 
 This email and any attached files are confidential and copyright protected. 
 If you are not the addressee, any dissemination of this communication is 
 strictly prohibited. Unless otherwise expressly agreed in writing, nothing 
 stated in this communication shall be legally binding.
 
 The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered 
 in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, 
 Epsom, Surrey KT18 5BW. A list of wholly owned Atkins Group companies 
 registered in the United Kingdom can be found at 
 http://www.atkinsglobal.com/terms_and_conditions/index.aspx
 
 Consider the environment. Please don't print this e-mail unless you really 
 need to.



Re: How I can set 'Home' or 'Root' or 'Docbase' directory?

2008-03-24 Thread Glen Mazza

1.  That seems strange.  Unless I'm not understanding you correctly, I would
think you just want to create one WSDL with 68 services (wsdl:operations),
and then proceed as follows: http://www.jroller.com/gmazza/date/20071019  

2.  It depends on your servlet container, not the web service stack.  A
simple way, for starters at least, is to rely on your classpath--see my last
comment at the very bottom of: http://www.jroller.com/gmazza/date/20071102.

3.
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html.
 
Read carefully.  The upcoming 2.0.5 (in a week or two) will make things a
little bit simpler: http://www.jroller.com/gmazza/date/20080322

Glen


Alpin, Luba wrote:
 
 Hi CXF-User-List,
 I need your help with my three questions, please HELP!
 
 1. I want to publish 68 services using ServerFactoryBean I create 68
 instances ServerFactoryBean - one for each service, is it correct usage
 of ServerFactoryBean? After 34 services I get OutOfMemory exception and
 this enforces me increase memory to -Xmx128m , while XFire enable do it
 with a default 64.
 
 2. I want create webserver root directory to store files for downloading
 client.
 With XFire this is root directory located in root of Jetty server. How I
 do it with CXF? Do I need create Jetty server and start it additional to
 calling create method for each ServerFactoryBean instance?
 
 3. Https? Please link to example.
 
 Thanks for help.
 Luba Alpin.
 
 

-- 
View this message in context: 
http://www.nabble.com/Override-schemalocation-when-creating-a-client-tp16228867p16254688.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Nested exceptions

2008-03-24 Thread Glen Mazza
Yes, look at catch (CorrelationIdNotFoundFault e) {...} in Step #10 of
[1] below.

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20080308

Am Montag, den 24.03.2008, 08:34 -0700 schrieb Mehmet Imga:
 Hello,
 
 is there a way to throw nested exceptions in webservices?
 
 for example I would like to throw following exception in server site and get 
 more info about nested exception in client site.
 
 throw new WSException(outer exception message, new SecurityException(inner 
 exception message, null));
 
 Thanks,
 Mehmet
 
 
   __
 Be smarter than spam. See how smart SpamGuard is at giving junk email the 
 boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to 
 New Mail today or register for free at http://mail.yahoo.ca



Re: Override schemalocation when creating a client

2008-03-23 Thread Glen Mazza
I have not coded that way before, nor needed to.  Can you not just set
the ENDPOINT_ADDRESS_PROPERTY as done here[1], step #7?

Otherwise, the JAX WS 2.1 specification, in Section 5.2.5.4
(Application-Specified Service) seems to define the manner of making
web services calls as you do below.  For XSD resolution, it also
requires using either the catalog facility defined in Section 4.4 or
metadata documents.  I would guess you would want to create the former
for your SOAP client calls to work.

HTH,
Glen

[1] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1

Am Sonntag, den 23.03.2008, 14:39 -0700 schrieb Kalle Korhonen:
 On Sat, Mar 22, 2008 at 10:47 PM, Glen Mazza [EMAIL PROTECTED] wrote:
 
  I'm not sure, but I think you're trying to create a dynamic client which
  is unfortunately not working for you.  Hopefully someone else can answer
  your specific question on this, but in the meantime, you might wish to
  try the more traditional route of getting the WSDL and XSD's on your
  machine locally, running wsdl2java and then coding your SOAP client
  using the wsdl2java artifacts generated, similar to here[1].  Once done,
  any missing XSD's from the server should no longer be a concern for you.
 
 
 But it is a concern. I have the generated service stubs, but if I create the
 service by specifying the the server url (Service.create(new
 URL(http://http://some.server/service?wsdl...),
 it'll try to fetch the xsds and fails because of that. The same doesn't
 happen if I point to a wsdl from classpath. I need to be able to specify the
 service location in code, and obviously I can add a new service port
 dynamically (Service.addPort) to make it work. But that's not the point; I
 believe the spec says the schemaLocation is only a hint and furthermore, I
 should be able to use the service without forced validation, don't you
 think?
 
 Kalle
 
 
 Am Samstag, den 22.03.2008, 16:28 -0700 schrieb Kalle Korhonen:
   Hello cxfers,
  
   I'm trying to consume some web service with jaxws/cxf. I use
  Service.create(new
   URL(http://some.server/service?wsdl;), SERVICE_NAME). The service's
  wsdl
   imports xsd with a relative schemaLocation (e.g xsd:import
   namespace=servicens schemaLocation=servicens.xsd) , but the .xsds
  are
   not available through the server (from http://some.server/servicens.xsd),
  so
   constructing the service (client) fails with FileNotFoundException. I
  have
   the xsds but I don't know how to tell cxf's servicefactory where the
  xsds
   are located. I've seen quite a few other threads on the list related to
   resolving references to xsds but the service is not mine so I cannot
  change
   the references or make the xsds available on the server. If I point to a
   local wsdl, the service factory doesn't even try to resolve the schemas;
   probably because it's setting the validation off, but I don't know how
  to
   control that. Anybody able to help me?
  
   Kalle
 
 



Re: Override schemalocation when creating a client

2008-03-22 Thread Glen Mazza
I'm not sure, but I think you're trying to create a dynamic client which
is unfortunately not working for you.  Hopefully someone else can answer
your specific question on this, but in the meantime, you might wish to
try the more traditional route of getting the WSDL and XSD's on your
machine locally, running wsdl2java and then coding your SOAP client
using the wsdl2java artifacts generated, similar to here[1].  Once done,
any missing XSD's from the server should no longer be a concern for you.

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20070929


Am Samstag, den 22.03.2008, 16:28 -0700 schrieb Kalle Korhonen:
 Hello cxfers,
 
 I'm trying to consume some web service with jaxws/cxf. I use 
 Service.create(new
 URL(http://some.server/service?wsdl;), SERVICE_NAME). The service's wsdl
 imports xsd with a relative schemaLocation (e.g xsd:import
 namespace=servicens schemaLocation=servicens.xsd) , but the .xsds are
 not available through the server (from http://some.server/servicens.xsd), so
 constructing the service (client) fails with FileNotFoundException. I have
 the xsds but I don't know how to tell cxf's servicefactory where the xsds
 are located. I've seen quite a few other threads on the list related to
 resolving references to xsds but the service is not mine so I cannot change
 the references or make the xsds available on the server. If I point to a
 local wsdl, the service factory doesn't even try to resolve the schemas;
 probably because it's setting the validation off, but I don't know how to
 control that. Anybody able to help me?
 
 Kalle



Re: Error in AbstractHTTPDestination.setHeaders, AbstractHTTPDestination.setHeaders

2008-03-21 Thread Glen Mazza
Am Freitag, den 21.03.2008, 01:27 -0400 schrieb Wolf, Chris (IT):
 If I run my service inside a Tomcat-5.5 runtime configured in
 Eclipse-3.2, all works fine. 
 I run the very same code, deployed on Tomcat-5.5 on Linux, I get this
 error.  
 If anyone can suggest something short of debuggin the CXF source, that
 would be 
 great.  I am using 2.0.4. 
 

If nobody else can answer your question, time to debug the CXF source:

http://www.jroller.com/gmazza/date/20071212

Step #5 would probably be most important for you.

Glen




RE: Error in AbstractHTTPDestination.setHeaders,AbstractHTTPDestination.setHeaders

2008-03-21 Thread Glen Mazza
I've been looking at our Basic Authentication recently--the error
messages have been cryptic in many cases, not providing acceptable
feedback.  

In your case below, we should have a precise error message about an
invalid format in the Authorization header field--not just an NPE of
course.  If you could submit a JIRA for this it would be appreciated,
else I'll try to remember.

I don't think we should make an exception for Siteminder though, because
that might open up a security hole.  Also, Section two of RFC 2617[1]
states:  To receive authorization, the client sends the userid and
password, separated by a single colon (:) character, within a base64
[7] encoded string in the credentials.  Apparently both username and
password are always needed.  I don't know Siteminder but I would think
they would have an option to always supply a password in order to be RFC
2617 compliant.  If not, please let them know about it.

Thanks,
Glen


[1] http://www.faqs.org/rfcs/rfc2617.html

Am Freitag, den 21.03.2008, 11:30 -0400 schrieb Wolf, Chris (IT):
 Glen,
 
 Thanks again for your help.  I downloaded the source and looked at it 
 before going through the laborious task of setting up for remote
 debugging.
 
 I can see the the issue is the code in AbstractHTTPDestination always 
 assumes the value of the Authorization header will always be a base64
 encoded username:password value -- in my case, we use Siteminder
 authentication,
 so sometimes the value of the Authorization header is just the base64
 encoded
 username -- without a colon and password, i.e. no :passw, which
 exactly
 explains this array index out of bounds exception. 
 
 The workaround is, I'm going to tell my users to log out of Siteminder
 and re-authenticate, such that the Authorization header always has
 both
 pieces in the value. 
 
 I would like to present a patch for the case where the Authorization 
 header value does not contain a colon character, even for Basic
 type of authentication, but I'm not sure special accomodation would be
 made for Siteminder, unelss the RFC for Basic authentication says the
 Authorization header may contain just an encoded username in certain 
 circumstances.
 
  
 -Chris
 
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 21, 2008 7:12 AM
 To: cxf-user@incubator.apache.org
 Subject: Re: Error in
 AbstractHTTPDestination.setHeaders,AbstractHTTPDestination.setHeaders
 
 Am Freitag, den 21.03.2008, 01:27 -0400 schrieb Wolf, Chris (IT):
  If I run my service inside a Tomcat-5.5 runtime configured in 
  Eclipse-3.2, all works fine.
  I run the very same code, deployed on Tomcat-5.5 on Linux, I get this 
  error.
  If anyone can suggest something short of debuggin the CXF source, that
 
  would be great.  I am using 2.0.4.
  
 
 If nobody else can answer your question, time to debug the CXF source:
 
 http://www.jroller.com/gmazza/date/20071212
 
 Step #5 would probably be most important for you.
 
 Glen
 
 
 NOTICE: If received in error, please destroy and notify sender. Sender does 
 not intend to waive confidentiality or privilege. Use of this email is 
 prohibited when received in error.



Re: Generating client for Jira webservice

2008-03-18 Thread Glen Mazza

That web service is old-fashioned rpc/encoded.  CXF and Metro use the
incompatible doc/lit or rpc/lit--our wsdl2java can't work with it.  Axis 1
(not Axis 2) may help you.

(Although I think there was an effort in the past for CXF to handle
rpc/encoded--I don't know what if anything became of it.)

Glen



stlecho wrote:
 
 Hi,
 
 I'm trying to generate an webservice client for the Jira webservices with
 CXF v2.0.4. The WSDL I'm using can be found here:
 http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl.
 
 When generating the client with the following Ant target: java
 classname=org.apache.cxf.tools.wsdlto.WSDLToJava fork=truearg
 value=-client/arg value=-d/arg value=src/arg value=-p/arg
 value=com.notary.app.capa.cxf/arg
 value=wsdl/jira.wsdl/classpathpath
 refid=cxf.classpath//classpath/java an error message is generated:
 Exception in thread main org.apache.cxf.tools.common.ToolException:
 Tools plugin provider jaxb context init failed.
 
 The JARs referenced through cxf.classpath are: cxf-2.0.4-incubator.jar
 and jaxb-api-2.0.jar.
 
 Any help with this issue is highly appreciated ;o).
 
 Regards, Stefan Lecho.
 

-- 
View this message in context: 
http://www.nabble.com/Generating-client-for-Jira-webservice-tp16131696p16133653.html
Sent from the cxf-user mailing list archive at Nabble.com.



RE: Looking for example code

2008-03-17 Thread Glen Mazza
Sorry, I don't work much with Microsoft products.  I've been on Ubuntu
at home for over a year now and simply love it.

Glen

Am Montag, den 17.03.2008, 08:32 -0700 schrieb Blair Jennings:
 Thanks Glen I will try Metro again. I was getting some interesting
 errors from it that I could not figure out what they meant so that is
 why I moved to CXF. It helped me clean up some issues with the wsdl so
 maybe Metro will work now.
 
 Though I hate to say it but I would have rather stayed with CXF (It
 seems to be better designed than Metro (SUN needs to work more on its
 software) and more robust. Can you guys work more on interop scenarios
 please? 
 
 Thanks again,
 
 Blair Jennings
 Senior Software Engineer
 A-Life Medical, Inc.
 6195 Lusk Blvd., Suite 120 * San Diego, California 92121
 Direct: 858.795.1716
 Toll-Free: 888.224.6300 x1716
 Fax: 858.812.0951
 E-mail: [EMAIL PROTECTED]
 Web: www.alifemedical.com
  
 Streamlining the Code to Collection Process with Computerized Practice
 Management and Medical Coding Products and Services
 This message is for the sole use of the intended recipient and may
 contain confidential and privileged information.  Any unauthorized
 review, use, disclosure or distribution is prohibited.  If you are not
 the intended recipient, please contact the sender and destroy all copies
 of the original message.
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 14, 2008 7:02 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Looking for example code
 
 Because they work heavily with Microsoft concering interoperability,
 Metro is generally better documented[1][2] for accessing .NET services.
 If you cannot get CXF working, you may want to try a Metro client.
 Outside of authorization, the two stacks are rather easily swappable.[3]
 
 Glen
 
 [1] https://jax-ws.dev.java.net/guide/
 [2] http://forums.java.net/jive/thread.jspa?messageID=264025
 [3] http://www.jroller.com/gmazza/date/20070929
 
 
 Am Freitag, den 14.03.2008, 08:29 -0700 schrieb Blair Jennings:
  Does anyone have an example of a .NET WCF web service with a CXF
 client.
  I am having some trouble getting this to work right. It needs to be
 able
  to use the wsHttpBinding from WCF with a username and password
 provided
  via a secure token.
  
   
  
  Thanks,
  
   
  
  Blair Jennings
  
  Senior Software Engineer
  
  A-Life Medical, Inc.
  
  6195 Lusk Blvd., Suite 120 * San Diego, California 92121
  
  Direct: 858.795.1716
  
  Toll-Free: 888.224.6300 x1716
  
  Fax: 858.812.0951
  
  E-mail: [EMAIL PROTECTED]
  
  Web: www.alifemedical.com http://www.alifemedical.com 
  
   
  
  Streamlining the Code to Collection Process with Computerized Practice
  Management and Medical Coding Products and Services
  
  This message is for the sole use of the intended recipient and may
  contain confidential and privileged information.  Any unauthorized
  review, use, disclosure or distribution is prohibited.  If you are not
  the intended recipient, please contact the sender and destroy all
 copies
  of the original message.
  
   
  
  
  
  This message is for the sole use of the intended recipient and may
 contain confidential and priviledged information.  Any unauthorized
 review, use, disclosure or distribution is prohibited.  If you are not
 the intended recipient, please contact the sender and destroy all copies
 of the original message.
  
 
 
 
 This message is for the sole use of the intended recipient and may contain 
 confidential and priviledged information.  Any unauthorized review, use, 
 disclosure or distribution is prohibited.  If you are not the intended 
 recipient, please contact the sender and destroy all copies of the original 
 message.
 
 



Re: Looking for example code

2008-03-14 Thread Glen Mazza
Because they work heavily with Microsoft concering interoperability,
Metro is generally better documented[1][2] for accessing .NET services.
If you cannot get CXF working, you may want to try a Metro client.
Outside of authorization, the two stacks are rather easily swappable.[3]

Glen

[1] https://jax-ws.dev.java.net/guide/
[2] http://forums.java.net/jive/thread.jspa?messageID=264025
[3] http://www.jroller.com/gmazza/date/20070929


Am Freitag, den 14.03.2008, 08:29 -0700 schrieb Blair Jennings:
 Does anyone have an example of a .NET WCF web service with a CXF client.
 I am having some trouble getting this to work right. It needs to be able
 to use the wsHttpBinding from WCF with a username and password provided
 via a secure token.
 
  
 
 Thanks,
 
  
 
 Blair Jennings
 
 Senior Software Engineer
 
 A-Life Medical, Inc.
 
 6195 Lusk Blvd., Suite 120 * San Diego, California 92121
 
 Direct: 858.795.1716
 
 Toll-Free: 888.224.6300 x1716
 
 Fax: 858.812.0951
 
 E-mail: [EMAIL PROTECTED]
 
 Web: www.alifemedical.com http://www.alifemedical.com 
 
  
 
 Streamlining the Code to Collection Process with Computerized Practice
 Management and Medical Coding Products and Services
 
 This message is for the sole use of the intended recipient and may
 contain confidential and privileged information.  Any unauthorized
 review, use, disclosure or distribution is prohibited.  If you are not
 the intended recipient, please contact the sender and destroy all copies
 of the original message.
 
  
 
 
 
 This message is for the sole use of the intended recipient and may contain 
 confidential and priviledged information.  Any unauthorized review, use, 
 disclosure or distribution is prohibited.  If you are not the intended 
 recipient, please contact the sender and destroy all copies of the original 
 message.
 



Re: wsdl2java error

2008-03-10 Thread Glen Mazza
I think you're using Maven.  Trying using the goal of mvn
generate-sources instead, to see if that works.  ([1], Maven Notes #2
at the very bottom.)

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20070929

Am Montag, den 10.03.2008, 11:01 -0700 schrieb mattrpav:
 cxf-2.0.4-incubator, running wsdl2java.  Thoughts?  
 
 [INFO] [cxf-codegen:wsdl2java {execution: default}]
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading plugin
 jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/apache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.0.4-incubator/cxf-tools-wsdlto-frontend-jaxws-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Found 1 frontends in jaxws plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading jaxws frontend from jaxws plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading plugin
 jar:file:/Users/mpav/Desktop/sm-eclipse/apache-maven-2.0.8/repo/org/apache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.0.4-incubator/cxf-tools-wsdlto-databinding-jaxb-2.0.4-incubator.jar!/META-INF/tools-plugin.xml
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Found 1 databindings in jaxb plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadPlugin
 INFO: Loading jaxb databinding from jaxb plugin.
 Mar 10, 2008 12:55:59 PM org.apache.cxf.tools.wsdlto.core.PluginLoader
 loadBuilder
 SEVERE: Can not load processor
 org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Can not load processor
 org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder
 
 org.apache.xerces.dom.DeferredDocumentTypeImpl



Re: Need assistance re: ServiceConstructionException

2008-03-09 Thread Glen Mazza
Check your serviceName value for the @javax.jws.WebService annotation
preceding your web service's implementation class, like here:
http://www.jroller.com/gmazza/date/20080308#MTstep6

HTH,
Glen

Am Sonntag, den 09.03.2008, 11:04 -0400 schrieb Wolf, Chris (IT):
 Before posting this, I looked at the JAX-WS spec (although I could only
 find 2.1) and searched
 the message archives.  Before resorting to downloading the CXF source
 and building 
 CXF from scratch so I can debug this problem, I am hoping someone can
 help.
  
 I created a service with a number of operations, based on the
 wsdl_first sample.
 Everything works great in the Jetty-embedded configuration, however,
 when I try
 to prepare a WAR deployment, and deploy to Tomcat, I receive the
 following cryptic error:
 
 Mar 09 10:01:15 bw26wolfch  [] 2 Error
 org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadmin
 ]
 Servlet /secadmin threw load() exception
 org.apache.cxf.service.factory.ServiceConstructionException:
 Could not find definition for service
 {http://services.secadmin.cis.ms.com/}SecAdminImplService.
 
 The generated service interface is:
 com.ms.cis.secadmin.services.SecAdmin
 
 The implementation class is:
 com.ms.cis.secadmin.services.SecAdminImpl
 
 *** So why is it looking for SecAdminImplService?  Why is it appending
 Service?
 
 
 The relevant configuration settings are:
 
 WSDL:
 
 wsdl:definitions name=SecAdmin
 targetNamespace=http://services.secadmin.cis.ms.com; 
 [...]
 wsdl:portType name=SecAdmin
 [...]
 wsdl:binding name=SecAdmin_SOAPBinding type=tns:SecAdmin
 [...]
 wsdl:service name=SecAdmin
 wsdl:port binding=tns:SecAdmin_SOAPBinding name=secadmin
 soap:address location=http://localhost:8080/secadmin/
 /wsdl:port
 /wsdl:service
 
 CXF-SERVLET:
 
 beans xmlns=http://www.springframework.org/schema/beans;
 [...]
   jaxws:endpoint
 id=secadmin
 implementor=com.ms.cis.secadmin.services.SecAdminImpl
 wsdlLocation=WEB-INF/wsdl/secadmin.wsdl
 address=/secadmin
 jaxws:features
   bean class=org.apache.cxf.feature.LoggingFeature/
 /jaxws:features
   /jaxws:endpoint
 /beans
 
 
 NOTICE: If received in error, please destroy and notify sender. Sender does 
 not intend to waive confidentiality or privilege. Use of this email is 
 prohibited when received in error.



Re: Need help for XMLStreamException: ParseError at [row,col]:[1,1]

2008-03-09 Thread Glen Mazza
What are you putting in the WAR file--the web service or the SOAP
client?

Also, I'm unsure if you should be relying on the autogenerated
client--that is primarily a helper file not really part of JAX-WS
(GlassFish Metro I don't think provides it.)  I've never bothered using
it.

The first thing to check is to make sure that you can access the Web
Service's wsdl from a browser after you have deployed it to Tomcat--if
you can't, then no client will ever work.  (Check [2] for how WSDL URLs
are created using Tomcat and CXF.) Once you know you can access the wsdl
from a browser, you should be able to manually create a client similar
in appearance to the example here[3] or here[4].

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20080308#MTstep9
[2] http://www.jroller.com/gmazza/date/20071019#notes (note #4)
[3] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1
(step #7)
[4] http://www.jroller.com/gmazza/date/20070929

Am Montag, den 10.03.2008, 00:01 -0400 schrieb Wolf, Chris (IT):
 I know this issue has been discussed before, because I found a
 description
 and apparent fix here: 
 
 http://www.mail-archive.com/cxf-user@incubator.apache.org/msg04687.html 
 
 However, putting the updated Xerces and Xalan in the
 TOMCAT/common/endorsed
 directory did not solve the issue for me.
 
 If I deploy my service as a standalone service embedded in Jetty, 
 (generated via wsdl2java -server)it works,
 but when I configure it for WAR deployment in Tomcat-5.5, the client 
 (generated via wsdl2java -client)  throws the exception shown below.
 
 Also when deployed in standalone mode I can retrieve the WSDL via HTTP
 GET,
 but when depoyed as a WAR in Tomcat, I just get a 404 error.  
 
 When I used the TCP/IP Monitor (Eclipse plugin similar to tcpmon) I see
 the
 that Client is sending the expected SOAP envelope, but is getting
 nothing
 back, however, with HTTP 301 or 302 response codes.  I double checked my
 proxy settings
 in Eclipse and browser and have verified that both localhost and the
 canonical
 hostname are excluded from proxying.  I tried both localhost and the
 canonical
 hostname in the request. (overriding via
 BindingProvider.ENDPOINT_ADDRESS_PROPERTY)
 
 Any help would be greatly appreciated.
 
-Chris
 
 Mar 9, 2008 6:00:44 PM org.apache.cxf.phase.PhaseInterceptorChain
 doIntercept
 INFO: Interceptor has thrown exception, unwinding now
 org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
   at
 org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
 sage(ReadHeadersInterceptor.java:191)
 [...]
   at
 com.ms.cis.secadmin.services.SecAdmin_Secadmin_Client.main(SecAdmin_Seca
 dmin_Client.java:60)
 Caused by: javax.xml.stream.XMLStreamException: ParseError at
 [row,col]:[1,1]
 Message: Premature end of file.
   at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
   at
 com.sun.xml.stream.XMLReaderImpl.nextTag(XMLReaderImpl.java:1177)
   at
 org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
 sage(ReadHeadersInterceptor.java:85)
   ... 15 more
 
 
 NOTICE: If received in error, please destroy and notify sender. Sender does 
 not intend to waive confidentiality or privilege. Use of this email is 
 prohibited when received in error.



Re: Handling internal errors via SOAP faults

2008-03-08 Thread Glen Mazza


dkulp wrote:
 
 In general, the jaxws way of doing this is to map the runtime 
 exceptions to a very generic soap fault that is fault code SERVER and 
 just the message (ex.getMessage()) is set into the fault message.
 
 On the client side, this ends up throwing the generic SOAPFaultException 
 (but with the correct message set).
 
 
Thanks for the tip.  I used the convenience function in our systests that
did that:

private SOAPFaultException createSOAPFaultException(String faultString) {
try {
SOAPFault fault = SOAPFactory.newInstance().createFault();
fault.setFaultString(faultString);
fault.setFaultCode(new QName(http://example.org/faultcode;,
Server));
return new SOAPFaultException(fault);
} catch (SOAPException e) {
// do nothing
}
return null;
}

A full sample is here: http://www.jroller.com/gmazza/date/20080308#MTstep6

Glen

-- 
View this message in context: 
http://www.nabble.com/Handling-internal-errors-via-SOAP-faults-tp15892864p15919990.html
Sent from the cxf-user mailing list archive at Nabble.com.



Handling internal errors via SOAP faults

2008-03-07 Thread Glen Mazza
Hello, I have a general question for WSDL design regarding internal web
service errors not the fault of the SOAP client request, such as
database unavailable or system down or whatever.

For example, let's say I have a simple GetCapital web service that
takes a country and returns the name of its capital.  One obvious
user-instigated error is providing a country name that doesn't exist.
Such a wsdl operation might be:

  wsdl:operation name=GetCapital
 wsdl:input message=tns:GetCapitalRequest /
 wsdl:output message=tns:GetCapitalResponse /
 wsdl:fault message=tns:InvalidCountryNameFault
name=InvalidCountryNameFault /
  /wsdl:operation

But what about exceptions due to the internal service-side errors not
the fault of the SOAP client request (e.g., database being down, JNDI
lookup not functioning, etc.)  In this case, do I add an additional
wsdl:fault (perhaps InternalServiceErrorFault) to each wsdl:operation
or is there a generic error handling mechanism in JAX-WS that would not
require me to burden each wsdl:operation with this additional fault?

Thanks,
Glen




Re: NullPointerException thrown by CXFServlet

2008-03-06 Thread Glen Mazza

My version works: http://www.jroller.com/gmazza/date/20071019

Perhaps you can see a delta between what you are doing and what I am doing
that will help you spot the error.

Glen


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.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-tp15883372p15884221.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Accessing WebService that requires username/password

2008-03-05 Thread Glen Mazza
Sadly, I was able to get this portion of your code below to work for
Metro but not CXF:

rc.put(BindingProvider.USERNAME_PROPERTY, userName);
rc.put(BindingProvider.PASSWORD_PROPERTY, password);

I have been meaning to look at this to find out the reason why.  But in
the meantime, CXF has an alternate method of supplying this information,
documented here[1].

Glen

[1] http://tinyurl.com/ytc77j

Am Mittwoch, den 05.03.2008, 15:37 -0800 schrieb xbranko:
 How should a webservice that requires basic username/password for
 authentication be accessed? The CXF service class that is autogenerated
 extends the javax.xml.ws.Service class. So when the client tries to
 instantiate it, it fails because it gets java.io.IOException: Server
 returned HTTP response code: 401 for URL.
 
 Looking at the documentation, and on the web, it seems that what is needed
 is to add something like this:
 
 //Create a dispatch instance
 DispatchSOAPMessage dispatch = 
createDispatch(WebService1, SOAPMessage.class,
 Service.Mode.MESSAGE);
 
 // Use Dispatch as BindingProvider
 BindingProvider bp = (BindingProvider) dispatch;
 
 // Optionally Configure RequestContext to send SOAPAction HTTP
 Header
 MapString, Object rc = bp.getRequestContext();
 rc.put(BindingProvider.USERNAME_PROPERTY, userName);
 rc.put(BindingProvider.PASSWORD_PROPERTY, password);
 
 before the service hits the url. However, given that service derives from
 javax.xml.ws.Service class whose constructor is protected, how do I do that,
 given that constructor looks like:
 
 public WebServiceX() {
 super(WSDL_LOCATION, SERVICE);
 }
   
 and in the super's constructor (javax.xml.ws.Service), the class tries to
 connect to the url that needs the username and password, and due to java,
 call to super must be the first call in the deriver class's constructor.
 
 Note that this is not an https service, but just an http service that works
 well when I invoke it from the browser (once I provide username and password
 in the dialog box provided by the browser).
 
 Any help greatly appreciated!



Re: Stubs and Ports

2008-03-05 Thread Glen Mazza
We have our own java2wsdl tool you can use.  Axis2's work I believe is
not JAX-WS standard, they do their own thing.

Glen

Am Dienstag, den 04.03.2008, 16:39 + schrieb John-M Baker:
 Hello,
 
 I appreciate I'm asking a lot of questions today - sorry. I guess I'm 
 adding lots to the mail archive :) 
 
 When a stub is generated, a number of get methods exist for the various 
 ports defined in the WSDL. If I call getQuerySOAP11PortHttp() then I can 
 make a WS call and everything work as expected. If I call getQueryHttpport 
 then the following stack trace is generated:
 
 Caused by: org.apache.cxf.BusException: No binding factory for namespace 
 http://schemas.xmlsoap.org/wsdl/http/ registered.
   at 
 org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:82)
   at 
 org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:87)
   at 
 org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
   ... 7 more
 
 I appreciate this most probably has something to do with my WSDL, which 
 was generated by the Axis2 java2wsdl task. But I'd be interested to hear 
 what is wrong. WSDL at bottom of mail (for completeness).
 
 Thanks,
 
 
 John
 
 ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
 xmlns:ns4=http://ldap.dao.websso.db.com/xsd; 
 xmlns:ns0=http://ldap.springframework.org/xsd; 
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; 
 xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; 
 xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; 
 xmlns:ns5=http://service.ws.websso.db.com; 
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; 
 xmlns:ns6=http://dao.websso.db.com/xsd; 
 xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; 
 xmlns:ns1=http://util.java/xsd; 
 xmlns:ns3=http://persistent.dao.websso.db.com/xsd; 
 xmlns:ns2=http://websso.db.com/xsd; 
 xmlns:xs=http://www.w3.org/2001/XMLSchema; 
 targetNamespace=http://service.ws.websso.db.com;
 wsdl:types
 xs:schema xmlns:ax28=http://ldap.springframework.org/xsd; 
 attributeFormDefault=qualified elementFormDefault=qualified 
 targetNamespace=http://ldap.springframework.org/xsd;
 xs:complexType name=LdapTemplate
 xs:sequence
 xs:element minOccurs=0 name=contextSource 
 nillable=true type=ax28:ContextSource/
 xs:element minOccurs=0 name=exceptionTranslator 
 nillable=true type=ax28:NamingExceptionTranslator/
 xs:element minOccurs=0 
 name=ignorePartialResultException type=xs:boolean/
 /xs:sequence
 /xs:complexType
 xs:complexType name=ContextSource
 xs:sequence
 xs:element minOccurs=0 name=readOnlyContext 
 nillable=true type=xs:anyType/
 xs:element minOccurs=0 name=readWriteContext 
 nillable=true type=xs:anyType/
 /xs:sequence
 /xs:complexType
 xs:complexType name=NamingExceptionTranslator
 xs:sequence/
 /xs:complexType
 /xs:schema
 xs:schema xmlns:ax22=http://util.java/xsd; 
 attributeFormDefault=qualified elementFormDefault=qualified 
 targetNamespace=http://util.java/xsd;
 xs:complexType name=Set
 xs:sequence
 xs:element minOccurs=0 name=empty 
 type=xs:boolean/
 /xs:sequence
 /xs:complexType
 xs:complexType name=Iterator
 xs:sequence/
 /xs:complexType
 xs:complexType name=Map
 xs:sequence
 xs:element minOccurs=0 name=empty 
 type=xs:boolean/
 /xs:sequence
 /xs:complexType
 /xs:schema
 xs:schema xmlns:ax25=http://websso.db.com/xsd; 
 xmlns:ax26=http://util.java/xsd; attributeFormDefault=qualified 
 elementFormDefault=qualified targetNamespace=http://websso.db.com/xsd;
 xs:import namespace=http://util.java/xsd/
 xs:complexType name=Configuration
 xs:sequence
 xs:element minOccurs=0 name=activityPermissionMap 
 nillable=true type=ax26:Map/
 xs:element minOccurs=0 name=adminEmail 
 nillable=true type=xs:string/
 xs:element minOccurs=0 name=adminRole 
 nillable=true type=xs:string/
 xs:element minOccurs=0 name=enforcePermissions 
 type=xs:boolean/
 xs:element minOccurs=0 name=maxRowsPerQuery 
 type=xs:int/
 xs:element minOccurs=0 name=scheduleFromEmail 
 nillable=true type=xs:string/
 xs:element minOccurs=0 
 name=scheduledReportDirectory nillable=true type=xs:string/
 /xs:sequence
 /xs:complexType
 /xs:schema
 xs:schema xmlns:ax23=http://util.java/xsd; 
 

Re: CXF confuses operations

2008-03-04 Thread Glen Mazza

Scott, I don't know, but I would recommend starting a new thread for this
(different) question--changing the topic under a non-relevant subject title
might reduce the number of responses you get.

Glen


Scott Anderson-5 wrote:
 
 Is it possible to encode an enum for a parameter in a GET request? For
 this
 particular instance, I'm doing a simple query that takes an enum object,
 but
 CXF doesn't seem to know how to convert the string to an enum (it throws a
 class cast exception) unless I use POST.
 
 Thanks,
 Scott
 
 On Mon, Mar 3, 2008 at 11:25 PM, Glen Mazza [EMAIL PROTECTED]
 wrote:
 
 That's not WS-I Basic Profile compliant, because for many web service
 stacks, it is the parameters that are used to determine which operation
 is called.If you run wsdl2java with the validation option you should
 see a warning to that effect.  Metro also would complain about that,
 although they provide an override option accepting that I believe.

 Glen

 Am Sonntag, den 02.03.2008, 14:28 -0500 schrieb Scott Anderson:
  If I create two operations with different messages, but which have the
  parameters of the same name (which are unwrapped), CXF is unable to
  distinguish which operation I was referring to, despite it being
 specified
  in the POST URL. Is there any good solution to this, other than using
 GET or
  changing the parameter names?
  Thanks
  Scott


 
 

-- 
View this message in context: 
http://www.nabble.com/CXF-confuses-operations-tp15791947p15839329.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: CXF confuses operations

2008-03-03 Thread Glen Mazza
That's not WS-I Basic Profile compliant, because for many web service
stacks, it is the parameters that are used to determine which operation
is called.If you run wsdl2java with the validation option you should
see a warning to that effect.  Metro also would complain about that,
although they provide an override option accepting that I believe.

Glen

Am Sonntag, den 02.03.2008, 14:28 -0500 schrieb Scott Anderson:
 If I create two operations with different messages, but which have the
 parameters of the same name (which are unwrapped), CXF is unable to
 distinguish which operation I was referring to, despite it being specified
 in the POST URL. Is there any good solution to this, other than using GET or
 changing the parameter names?
 Thanks
 Scott



Re: CXF Spring Transactions

2008-03-03 Thread Glen Mazza
Can you mock out the web service calls to confirm that it is CXF eating
up your DBCP pool and nothing something else?

Glen

Am Montag, den 03.03.2008, 13:19 -0800 schrieb Michael McCaskill:
 I'm coming from Spring-Webservices. I like that CXF supports contract-last
 since I'm in a prototype, rapid development phase for my work project. But
 I've noticed that weird things happen when using CXF with Spring
 Transactions.
 
 It appears that after so many web service calls, the DBCP pool is exhausted
 and connections aren't returned. This wasn't happening with
 Spring-Webservices. I've tried the 2.1-incubator-SNAPSHOT as well. It needs
 to be said that I am filtering out the Spring-2.0.6 dependencies and opting
 for 2.5. I'm using Spring's @Transactional annotation, JAXB,
 JaxWsProxyFactoryBean on client, jaxws:endpoint on server, Hibernate 3.1 and
 Oracle 9.2.0.8.



Re: Building cxf

2008-02-28 Thread Glen Mazza

Steps 1 and 2 of here[1] are how I downloaded and compiled CXF.  Perhaps that
might be of help.

Glen

[1] http://www.jroller.com/gmazza/date/20080225


dkulp wrote:
 
 
 No idea.
 
 Couple suggestions:
 1) What version of maven are you using?   You may need 2.0.7.  Not really 
 sure.
 
 2) Can you run with -X flag and look at the Classpath that is printed 
 just before the javac command?   It should have:
 
 /home/dkulp/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.4/maven-artifact-manager-2.0.4.jar
 
 /home/dkulp/.m2/repository/org/apache/maven/maven-artifact/2.0.4/maven-artifact-2.0.4.jar
 which is where those classes should come from.
 
 3) Next suggestion would be to:
 rm -rf ~/.m2/repository/org/apache/maven/maven-artifact*
 and have maven re-download them.  Sometimes it can get a bit confused.
 
 Dan
 
 
 On Thursday 28 February 2008, tog wrote:
 I just downloaded the 2.04 sources. Trying to compile I get this
 error:

 [INFO]
 --
-- [ERROR] BUILD FAILURE
 [INFO]
 --
-- [INFO] Compilation failure

 /Users/alleon/Documents/apache-cxf-2.0.4-incubator-src/maven-plugins/c
odegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.j
ava:[37,33] package org.apache.maven.artifact does not exist

 /Users/alleon/Documents/apache-cxf-2.0.4-incubator-src/maven-plugins/c
odegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.j
ava:[169,13] cannot find symbol
 symbol  : class Artifact
 location: class org.apache.cxf.maven_plugin.WSDL2JavaMojo

 /Users/alleon/Documents/apache-cxf-2.0.4-incubator-src/maven-plugins/c
odegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.j
ava:[169,52] cannot find symbol
 symbol  : class Artifact
 location: class org.apache.cxf.maven_plugin.WSDL2JavaMojo


 Any idea on what I might be doing wrong ?
 I am running on a MacOS 10.4 machine
 
 
 
 -- 
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog
 
 

-- 
View this message in context: 
http://www.nabble.com/Building-cxf-tp15730400p15741758.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: how to change endpoint address in cxf.xml?

2008-02-28 Thread Glen Mazza

I'm unsure if you're trying to change the URL that a SOAP client is using, or
a the URLs being employed by the web service.

If the former, Step 7 of [1] might help you.  You can use dependency
injection to feed a URL to your SOAP client, and use the Java code in Step
#7 to dynamically change the URL based on what is fed in.

If the latter, I'm not exactly certain but Note #4 of [2] may give you an
indication of where this information is configured.

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20070817
[2] http://www.jroller.com/gmazza/date/20071019#notes



Christopher Cheng wrote:
 
 How could I change the endpoint addresses of all service calls in cxf?
 I am trying to switch the endpoint address from https://myhost/websvc to
 http://myhost/websvc 
 Is there a 1-line configuration to do that?
 

-- 
View this message in context: 
http://www.nabble.com/how-to-change-endpoint-address-in-cxf.xml--tp15741255p15741843.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: how to change endpoint address in cxf.xml?

2008-02-28 Thread Glen Mazza
Forwarding to cxf-user list (email accidentally just went to
Christopher)

Am Donnerstag, den 28.02.2008, 21:58 -0500 schrieb Glen Mazza:
 Possibly, but I don't think you should do that in a CXF-specific manner
 that you are envisioning.  (I don't know of a CXF-specific manner
 myself.)
 
 It seems that basic Spring Dependency Injection (google) would easily
 solve your problem.  Create an instance variable called endpointURL in
 your class, then use Spring DI to populate that value (which you store
 in an XML config file) when you instantiate your web service client.
 There are two types of DI here--you can have your client open an XML
 file and read the endpoint URL from it, or you can have a Spring
 application instantiate a copy of your client, providing it the
 endpointURL from an XML file. That line of code you have below will then
 automatically use the endpointURL that you have populated.
 
 There is nothing new here, you just want to populate an instance value
 from a Spring config file (like cxf.xml, or any other Spring config
 file.)  Spring DI is not too difficult, I would google for some
 tutorials on it, or check the Spring user forums for advice.
 
 Glen
 
 Am Freitag, den 29.02.2008, 10:02 +0800 schrieb Christopher Cheng:
  Hi Glen,
  
  I am implementing the client side, so [1] is more relevant.
  
  I can see that the URL is changed at
  
  bp.getRequestContext().
  put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
  
  What I want to make it happen is that I could change the endpoint address 
  in 
  cxf.xml so that all calls are using the endpoint address is spring config 
  instead of using the endpoint in wsdl defined. So is there a way to do it 
  in 
  cxf.xml instead of using the java code above?
  
  
  
  - Original Message - 
  From: Glen Mazza [EMAIL PROTECTED]
  To: cxf-user@incubator.apache.org
  Sent: Friday, February 29, 2008 1:41 AM
  Subject: Re: how to change endpoint address in cxf.xml?
  
  
  
   I'm unsure if you're trying to change the URL that a SOAP client is 
   using, 
   or
   a the URLs being employed by the web service.
  
   If the former, Step 7 of [1] might help you.  You can use dependency
   injection to feed a URL to your SOAP client, and use the Java code in Step
   #7 to dynamically change the URL based on what is fed in.
  
   If the latter, I'm not exactly certain but Note #4 of [2] may give you an
   indication of where this information is configured.
  
   HTH,
   Glen
  
   [1] http://www.jroller.com/gmazza/date/20070817
   [2] http://www.jroller.com/gmazza/date/20071019#notes
  
  
  
   Christopher Cheng wrote:
  
   How could I change the endpoint addresses of all service calls in cxf?
   I am trying to switch the endpoint address from https://myhost/websvc to
   http://myhost/websvc
   Is there a 1-line configuration to do that?
  
  
   -- 
   View this message in context: 
   http://www.nabble.com/how-to-change-endpoint-address-in-cxf.xml--tp15741255p15741843.html
   Sent from the cxf-user mailing list archive at Nabble.com.
  
   
  
  



Re: Does CXF Support Interfaces as Web Params?

2008-02-26 Thread Glen Mazza
I think the answer is no, neither CXF nor GlassFish Metro support
interfaces as parameters.  It's either a JAX-WS or JAXB rule, I'm not
certain.

Glen

Am Dienstag, den 26.02.2008, 15:07 -0800 schrieb Ayush Gupta:
 In my web service, there is a method which takes an interface as its
 parameter, instead of a concrete class. Reference code is at the bottom of
 this email.
 
  
 
 When I run the client, I get an exception Caused by:
 javax.xml.bind.JAXBException: com.passenger.test.ComplexObjectInterface is
 not known to this context. Further investigation and digging through the
 CXF code bought me to JAXBUtils. getValidClass(Class? cls) which is called
 while building the JAXBContext. The code in JAXBUtils. getValidClass
 explicitly excludes inclusion of any interfaces! I also tried setting the
 XmlJavaTypeAdapter on the interface but that didn't work.
 
  
 
 So, does CXF Support Interfaces as Web Params? I'd appreciate anyone
 throwing some light on this!
 
  
 
 Thanks
 
 -ayush
 
  
 
 
 
 Web Service Interface:
 
 public interface TestServiceInterface {
 
 public void testMethod(MyInterface param);
 
 }
 
  
 
 Parameter Interface:
 
 public interface MyInterface{
 
 String getText();
 
 void setText(String t);
 
 }
 
  
 
 
 
 Parameter concrete class:
 
 public class MyClass implements MyInterface {
 
 private String text;
 
 
 
 public String getText() {
 
 return text;
 
 }
 
 
 
 public void setText(String t) {
 
 this.text = t;
 
 }
 
 }
 
  
 
 Client:
 
 Service service = Service.create(SERVICE_NAME);
 
 service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING,
 ENDPOINT_ADDRESS);
 
 TestServiceInterface  serviceInterface  =
 service.getPort(TestServiceInterface.class);
 
 serviceInterface. testMethod(new MyClass());
 
  
 
 
 



Re: Problem generating WSDL from Java API with CXF 2.0.3

2008-02-26 Thread Glen Mazza
Phil, I updated the docs for both java2wsdl and java2ws, so others won't
have the same confusion.  Sorry this happened to you.

Glen

Am Dienstag, den 26.02.2008, 13:42 -0500 schrieb Daniel Kulp:
 On Tuesday 26 February 2008, Phil Weighill-Smith wrote:
  That's the sort of answer I was looking for. Thanks,
 
  Phil :n)
 
  PS: Was this an RTFM moment?!
 
 I wish I could say the answer was yes...  :-(
 
 I think most of our docs on the wiki at this point are more targetted 
 toward the 2.0.x toolset (since 2.0.x is released).  
 
 Dan
 
 
 
 
  - Original Message -
  From: Daniel Kulp [EMAIL PROTECTED]
  To: cxf-user@incubator.apache.org
  Cc: Phil Weighill-Smith [EMAIL PROTECTED]
  Sent: Tue, 26 Feb 2008 11:25:16 -0700 (MST)
  Subject: Re: Problem generating WSDL from Java API with CXF 2.0.3
 
  On Monday 25 February 2008, Phil Weighill-Smith wrote:
   Dan,
  
   The exception happened with just using command line access - with
   long class paths ;n)
  
   Yes, I think we were getting the tooling from a 2.0.1 JAR remnant.
   But I couldn't find the tooling in the 2.1 snap...?
 
  Which tooling?   The java2wsdl tool has been merged into the new
  java2ws tool which supports a bunch of new things.   If you just want
  the wsdl, pass the -wsdl flag.
 
  Dan
 
 
 



Re: MTOM attachments question

2008-02-23 Thread Glen Mazza
Really?  Our MTOM docs mention the expectedContentType attribution in
multiple places: http://cwiki.apache.org/CXF20DOC/mtom.html.  I wonder
if CXF could pass the TCK if it actually ignored it.

Glen

Am Samstag, den 23.02.2008, 12:33 -0500 schrieb Benson Margulies:
 2.0.4 doesn't know anything about xmime:expectedContentType, AFAIK. Do you
 have the @MTOM annotation in place to enable the threshold?
 
 On Fri, Feb 22, 2008 at 8:01 PM, Glen Mazza [EMAIL PROTECTED] wrote:
 
  Some possibilities:
 
  1.) From Step #5 of [1], make sure you have xmime:expectedContentTypes
  declared in your WSDL (you can see me using it under element
  name=getWeatherForecastResponse at the top).
 
  2.) From Step #6 of [1], make sure you use @BindingType annotation just
  before your web service implementation.
 
  3.)  Also, your address in your cxf.xml (/FileTransferWebService) may
  need to be a full URL as shown in our sample here[2].
 
  HTH,
  Glen
 
 
  [1] http://www.jroller.com/gmazza/date/20071102
  [2]
  http://cwiki.apache.org/confluence/display/CXF20DOC/MTOM#MTOM-ConfigFile
 
 
  Am Freitag, den 22.02.2008, 21:19 +0100 schrieb Eliú:
   Hi, i'm new with CXF and i'm trying to use MTOM attachments in my web
   services.
   I followed the Apache CXF 2.0 User's Guide and right now i can get a
  binary
   file from the server to my client using MTOM attachments.
   My problem is that i cannot send a file from the client to the server
  using
   MTOM. When I pass my JAXB class or the DataHandler
   as a parameter to the Web Service, it always goes base64Binary encoded
  in
   the request SOAP message.
   In the server side, i have this endpoint declaration:
  
   *jaxws:endpoint id=FileTransferWebService
   implementor=
   com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl
   address=/FileTransferWebService
   jaxws:properties
 entry key=mtom-enabled value=true/
   /jaxws:properties
   /jaxws:endpoint*
  
   and this is my JAXB bean:
  
   [EMAIL PROTECTED]
   public class BinaryFile {
  
   /**
* Contenido binario del archivo.
*/
   @XmlMimeType(application/octet-stream)
   private DataHandler imageData;
  
   /**
* @return el valor de imageData como InputStream
* @throws IOException en caso de error al obtener el
* InputStream a partir del DataHandler
*/
   public InputStream getInputStream() throws IOException {
   return imageData.getInputStream();
   }
  
   /**
* @param imageData el valor de imageData a establecer
*/
   public void setImageData(DataHandler imageData) {
   this.imageData = imageData;
   }
   }*
  
   When i call this service:
  
   *BinaryFile getOperationCodesFile(String filePath);*
  
   the file comes in the response SOAP as MTOM attachment, but when i call
  this
   other:
  
   *void updateOpCodesFileOnServer(BinaryFile file, Date updateDate);*
  
   the file goes in the request message inside the Envelope of the SOAP
  message
   encoded as a base64Binary.
   I need to know if i can send the file to the server as a MTOM attachment
   with CXF and annotations for JAXB beans.
   Thanks in advance.
  
   P.D.: I'm not a member of this mailing list, so i'll thank you if you
  copy
   your replay to this address. Thanks.
 
 



Re: Href attribute support in soap envelope body

2008-02-22 Thread Glen Mazza
Comments below...

Am Montag, den 18.02.2008, 11:57 +0100 schrieb pierre post:
 Hi all,
 
 I have a problem when calling an Apache CXF Web service (CXF version
 is 
 2.0.4) running under Apache Tomcat 6 from a Delphi client program.
 The 
 third parameter JobParamBean that I receive in my Web service on 
 Tomcat is always null but there is no exception or any other hint in
 the 
 Tomcat logs. The parameter is a simple JavaBean class (uses getters
 and 
 setters for all properties and implements serializable). Moreover,
 the 
 problem does not appear when calling the same Web service from a Java 
 client. This is my Web service:
 
 @WebService(name=JobService,
 targetNamespace=http://annuaire.ciss.lu;)
 @SOAPBinding(style=Style.RPC)
 public interface JobService {
@WebMethod(operationName=ExecuteJob)
@WebResult(name=JobParamsOut)
public String[] executeJob(@WebParam(name=JobName) String
 jobName,
@WebParam(name=JobParamsIn) String[] input,
@WebParam(name=JobParamBean) JobServiceParam param) throws 
 ServiceException;
 }
 
 When calling this web service from the Delphi application (using the 
 latest available HTTPRIO component and WSDL importer), the
 corresponding 
 generated SOAP request produces null as JobParamBean parameter:
 
 ?xml version=1.0?
 SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;
SOAP-ENV:Body
 
 SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:NS2=http://annuaire.ciss.lu;
NS1:ExecuteJob xmlns:NS1=http://annuaire.ciss.lu;
JobName xsi:type=xsd:stringTestFromDelphi/JobName
JobParamsIn xsi:type=SOAP-ENC:Array
SOAP-ENC:arrayType=xsd:string[2]
itemvalueDelphi1/item
itemvalueDelphi2/item
/JobParamsIn
JobParamBean href=#1 /
/NS1:ExecuteJob
NS2:JobServiceParamType id=1
xsi:type=NS2:JobServiceParamType
key xsi:type=xsd:stringparamkey/key
value xsi:type=xsd:stringparamval/value
/NS2:JobServiceParamType
/SOAP-ENV:Body
 /SOAP-ENV:Envelope
 
 I tried to call the same web service from Java (also using Apache CXF 
 2.0.4) and the generated SOAP request correctly creates a
 JobParamBean 
 instance:
 
 soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
soap:Body
ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu;
JobNameTestFromJava/JobName
JobParamsIn
itemvalueJava1/item
itemvalueJava2/item
/JobParamsIn
JobParamBean
keykeyJava/key
value
 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:ns3=http://www.w3.org/2001/XMLSchema; 
 xsi:type=ns3:int
1
/value
/JobParamBean
/ns1:ExecuteJob
/soap:Body
 /soap:Envelope
 
 I noticed that the Delphi SOAP request uses a reference for the third 
 parameter (href=#1) but the Java SOAP request does not. Is it possible 
 that CXF doesn't support this kind of references? 

Yes, quite possible.  I've never seen that href structure in a SOAP call
and doubt that it is JAX-WS compatible.


 Is there a workaround 
 in CXF to support the request or perhaps in Delphi to suppress the use 
 of the reference?

I would ask on the Delphi lists for this.  Delphi appears to be doing
something strange here.  I don't think Delphi's SOAP client call above
would work with the Glassfish Metro web service stack either.

Glen





Re: Tcpmon question

2008-02-22 Thread Glen Mazza

Am Freitag, den 22.02.2008, 10:35 -0800 schrieb yulinxp:
 It's easy to set up for local server http://localhost:8080/
 But if I want to see soap message between client  amazon service,
  http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl?
 How do I know which port the server is running on??
 
 

I believe that would be 80 by default.  

http://webservices.amazon.com = http://webservices.amazon.com:80

(Were it https://, it would be 443).

Glen



Re: client SSL question

2008-02-22 Thread Glen Mazza
Our client SSL documentation is here:  http://tinyurl.com/ytc77j.  Per
Oleson's blog article mentioned at the top of the page has a simple
working sample.

Glen

Am Freitag, den 22.02.2008, 13:25 -0800 schrieb yulinxp:
 CXF Client doesn't work for this example. I end up with using wsimport.
 
 Those generated codes are very similar to CXF client code, and it WORKS!!!
 
 Because the server use certificate from CA, I don't need to do anything for
 SSL.
 I still don't know how to do it in CXF Client, cause I can't even send out
 message.
 
 One thing we could use is HostnameVerifier.
 http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=8t=000801
 
 



Re: Tcpmon question

2008-02-22 Thread Glen Mazza
Am Freitag, den 22.02.2008, 13:19 -0800 schrieb yulinxp:
 Thanks. I was following your web-log 
 http://www.jroller.com/gmazza/entry/sun_s_wsmonitor_tool
 
 I save the wsdl file, and change soap:address from 
 soap:address
 location=http://soap.amazon.com/onca/soap?Service=AWSECommerceService/
 to
 soap:address
 location=http://localhost:4040/onca/soap?Service=AWSECommerceService/
 
 For tcpmon, I set the followings, and it works for tcpmon!!!
 local port:4040
 Server Name: soap.amazon.com
 Server port:80

 But similiar setting for wsmonitor doesn't work. 
 connection
 name=Amazon debugging
 description=4040-Amazon
 listenPort=4040
 targetHost=soap.amazon.com
 targetPort=80/
 
 

I'm not sure why not.  Wireshark is another option if you are not happy
with tcpmon: http://www.jroller.com/gmazza/entry/wireshark_usage_for_cxf

Glen



Re: MTOM attachments question

2008-02-22 Thread Glen Mazza
Some possibilities:

1.) From Step #5 of [1], make sure you have xmime:expectedContentTypes
declared in your WSDL (you can see me using it under element
name=getWeatherForecastResponse at the top).

2.) From Step #6 of [1], make sure you use @BindingType annotation just
before your web service implementation.

3.)  Also, your address in your cxf.xml (/FileTransferWebService) may
need to be a full URL as shown in our sample here[2].

HTH,
Glen


[1] http://www.jroller.com/gmazza/date/20071102
[2]
http://cwiki.apache.org/confluence/display/CXF20DOC/MTOM#MTOM-ConfigFile


Am Freitag, den 22.02.2008, 21:19 +0100 schrieb Eliú:
 Hi, i'm new with CXF and i'm trying to use MTOM attachments in my web
 services.
 I followed the Apache CXF 2.0 User's Guide and right now i can get a binary
 file from the server to my client using MTOM attachments.
 My problem is that i cannot send a file from the client to the server using
 MTOM. When I pass my JAXB class or the DataHandler
 as a parameter to the Web Service, it always goes base64Binary encoded in
 the request SOAP message.
 In the server side, i have this endpoint declaration:
 
 *jaxws:endpoint id=FileTransferWebService
 implementor=
 com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl
 address=/FileTransferWebService
 jaxws:properties
   entry key=mtom-enabled value=true/
 /jaxws:properties
 /jaxws:endpoint*
 
 and this is my JAXB bean:
 
 [EMAIL PROTECTED]
 public class BinaryFile {
 
 /**
  * Contenido binario del archivo.
  */
 @XmlMimeType(application/octet-stream)
 private DataHandler imageData;
 
 /**
  * @return el valor de imageData como InputStream
  * @throws IOException en caso de error al obtener el
  * InputStream a partir del DataHandler
  */
 public InputStream getInputStream() throws IOException {
 return imageData.getInputStream();
 }
 
 /**
  * @param imageData el valor de imageData a establecer
  */
 public void setImageData(DataHandler imageData) {
 this.imageData = imageData;
 }
 }*
 
 When i call this service:
 
 *BinaryFile getOperationCodesFile(String filePath);*
 
 the file comes in the response SOAP as MTOM attachment, but when i call this
 other:
 
 *void updateOpCodesFileOnServer(BinaryFile file, Date updateDate);*
 
 the file goes in the request message inside the Envelope of the SOAP message
 encoded as a base64Binary.
 I need to know if i can send the file to the server as a MTOM attachment
 with CXF and annotations for JAXB beans.
 Thanks in advance.
 
 P.D.: I'm not a member of this mailing list, so i'll thank you if you copy
 your replay to this address. Thanks.



Re: QUESTION: where is the class file -- org.apache.cxf.jms_greeter.JMSGreeterPortType -- to be found???

2008-02-20 Thread Glen Mazza
That class is most probably an autogenerated JAX-WS artifact.  If there
is a WSDL file in the sample, run wsdl2java[1] on it.  

Glen

[1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html

Am Dienstag, den 19.02.2008, 21:08 -0500 schrieb jw:
 Hi 
 
  
 
 I'm new to CXF and attempting to build the jms-queue example (found in the
 samples folder with the CXF distribution - in my case this example is
 located in the folder: C:\apache-cxf-2.0.4-incubator\samples\jms_queue).
 
  
 
 I cannot successfully build the file
 demo.jms_greeter.server.GreeterJMSImpl.java.
 
  
 
 This is because  there is an import for class
 org.apache.cxf.jms_greeter.JMSGreeterPortType which cannot be resolved.
 
  
 
 QUESTION:   where is the class file --
 org.apache.cxf.jms_greeter.JMSGreeterPortType  --  to be found???
 
  
 
 Its not clear whether the examples are outdated or whether there is another
 explanation. 
 
 (I cannot locate it in any of the jars in the CXF_HOME lib folder)
 
  
 
 Being new to the technology,  these sorts of issues make it difficult to get
 up to speed quickly with a tool that I would like to begin using
 productively.
 
  
 
 Thanks for any help solving this issue.
 
  
 
 jw
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 



Re: client code to access java_first_jaxws on tomcat

2008-02-19 Thread Glen Mazza
Here's a WSDL-first example I created:
http://www.jroller.com/gmazza/date/20071019

For just a pure client, of an already existing web service:
http://www.jroller.com/gmazza/date/20070929

HTH,
Glen

Am Dienstag, den 19.02.2008, 16:24 -0800 schrieb Daniel Lipofsky:
 I am trying to learn CXF, I have installed the java_first_jaxws
 sample on Tomcat 5.5 and can see the wsdl at
 http://localhost:8080/helloworld/services/hello_world?wsdl
 
 But what I don't understand is how I can run webservices
 against that server.  Does anyone have client code that will
 allow me to test?  I tried modifying Client.java like this:
 
 private static final QName SERVICE_NAME
 = new QName(http://server.hw.demo/;, HelloWorld);
 private static final QName PORT_NAME
 = new QName(http://server.hw.demo/;, HelloWorldPort);
 
 public static void main(String args[]) throws Exception {
 Service service = Service.create(SERVICE_NAME);
 String endpointAddress =
 http://localhost:8080/helloworld/services/hello_world?wsdl;;
 service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING,
 endpointAddress);
 HelloWorld hw = service.getPort(HelloWorld.class);
 System.out.println(hw.sayHi(World));
 }
 
 but all I got was
 
 org.apache.cxf.binding.soap.SoapFault:
 http://schemas.xmlsoap.org/wsdl/;,
 the namespace on the definitions element, is not a valid SOAP version.
 
 I tried a bunch of variations too with no success.
 How does one make this work?  (I'd also appreciate
 an example for wsdl_first_soap12 or any of the others)
 
 Thanks,
 Dan



Dynamically change interceptors in an interceptor chain?

2008-02-18 Thread Glen Mazza

Hello,

Can I program an interceptor in a web service's incoming interceptor chain
to dynamically route to another interceptor other than the one predefined in
its chain (and ignore all subsequent interceptors in the predefined chain)?

In other words, for an interceptor chain A-B-C-D, can I add business
logic in interceptor A for it to route to A-E-F-G instead?  In
particular, I would like to avoid it doing A-E-F-G-B-C-D if I can,
i.e., once I reroute, I don't want it to return to the other interceptors in
the predefined chain.

Thanks,
Glen

-- 
View this message in context: 
http://www.nabble.com/Dynamically-change-interceptors-in-an-interceptor-chain--tp15546687p15546687.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: access via deferent clients (.NET and ...)

2008-02-16 Thread Glen Mazza
Yes, but you will need to follow the WS-I Basic Profile more closely,
and of course test your services with .Net clients.  It would also
depend on the nature and complexity of your web services.  

Truth be told, I suspect GlassFish Metro i.e., Project Tango, would be a
safer bet if .NET clients are a heavy requirement and advanced usage of
the WS-* specifications are planned.  Sun Microsystems does frequent
compatibility testing with Microsoft.

Glen

Am Samstag, den 16.02.2008, 04:20 -0800 schrieb Mohammad Shamsi:
 hi all,
 
 im working on JEE (Spring 2.5)  projects.
 i have some web services to implement. but my web services clients may be
 implemented in deferent language like .NET.
 
 can i use CXF in this case ? is it possible to connect CXF web service with
 .NET clients ?
 
 



Re: Use java.io.serialization for databinding

2008-02-08 Thread Glen Mazza
Using DataHandler/MTOM?
http://www.jroller.com/gmazza/date/20071102

Glen

Am Donnerstag, den 07.02.2008, 14:34 +0100 schrieb
[EMAIL PROTECTED]:
 Hi,
 
 I'm developing a simple webservice which can take any object as input that 
 implements java.io.serializable and can return any of those:
 
 @WebService
 public interface SOAPService {
   Object call(Object parameter);
 }
 
 How can I tell cxf that it should transfer this parameter as simple 
 serializable attachement?
 
 Regards,
 Heinrich Wendel
 
 
 
 Deutsches Zentrum für Luft- und Raumfahrt e.V.
 in der Helmholtz-Gemeinschaft
 
 Simulation und Softwaretechnik (SISTEC)
 
 Heinrich Wendel
 
 Linder Höhe
 51147 Köln
 Telefon: 02203 601-3305
 E-Mail: mailto:[EMAIL PROTECTED]
 Internet: http://www.dlr.de
 



Re: Ensuring CXF soap is behind SSL

2008-02-05 Thread Glen Mazza
I believe that can be enforced in the web.xml file that you distribute
your WAR with.  For example, (another web app unrelated to web
services), line 41-51 of web.xml:  http://tinyurl.com/yp6faz

Glen


Am Dienstag, den 05.02.2008, 12:44 -0500 schrieb [EMAIL PROTECTED]:
 I want to make sure any messages not encrypted with SSL are rejected by the 
 CXF container. What configuration is neccessary for this?
 
 I've tried setting the location to an https address but this is unsufficient. 
 The only documentation I've found on the subject refers to client, not 
 server, configuration.
 
 ? wsdl:service name=HelloWorldService
 ??? wsdl:port binding=impl:HelloWorldServiceSoapBinding 
 name=HelloWorldService
 ? wsdlsoap:address location=https://localhost:8080/HelloWorldService/
 ??? /wsdl:port
 ? /wsdl:service
 
 Thanks!
 
 
 
 
 More new features than ever.  Check out the new AOL Mail ! - 
 http://webmail.aol.com



Re: Problem having multiple interceptors of the same type on the interceptor chain?

2008-02-05 Thread Glen Mazza
PhaseInterceptorChain[1] has add methods (lines 155 and 169) with a
force parameter, that, if true, will apparently force the interceptor
to be added to the chain (lines 475-496), even if there is another
interceptor with the same name.

I guess if you subclass PIC and just override the add() methods at line
151 and 165 to set a force value of true instead of false, that
would work.  However, this force method is apparently highly
infrequently used so I don't know how well tested out it is.  Another
issue is how to get CXF to use this subclass of PhaseInterceptorChain
instead of PIC itself.  Anyone know this?

Unless I'm missing something, it really looks like this needs to be made
more user-friendly.

Regards,
Glen

[1] http://tinyurl.com/ytxfzk


Am Dienstag, den 05.02.2008, 15:25 -0800 schrieb Aaron Pieper:
 We have a homebrew CXF interceptor which extends AbstractSoapInterceptor.
 It's a generic XSLT interceptor which runs the input through a specified
 XSLT. We use two of them in our interceptor chain, configuring them with
 different XSLTs. However, CXF ignores the second interceptor. It seems like
 since AbstractPhaseInterceptor uses the class name for its ID, the second
 interceptor is assumed to be a duplicate of the first.
 
 The simplest workaround is to create an additional interceptor class for
 each XSLT with different names, XsltInterceptorKludge2.java and
 XsltInterceptorKludge3.java.
 
 A more complex workaround is to have our interceptor class have a static
 counter which increments with each created instance.
 
 Is this intended behavior of AbstractPhaseInterceptor? It seems unusual to
 assume that implementors will only want to have one instance of a given
 interceptor in the interceptor chain.



Message.getContent(???) options for interceptors

2008-01-28 Thread Glen Mazza
Hello,

I have a question about the org.apache.cxf.message.Message.getContent(?)
method within interceptors.

The CXF sample interceptor[1] on line 49 has this call to get the
content (payload) of the SOAP message:

OutputStream os = message.getContent(OutputStream.class);

Question: Besides OutputStream.class, what other options do I have as
the argument to getContent() for a message that comes from an
interceptor's handleMessage(Message m) or handleFault(Message m)?

(Also, does anyone know where in the CXF source code that list of
acceptable classes is defined?  Understanding the source may help me
here.)

Thanks,
Glen

[1] http://tinyurl.com/yqz58p



2.0.2 to 2.0.3 causes NoClassDefFoundError: ExtensionDeserializer

2008-01-24 Thread Glen Mazza

Hello All,

As a result of upgrading from CXF 2.0.2 to 2.0.3, a test is failing because
the below class could not be found.
I'm using Maven for builds and tests, and am *not* bringing in every
possible CXF dependency as defined here[1].

java.lang.NoClassDefFoundError:
org/apache/ws/commons/schema/extensions/ExtensionDeserializer

Question:  Does anyone know what dependency am I missing, such that this
class can be found in 2.0.2 but *not* in 2.0.3?  (Alternatively, it is
possible that this class is never used in 2.0.2, hence why it works with
that version.)

Thanks,
Glen

[1]
http://cwiki.apache.org/CXF20DOC/building-your-cxf-project-with-maven.html

-- 
View this message in context: 
http://www.nabble.com/2.0.2-to-2.0.3-causes-NoClassDefFoundError%3A-ExtensionDeserializer-tp15069327p15069327.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: 2.0.2 to 2.0.3 causes NoClassDefFoundError: ExtensionDeserializer

2008-01-24 Thread Glen Mazza

Oops, forgot to mention, this is the exception that caused the class missing
error:

org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.jaxws.EndpointImpl]: Constructor threw exception;
nested exception is java.lang.NoClassDefFoundError:
org/apache/ws/commons/schema/extensions/ExtensionDeserializer

Glen


Glen Mazza wrote:
 
 Hello All,
 
 As a result of upgrading from CXF 2.0.2 to 2.0.3, a test is failing
 because the below class could not be found.
 I'm using Maven for builds and tests, and am *not* bringing in every
 possible CXF dependency as defined here[1].
 
 java.lang.NoClassDefFoundError:
 org/apache/ws/commons/schema/extensions/ExtensionDeserializer
 
 Question:  Does anyone know what dependency am I missing, such that this
 class can be found in 2.0.2 but *not* in 2.0.3?  (Alternatively, it is
 possible that this class is never used in 2.0.2, hence why it works with
 that version.)
 
 Thanks,
 Glen
 
 [1]
 http://cwiki.apache.org/CXF20DOC/building-your-cxf-project-with-maven.html
 
 

-- 
View this message in context: 
http://www.nabble.com/2.0.2-to-2.0.3-causes-NoClassDefFoundError%3A-ExtensionDeserializer-tp15069327p15069348.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WSDL retrieval at runtime, is it required?

2008-01-18 Thread Glen Mazza

Am Freitag, den 18.01.2008, 10:49 -0500 schrieb Yadav, Yogendra (IT):
 Hi,
 I have already used wsdl2java -client to generate client code to
 access a CXF service. The WSDL that I provided does include service
 endpoint information. I see that, now at runtime the client code tries
 to retrieve the WSDL again (see the stacktrace below), why? Does it only
 do it to extract the service location information? Why didn't the
 generated code cache location information? Is there anyway to avoid it?
 

http://blogs.sun.com/arungupta/entry/totd_16_optimizing_metro_stubs?

Glen





Maven dependency problem upgrading from CXF 2.0.2 to 2.0.3

2008-01-17 Thread Glen Mazza

Hello, 

I'm having difficulty upgrading from CXF 2.0.2 to CXF 2.0.3 using Mavenized
builds.  With CXF 2.0.3 (not 2.0.2), Maven keeps trying to download
nonexistent versions of jars (in particular, Version 1.0 of cxf-api and
cxf-rt-core, neither of which have 1.0 versions anywhere) and fails because
it cannot find them.  As you can see below, running mvn clean install with
the debug (-X) option seems to show that cxf-rt-transports-http-jetty is the
culprit: it is resolving its dependencies to the invalid 1.0 versions while
cxf-rt-frontend-jaxws is requesting the normal, available, 2.0.3 versions.

[DEBUG]  
org.apache.cxf:cxf-rt-transports-http-jetty:jar:2.0.3-incubator:compile
(selected for compile)
--[DEBUG] org.apache.cxf:cxf-api:jar:1.0:compile (selected for compile)
[DEBUG] org.apache.cxf:cxf-rt-transports-http:jar:1.0:compile (applying
version: 2.0.3-incubator)
[DEBUG]
org.apache.cxf:cxf-rt-transports-http:jar:2.0.3-incubator:compile (selected
for compile)
--[DEBUG]   org.apache.cxf:cxf-rt-core:jar:1.0:compile (selected for
compile)
[DEBUG] org.apache.cxf:cxf-rt-core:jar:1.0:compile (selected for
compile)
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.5:compile (selected for compile)
[DEBUG]   org.mortbay.jetty:jetty-util:jar:6.1.5:compile (selected for
compile)
[DEBUG]
org.apache.geronimo.specs:geronimo-servlet_2.5_spec:jar:1.1-M1:compile
(selected for compile)
[DEBUG]   commons-lang:commons-lang:jar:2.3:compile (selected for compile)
[DEBUG]   org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.0.3-incubator:compile
(selected for compile)
[DEBUG] javax.xml.ws:jaxws-api:jar:2.0:compile (selected for compile)
--[DEBUG] org.apache.cxf:cxf-api:jar:2.0.3-incubator:compile (removed -
nearer found: 1.0)
--[DEBUG] org.apache.cxf:cxf-rt-core:jar:2.0.3-incubator:compile
(removed - nearer found: 1.0)
[DEBUG] org.apache.cxf:cxf-rt-bindings-soap:jar:2.0.3-incubator:compile
(selected for compile)
[DEBUG]   org.apache.cxf:cxf-api:jar:2.0.3-incubator:compile (removed -
nearer found: 1.0)
[DEBUG]   org.apache.cxf:cxf-tools-common:jar:2.0.3-incubator:compile
(selected for compile)
[DEBUG] velocity:velocity:jar:1.4:compile (selected for compile)
[DEBUG]   velocity:velocity-dep:jar:1.4:runtime (selected for
runtime)

I'm still somewhat early in my troubleshooting, I'm going to simplify the
pom files next to the bare minimum that reproduces this error.  In the
meantime, though, has anyone seen this error before?  I am hoping that
someone would know what might cause this to save me troubleshooting time.

Also, when does one need the cxf-rt-transports-http-jetty dependency?  Is
it a requirement for Jetty use--we are using Jetty so I cannot remove this
dependency (which might indirectly fix this problem) if Jetty requires it. 
I might be able to pull it out of compilation scope, however.

Thanks,
Glen

-- 
View this message in context: 
http://www.nabble.com/Maven-dependency-problem-upgrading-from-CXF-2.0.2-to-2.0.3-tp14921161p14921161.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Maven dependency problem upgrading from CXF 2.0.2 to 2.0.3

2008-01-17 Thread Glen Mazza

No, Windows XP Professional, SP2.


dkulp wrote:
 
 
 Geln,
 
 You aren't, by any chance, on a Mac?  Are you?
 
 Dan
 
 
 On Thursday 17 January 2008, Glen Mazza wrote:
 Hello,

 I'm having difficulty upgrading from CXF 2.0.2 to CXF 2.0.3 using
 Mavenized builds.  With CXF 2.0.3 (not 2.0.2), Maven keeps trying to
 download nonexistent versions of jars (in particular, Version 1.0 of
 cxf-api and cxf-rt-core, neither of which have 1.0 versions anywhere)
 and fails because it cannot find them.  As you can see below, running
 mvn clean install with the debug (-X) option seems to show that
 cxf-rt-transports-http-jetty is the culprit: it is resolving its
 dependencies to the invalid 1.0 versions while cxf-rt-frontend-jaxws
 is requesting the normal, available, 2.0.3 versions.

 [DEBUG]
 org.apache.cxf:cxf-rt-transports-http-jetty:jar:2.0.3-incubator:compil
e (selected for compile)
 --[DEBUG] org.apache.cxf:cxf-api:jar:1.0:compile (selected for
 compile) [DEBUG]
 org.apache.cxf:cxf-rt-transports-http:jar:1.0:compile (applying
 version: 2.0.3-incubator)
 [DEBUG]
 org.apache.cxf:cxf-rt-transports-http:jar:2.0.3-incubator:compile
 (selected for compile)
 --[DEBUG]   org.apache.cxf:cxf-rt-core:jar:1.0:compile (selected
 for compile)
 [DEBUG] org.apache.cxf:cxf-rt-core:jar:1.0:compile (selected for
 compile)
 [DEBUG] org.mortbay.jetty:jetty:jar:6.1.5:compile (selected for
 compile) [DEBUG]   org.mortbay.jetty:jetty-util:jar:6.1.5:compile
 (selected for compile)
 [DEBUG]
 org.apache.geronimo.specs:geronimo-servlet_2.5_spec:jar:1.1-M1:compile
 (selected for compile)
 [DEBUG]   commons-lang:commons-lang:jar:2.3:compile (selected for
 compile) [DEBUG]  
 org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.0.3-incubator:compile
 (selected for compile)
 [DEBUG] javax.xml.ws:jaxws-api:jar:2.0:compile (selected for
 compile) --[DEBUG]
 org.apache.cxf:cxf-api:jar:2.0.3-incubator:compile (removed - nearer
 found: 1.0)
 --[DEBUG] org.apache.cxf:cxf-rt-core:jar:2.0.3-incubator:compile
 (removed - nearer found: 1.0)
 [DEBUG]
 org.apache.cxf:cxf-rt-bindings-soap:jar:2.0.3-incubator:compile
 (selected for compile)
 [DEBUG]   org.apache.cxf:cxf-api:jar:2.0.3-incubator:compile
 (removed - nearer found: 1.0)
 [DEBUG]  
 org.apache.cxf:cxf-tools-common:jar:2.0.3-incubator:compile (selected
 for compile)
 [DEBUG] velocity:velocity:jar:1.4:compile (selected for
 compile) [DEBUG]   velocity:velocity-dep:jar:1.4:runtime
 (selected for runtime)

 I'm still somewhat early in my troubleshooting, I'm going to simplify
 the pom files next to the bare minimum that reproduces this error.  In
 the meantime, though, has anyone seen this error before?  I am hoping
 that someone would know what might cause this to save me
 troubleshooting time.

 Also, when does one need the cxf-rt-transports-http-jetty
 dependency?  Is it a requirement for Jetty use--we are using Jetty so
 I cannot remove this dependency (which might indirectly fix this
 problem) if Jetty requires it. I might be able to pull it out of
 compilation scope, however.

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

-- 
View this message in context: 
http://www.nabble.com/Maven-dependency-problem-upgrading-from-CXF-2.0.2-to-2.0.3-tp14921161p14921863.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Maven dependency problem upgrading from CXF 2.0.2 to 2.0.3

2008-01-17 Thread Glen Mazza

Thanks for the help Dan.  I think I'm getting a solution--I just need to
explicitly state the version of cxf-api and cxf-runtime-core that I need in
the DependencyManagement/ section, rather than rely on Maven's default
dependency resolution.  Another option that seems to work is using
dependency exclusion filters; i.e. placing exclusions on the two cxf
artifacts wrongfully trying to bring in nonexistent 1.0 jars. Because other
cxf artifacts are correctly bringing in 2.0.3 versions of the above, those
two artifacts end up using the correct 2.0.3 versions.  Still testing so
far.  BTW, a few more questions:


dkulp wrote:
 
 Hmm... OK  Not sure what to say then although it's probably the same 
 issue as ServiceMix had on the Mac.  
 
 There is a bug in Maven where system properties can overwrite and affect 
 anything that uses ${project.version} and/or ${pom.version} like we 
 do.

Questions:

1.) Do you know if the Maven team is aware of this problem--is it in their
JIRA?

2.) Any reason why this might not be occurring with CXF 2.0.2?  Or did the
ServiceMix
problem also occur with CXF 2.0.2?  



dkulp wrote:
 
 The issue is that some XML parsers or processor (like the one 
 built into the OSX jvm) has a tendency to set a version system 
 property which messes that up.Thus, any plugin that does XML 
 processing at all can cause major issues.   Unfortunately, our wsdl2java 
 plugin does XML processing.
 

3.) I'm probably exposing my Maven noviceness here, but can CXF be changed
to stop using ${project.version} and ${pom.version} internally then to avoid
this error?  If I understand you correctly, as long as CXF avoids these
properties, the problem goes away, correct?

Thanks,
Glen

-- 
View this message in context: 
http://www.nabble.com/Maven-dependency-problem-upgrading-from-CXF-2.0.2-to-2.0.3-tp14921161p14929951.html
Sent from the cxf-user mailing list archive at Nabble.com.



Strange Maven dependency

2008-01-16 Thread Glen Mazza

Hello, at work I'm having slight difficulties in upgrading from CXF 2.0.2 to
2.0.3.  I'm noticing a strange CXF dependency in one of our pom.xml files:

dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-bindings-http/artifactId
version2.0.3-incubator/version
/dependency

I cannot find this dependency on the CXF Maven page[1], and googling is
inconclusive as to whether or not this dependency actually exists.

Is cxf-rt-bindings-http a legitimate Maven dependency?

Thanks,
Glen

[1]
http://cwiki.apache.org/CXF20DOC/building-your-cxf-project-with-maven.html
-- 
View this message in context: 
http://www.nabble.com/Strange-Maven-dependency-tp14887057p14887057.html
Sent from the cxf-user mailing list archive at Nabble.com.



Getting the total size of a DataHandler-type Request Parameter

2008-01-11 Thread Glen Mazza

Hello,

This question is hard for me to phrase exactly, but for a SOAP request which
contains an input parameter which is resolved as a DataHandler by JAX-WS, is
there a way to determine the total size in bytes of that DataHandler object? 
Can I rely on any HTTP headers for that information?

I'm trying to insert the DataHandler-based object into a CLOB column in an
Oracle database table.  AFAICT inserting CLOBs requires a length parameter,
which I don't know because the DataHandler object is resolved as a sizeless
InputStream in the service's Java code.  This forces us to serialize the
InputStream into a file first so I can determine its length, prior to
inserting into Oracle.  It is this serialization part I'd like to remove if
I can.

Content-Length might be a possibility, but that would take into account the
message as a whole, also, I think with MTOM chunking/multiple sends occurs
so the value of C-L wouldn't necessarily map to the size of the DataHandler
object.   Overall, I'd just like to confirm here that there is nothing much
I can accurately rely on within JAX-WS to get the DataHandler size.

Thanks,
Glen

-- 
View this message in context: 
http://www.nabble.com/Getting-the-total-size-of-a-DataHandler-type-Request-Parameter-tp14760716p14760716.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to deploy a CXF WAR file onto JBoss 4.0.5

2008-01-10 Thread Glen Mazza

Am Donnerstag, den 10.01.2008, 05:14 -0800 schrieb Landslide:
 Glen,
 
 I understand that I am facing a challenging problem of class loaders and
 class loading sequence, specifically for JBoss. As you can see, my CXF WAR
 has everything it needs to run as I have included ALL jars from CXF lib
 folder in its WEB-INF\lib.
 
 My case is a very simple HelloWorld CXF WAR (the sample from Release 2.0.3)
 onto JBoss 4.0.5 GA (directly unzipped from JBoss download without adding
 any additional jar). In other words, it would be very easy for you or anyone
 else to reproduce the errors.

Not really...I don't know much about JBoss, I've never installed it.  I
would be doing the same guesswork as you in trying to fix the problem,
and app server debugging generally falls outside the scope of a
volunteer committer.  

I do know from experience that there are frequently initial classpath
headaches when moving to a new application server.  Activating classpath
loading logging (assuming JBoss has it, like Oracle App Server does)
might help.  IIRC, also JBoss *might* be having a problem with the
geronimo*.jar files there--I'm not really sure if that's it though.

I would check the JBoss forums--search for CXF--and see if anyone's had
any problems or solutions.  Glassfish Metro is another option if you
continue to have absolutely no luck with CXF on JBoss.

Sorry,
Glen

PS:  If you do find a solution, please respond back so it will be stored
in the email archives, to help others in the future.





Re: Use Tomcat

2008-01-10 Thread Glen Mazza
Note #4 here may also help clarify things for you:
http://www.jroller.com/gmazza/date/200710#notes

HTH,
Glen

Am Donnerstag, den 10.01.2008, 23:29 + schrieb Ian Roberts:
 Pawel Janusz wrote:
  I want to use this one but not working :(
  
  jaxws:endpoint id=MyServiceService
   implementor=#MyServiceServiceImpl
 address=/MyService/
 
 This form works fine for me in Tomcat.  Remember that the address is 
 relative to the CXFServlet mapping in your webapp.  So with the 
 following in the web.xml for my-webapp:
 
servlet-mapping
  servlet-nameCXFServlet/servlet-name
  url-pattern/services/*/url-pattern
/servlet-mapping
 
 the service appears at http://localhost:8080/my-webapp/services/MyService
 
 If you really want it at the top level (http://localhost:8080/MyService) 
 you'd have to put CXF in the ROOT webapp and map it to a url-pattern of /*
 
 Ian
 



Re: How to deploy a CXF WAR file onto JBoss 4.0.5

2008-01-09 Thread Glen Mazza
There are periodically headaches involved in getting CXF to work with
JBoss, primarily classpath issues I believe.  Perhaps searching our
archives[1] can be of help for you.

Glen

[1]
http://www.nabble.com/forum/Search.jtp?forum=16914local=yquery=jboss

Am Mittwoch, den 09.01.2008, 10:50 -0500 schrieb Xiangmin Li:

 What do I have to do in order to run a CXF Web application on a JBoss
 server instance? Please help.
 
 Thanks!
 



Re: about sample ws_addressing

2008-01-08 Thread Glen Mazza
I deleted it.

Glen

Am Dienstag, den 08.01.2008, 10:15 + schrieb Eoghan Glynn:
 Glen is correct, the handler_chain.xml is obsolete and should be deleted.
 
 The handler_chain.xml is a throw-back to an earlier version of the 
 ws_addressing demo which used an JAX-WS handler 
 (demo.ws_addressing.common.HeaderSnooper) to display the WS-Addressing 
 headers to stdout.
 
 However, I later simplified the demo to just use WS-A logging for the 
 same illustrative purpose.
 
 Hence the HeaderSnooper handler was deleted as it was no longer required 
 by the demo, and the handler_chain.xml should have been deleted at the 
 same time for completeness. So the fact that it still exists is a simple 
 over-sight.
 
 Cheers,
 Eoghan
 
 
 Glen Mazza wrote:
  Resending...
  
  Am Montag, den 07.01.2008, 11:37 -0800 schrieb YI (William) ZHU: 
  Hi there,
 
  I'm studying the sample ws_addressing of CXF2.0.2.
 
  I have two questions about the configure file handler_chain.xml:
 
  1) where is the Java file for demo.ws_addressing.common.HeaderSnooper
  class?
  I have searched the whole samples, but can not find it;
 
  
  Technically it is here:
  http://svn.apache.org/viewvc?view=revrevision=480071
  
  But it apparently was deleted in 2006 because it is no longer needed for
  WS-Addressing.
  
  
  2) when this file handler_chain.xml is used?
 
  
  I don't think it is used at all anymore.  If no one else thinks it is in
  use, I will delete it soon.  Sorry for any confusion.
  
  Glen
  
  
  Please help answer this question!
 
  Thanks,
  YI ZHU
 
 
 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland



Re: How to set Soap version on client side

2008-01-08 Thread Glen Mazza
http://markmail.org/message/b7w4vugla43nmj7p?


Am Dienstag, den 08.01.2008, 12:43 -0800 schrieb yulinxp:
 For my client, I look into the src to find out the setting for SOAP1.2.  I
 don't know whether there's a better way.
 
 bean id=client class=demo.spring.HelloWorld 
   factory-bean=clientFactory factory-method=create/
 
   bean id=clientFactory
 class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
 property name=serviceClass value=demo.spring.HelloWorld/
 property name=address
 value=http://localhost:80/spring_http/ws/ServerEndPoint/
   
!-- javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING --
 property name=bindingId
 value=http://www.w3.org/2003/05/soap/bindings/HTTP//
   
   /bean
 
 -
 
 
 Dušan Mamrilla wrote:
  
  Look here for setting soap 1.2 on endpoint:
  http://www.nabble.com/SOAP-1.2-spring-config-to12494148.html#a12497388
  
  DM
  
  2008/1/8, yulinxp [EMAIL PROTECTED]:
 
 
  Thanks! I will definitly give it a try.
  Now I need to solve some problem to even generate soap1.2 wsdl file first
  :(
 
 
 
  Well, I use following configuration (example)
 
  beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:jaxws=http://cxf.apache.org/jaxws;
  xmlns:soap=http://cxf.apache.org/bindings/soap;
  xsi:schemaLocation=http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://cxf.apache.org/jaxws
  http://cxf.apache.org/schemas/jaxws.xsd
  http://cxf.apache.org/bindings/soap
  http://cxf.apache.org/schemas/configuration/soap.xsd;
 
  import resource=classpath:META-INF/cxf/cxf.xml /
  import resource=classpath:META-INF/cxf/cxf-extension-http.xml /
  import resource=classpath:META-INF/cxf/cxf-extension-soap.xml /
  import resource=classpath:META-INF/cxf/cxf-servlet.xml /
 
  jaxws:client id=spring_id serviceClass=some.service.class
  address=some_service_address
  jaxws:binding
  soap:soapBinding version=1.2/
  /jaxws:binding
  /jaxws:client
  /beans
 
  DM
 
 
  --
  View this message in context:
  http://www.nabble.com/How-to-set-Soap-version-on-client-side-tp14692146p14694295.html
  Sent from the cxf-user mailing list archive at Nabble.com.
 
 
  
  
 



Re: about sample ws_addressing

2008-01-07 Thread Glen Mazza
Resending...

Am Montag, den 07.01.2008, 11:37 -0800 schrieb YI (William) ZHU: 
 Hi there,
 
 I'm studying the sample ws_addressing of CXF2.0.2.
 
 I have two questions about the configure file handler_chain.xml:
 
 1) where is the Java file for demo.ws_addressing.common.HeaderSnooper
 class?
 I have searched the whole samples, but can not find it;
 

Technically it is here:
http://svn.apache.org/viewvc?view=revrevision=480071

But it apparently was deleted in 2006 because it is no longer needed for
WS-Addressing.


 2) when this file handler_chain.xml is used?
 

I don't think it is used at all anymore.  If no one else thinks it is in
use, I will delete it soon.  Sorry for any confusion.

Glen


 Please help answer this question!
 
 Thanks,
 YI ZHU
 



Re: Generated code returns java.lang.Object instead of void

2008-01-07 Thread Glen Mazza
There are rather convoluted rules in the JAX-WS specification of when
bare vs. wrapped mode is used (and one of the committers recently found
a difference between the spec and both our and Metro's implementation.)
Still, working with Objects is still quite doable; see here [1], Step #7
for sample client code that works with it.

HTH,
Glen

[1] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1

Am Montag, den 07.01.2008, 16:00 -0800 schrieb mattrpav:
 I used wsd2java to generate a web service, and the generated code returns
 java.lang.Object instead of void.  Comparing my WSDL to the wsdl_first
 example, I do not see much difference.
 
 Is there a wsdl2java or binding parameter I am missing?
 
 CXF 2.0.2 (From Servicemix 3.2.1)
 WSDL attached.
 
 Thanks,
 Matt Pavlovich
 
 http://www.nabble.com/file/p14679268/SimpleWS.wsdl SimpleWS.wsdl 



Re: WS-Addressing OutOfMemoryErrors under load

2008-01-05 Thread Glen Mazza

Am Freitag, den 04.01.2008, 18:19 -0800 schrieb Kyle Sampson:
 I'm currently using CXF 2.0.3.  While playing around with WS-Addressing, I've
 noticed a number of errors that occur when sending lots of messages.  

Here, lots of messages = messages being sent in a while(true) loop

 I've
 been able to reproduce them by making minor changes to the ws_addressing
 sample provided with CXF.
 
 During these tests, I turned off logging for anything less than WARNING.  In
 Client.java, I changed the following lines:
 
 implicitPropagation(port);
 explicitPropagation(port);
 implicitPropagation(port);
 
 to the following:
 
 int i = 0;
 while(true) {
   port.greetMeOneWay(Kyle);
   i++;
   if(i % 10 == 0) {
   System.out.println(Sent  + i +  messages.);
   }
 }
 

Is there a SOAP client from any web service stack (Metro? Axis?
Spring-WS?) that *could* support nonstop web service calls at the rate
of a while(true) loop?  Had CXF failed on your hardware at 7600 or
76,000 attempts instead of just 760, would you also be sending this
email noting a problem, or would that have been within acceptable bounds
of failure?

I'm not sure the problem you're reporting is:
1.) Given our hardware, and CXF's architecture, CXF failed far too soon
within a while(true) loop; i.e., tests with Axis or Metro gave a far
greater number of calls before failing.  That would be a legitimate
concern for us to look into.

or

2.) CXF's client and server failed at *anytime* during a while(true)
loop of web service calls--i.e., you'd be sending this email if CXF
clients had failed at iteration 760,000.  In this case, before I can be
convinced this is an error, I would first need to see Axis or Metro
clients be able to handle such while(true) rate calls indefinitely.


 After calling greetMeOneWay() around 760 times in this way, I get an
 OutOfMemoryError.  I profiled the client and server using YourKit, and both
 the client and server seem to have a memory leak -- the client runs out of
 memory first.  The problem seems to be MAPCodec.uncorrelatedExchanges map --
 it's using nearly all the heap memory available.
 

Is that necessarily *leaking*, or just the saving of state for each of
the hundreds of requests waiting for a response?

Regards,
Glen




Location of JAX-WS Handler configuration file

2008-01-05 Thread Glen Mazza
Hello,

The handlerChain annotation[1] on an SEI implementation class has a
file member-value that indicates the location of the JAX-WS handler
configuration file (here[2] for example) relative to the SEI
implementation containing this annotation.

I'm not certain if this relative location refers to the config file's
location at *compile* time with respect to the Java source file, or the
config file's location at *run-time* (after the source file is compiled
into bytecode).  

If at compile time, a file='handler.xml' value for the HandlerChain
annotation would indicate that the file needs to be in the same
directory as the java source file.  If at run time, a file=handler.xml
value would indicate that the file needs to be at the root of the
classpath (for a deployed webapp containing the service, at the root of
the WEB-INF/classes directory.)  Which is it?  The heart of this
question is when the config file gets read--at compilation time or at
run time.

Thanks,
Glen

[1] https://jax-ws.dev.java.net/nonav/2.1.3/docs/annotations.html#2.6%
20javax.jws.HandlerChain%7Coutline

[2]
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jaxws_handlers/src/demo/handlers/common/demo_handlers.xml?revision=566980view=markup





Re: Location of JAX-WS Handler configuration file

2008-01-05 Thread Glen Mazza
OK, through trial and error I was able to answer my own question.

GlassFish Metro:  The JAX-WS handler chain configuration file can either
be placed in the same folder as the bytecode of the SEI implementation
that references it, or as a regular resource file in the classpath
(i.e., for a web app, WEB-INF/classes/handlers.xml.)  I suspect the
latter is preferable, as a Mavenized webapp allows you to place such
resource files within the src/main/resources directory, for Maven to
subsequently place in the classpath for you when you run mvn war:war.

CXF: Unfortunately, the config file can only be placed within the same
directory as the bytecode for the SEI implementation class.  It cannot
read the file as a normal resource in WEB-INF/classes.  I think this is
a bug--I'll submit a JIRA for it.

Thanks,
Glen

Am Samstag, den 05.01.2008, 09:33 -0500 schrieb Glen Mazza:
 Hello,
 
 The handlerChain annotation[1] on an SEI implementation class has a
 file member-value that indicates the location of the JAX-WS handler
 configuration file (here[2] for example) relative to the SEI
 implementation containing this annotation.
 
 I'm not certain if this relative location refers to the config file's
 location at *compile* time with respect to the Java source file, or the
 config file's location at *run-time* (after the source file is compiled
 into bytecode).  
 
 If at compile time, a file='handler.xml' value for the HandlerChain
 annotation would indicate that the file needs to be in the same
 directory as the java source file.  If at run time, a file=handler.xml
 value would indicate that the file needs to be at the root of the
 classpath (for a deployed webapp containing the service, at the root of
 the WEB-INF/classes directory.)  Which is it?  The heart of this
 question is when the config file gets read--at compilation time or at
 run time.
 
 Thanks,
 Glen
 
 [1] https://jax-ws.dev.java.net/nonav/2.1.3/docs/annotations.html#2.6%
 20javax.jws.HandlerChain%7Coutline
 
 [2]
 http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jaxws_handlers/src/demo/handlers/common/demo_handlers.xml?revision=566980view=markup
 
 



Re: Location of JAX-WS Handler configuration file

2008-01-05 Thread Glen Mazza
This may actually not be a CXF bug after all.  JSR-181, Version 2.0,
Section 4.6.1 appears to indicate that the configuration file is
referenced with respect to the source or compiled class file, not the
classpath in general.  I don't like this rule but that's the rule.

Metro will try to resolve with respect to either the compiled SEI or the
classpath[3], but that can be considered riskier/less robust, because if
the config file is accidentally placed in both locations but updated
only in one, Metro could still be following the older Handler chain
rules of the other file.

I guess I'm neutral on CXF adopting Metro's philosophy here.  I can see
either way.

Glen

[3] https://jax-ws.dev.java.net/nonav/2.1.3/docs/handlers.html, quote:
When packaging the service, the handlers.xml file must be in the
classpath within the WAR file, either directly under WEB-INF/classes or
further down in the same package as the service class file.


Am Samstag, den 05.01.2008, 12:24 -0500 schrieb Glen Mazza:
 OK, through trial and error I was able to answer my own question.
 
 GlassFish Metro:  The JAX-WS handler chain configuration file can either
 be placed in the same folder as the bytecode of the SEI implementation
 that references it, or as a regular resource file in the classpath
 (i.e., for a web app, WEB-INF/classes/handlers.xml.)  I suspect the
 latter is preferable, as a Mavenized webapp allows you to place such
 resource files within the src/main/resources directory, for Maven to
 subsequently place in the classpath for you when you run mvn war:war.
 
 CXF: Unfortunately, the config file can only be placed within the same
 directory as the bytecode for the SEI implementation class.  It cannot
 read the file as a normal resource in WEB-INF/classes.  I think this is
 a bug--I'll submit a JIRA for it.
 
 Thanks,
 Glen
 
 Am Samstag, den 05.01.2008, 09:33 -0500 schrieb Glen Mazza:
  Hello,
  
  The handlerChain annotation[1] on an SEI implementation class has a
  file member-value that indicates the location of the JAX-WS handler
  configuration file (here[2] for example) relative to the SEI
  implementation containing this annotation.
  
  I'm not certain if this relative location refers to the config file's
  location at *compile* time with respect to the Java source file, or the
  config file's location at *run-time* (after the source file is compiled
  into bytecode).  
  
  If at compile time, a file='handler.xml' value for the HandlerChain
  annotation would indicate that the file needs to be in the same
  directory as the java source file.  If at run time, a file=handler.xml
  value would indicate that the file needs to be at the root of the
  classpath (for a deployed webapp containing the service, at the root of
  the WEB-INF/classes directory.)  Which is it?  The heart of this
  question is when the config file gets read--at compilation time or at
  run time.
  
  Thanks,
  Glen
  
  [1] https://jax-ws.dev.java.net/nonav/2.1.3/docs/annotations.html#2.6%
  20javax.jws.HandlerChain%7Coutline
  
  [2]
  http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/jaxws_handlers/src/demo/handlers/common/demo_handlers.xml?revision=566980view=markup
  
  



Re: Multiple services with a single shared schema ?

2008-01-04 Thread Glen Mazza

Am Freitag, den 04.01.2008, 06:04 -0800 schrieb Pierre Buyle:
 Hi,
 
 In Java, I have several different services interfaces using the same data
 classes with JAXB annotations. Using CXF (2.0.3) and Spring, implementations
 of theses interfaces are exposed as Web Services.
 
 It works well with one exception: each (generated) WSDL contains it's own
 schema with XSD types for the data classes used by the service's method. If
 two services use the same data classes, the same XSD type is defined in two
 separate WSDLs.
 
 Is there a way to put shared XSD types in a single XSD (or even WSDL) file
 and to have this file imported in the WSDLs ?

Manually, after generated, of course you can do that.  Automated?  I
would take a look at the -createxsdimports option ([1])--that might be
what you're looking for.

HTH,
Glen

[1] http://cwiki.apache.org/CXF20DOC/java-to-wsdl.html



CXF interceptor equivalent for LogicalHandler?

2008-01-03 Thread Glen Mazza

Hello, I am trying to understand any architectural correspondances between
JAX-WS Handlers[1] and CXF interceptors.  I can see from the interceptor
page[2] that a JAX-WS SOAP protocol handler more or less maps to a CXF
AbstractSoapInterceptor.  I was wondering if there is an counterpart to the
JAX-WS LogicalHandler for an interceptor?

Thanks,
Glen

[1]
http://java.sun.com/mailers/techtips/enterprise/2006/TechTips_June06.html
[2] http://cwiki.apache.org/CXF20DOC/interceptors.html

-- 
View this message in context: 
http://www.nabble.com/CXF-interceptor-equivalent-for-LogicalHandler--tp14600693p14600693.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to throw RemoteException

2008-01-03 Thread Glen Mazza
I don't think you usually throw (or can even throw) RemoteExceptions
with JAX-WS.  IIRC RemoteExceptions are for JAX-RPC only[1].

Glen

[1]
http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc3/

Am Donnerstag, den 03.01.2008, 12:53 -0800 schrieb yulinxp:
 sample wsdl_first demos how to throw a customized exception: PingMeFault.
 But how to handle a defined exception like RemoteException?
 Currently, when I generate code, RemoteException would be removed from my
 interface.
 
 public interface HelloWorld {
   public void sayHi(
 java.lang.String text
 ) throws PingMeFault, RemoteException;
 }



Re: webservice client does not work on weblogic 9.2

2008-01-03 Thread Glen Mazza
Just a gamble here, but docs for the Mule-CXF transport seem to suggest
that CXF is picky on the SAAJ version it wants ([1], see With Mule
Standalone section.)  You may need to override the SAAJ version that
WebLogic is using.  How you do that is unfortunately quite JEE
server-dependent.  You may first want to try to run your SOAP client
standalone with whatever SAAJ jar WebLogic is using to confirm that that
is indeed the problem.

Another option (if trying to solve this is causing you too many
headaches) is to switch to GlassFish Metro for your client; they're
fairly similar and swappable.  The Ant build file in [2] below shows the
close similarities between the two.  No guarantees, though, you may have
similar or different problems with Metro.  (The Metro user's forum is
accessible at www.nabble.com.)

HTH,
Glen

[1] http://mule.mulesource.org/display/CXF/Setting+up+your+build+and
+classpath
[2] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1


Am Donnerstag, den 03.01.2008, 06:10 -0800 schrieb mjmjmj:
 I have a basic web service client which works as a standalone client. It is
 configured with the following spring beans :
 
 bean id=callNotificationClient
   factory-bean=callNotificationClientFactory factory-method=create /
 
 bean id=callNotificationClientFactory
   class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
   property name=serviceClass
   
 value=org.csapi.wsdl.parlayx.call_notification.v3_2._interface.CallNotification
 /
   property name=address
   
 value=http://10.193.5.248:8080/CallNotificationService/services/CallNotification;
 /
 /bean
 
 When I try to integrate this client to an application deployed on a weblogic
 9.2 server (with exactly the same beans definitions), I have the following
 exception :
 
 javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance.
 at
 org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:118)
 at
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:151)
 at $Proxy182.notifyAnswer(Unknown Source)
 Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory:
 Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
 at javax.xml.soap.SOAPFactory.newInstance(Unknown Source)
 at
 org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:113)
 
 I dont understand where this exception comes from : 
 - is it normal that saaj is used there ?
 - I have added saaj to the webapp classloader but it is still not found !?
 
 any ideas on how to configure cxf in this particular context ?
 
 
 



Re: cxf without spring

2008-01-03 Thread Glen Mazza
cxf.xml is for bus (generic service/client endpoing) configuration--I
don't know what you're trying to do to be able to answer your question
directly.

The Service configuration files section of [1] gives you two separate
ways of configuring a CXF-based web service.  Also, Willem recently
created a CXFNonSpringServlet[2] which may be what you're looking for.
Unfortunately AFAIK its usage has not been documented yet, but if you
ask Willem enough questions he may become motivated to write up about
it.

HTH,
Glen

[1] http://cwiki.apache.org/CXF20DOC/configuration.html
[2]
http://www.mail-archive.com/[EMAIL PROTECTED]/msg03018.html


Am Mittwoch, den 02.01.2008, 17:09 -0600 schrieb Patidar, Manoj:
 Hi All,
 
 can we configure  cxf without using following xml as  we are facing
 issue with intiallizing the  beans of our product if we import cxf.xml
 in our application-context.xml.   Jsr250PostProcessor.java is creating
 some issue and none of our beans are intialized. 
 So my questions is can we avoid including cxf.xml. If yes how?
 
 cxf.xml 
 cxf-extension.xml 
 cxf-property-editors.xml 
 
 
 your help is apreciated.
 
 Thanks
 Manoj patidar



  1   2   3   >