Re: How to use wsdl2js output?

2008-04-23 Thread Benson Margulies
Tim,

Each of these deserves a JIRA.

On the URL, I have to confess that I've always thought that URLs in WSDLs
were stupid. In every client application I've ever written, I've overridden
them with a URL known some other way. However, I recognize that this is
pissing into the wind of all the standards, and I'll be happy to fix it.

As for the message type, hey, I just made the Javascript client do just what
the Java client does, didn't I? I would be happy to add a way to change it,
but I'd like the business to be comparable to what the standard-conforming
clients do. Dan, can you shed me any light on this?

--benson


Re: How to use wsdl2js output?

2008-04-22 Thread Benson Margulies
The error callback parameter should at least be an explanatory message.
Dan's recipe is the place to start.

Not to mention using venkman and looking at it in detail.


Re: Eclipse XSD validation for jaxws.xsd

2008-04-22 Thread Benson Margulies
Dan,

Don't we automatically provide a catalog for this stuff at runtime?

--benson


Re: Massive config error stacktrace when porting from XFire to CXF

2008-04-22 Thread Benson Margulies
I use them all the time, myself.


Re: Q: Issues when attempting to send . Wind up with

2008-04-17 Thread Benson Margulies
Here we go again. I suggest that you write things like 'convert the
greater-than sign to amp g t semi'.

You shouldn't ever need to do this. No standard-conforming XML processor
needs it.

On Wed, Apr 16, 2008 at 9:19 PM, adam_j_bradley [EMAIL PROTECTED]
wrote:


 Dan,

 Thanks for the tip, getting closer! One thing I want to now have is for
 all
 the  symbols to be converted to  to mimic the behavior of the
 existing Web Service client (C# based).

 Any thoughts on how I might do that?

 Sincerely,
 Adam


 dkulp wrote:
 
  Don't pre-escape it.   Let the CXF runtime escape it.   The runtime
  doesn't know if a string that is being passed in is XML or just a
  straight string.   Thus, it will always escape any of the XML special
  characters.  You don't need to do it.
 

 --
 View this message in context:
 http://www.nabble.com/Q%3A-Issues-when-attempting-to-send-%22-gt%22.-Wind-up-with-%22-amp-gt-%22-tp16703395p16736921.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: Q: Issues when attempting to send . Wind up with

2008-04-16 Thread Benson Margulies
How are you coding this?

From the posted items, it's clear that you are passing a string of XML to an
API that specifically wants text payload. So it's carefully excaping your
less-than signs.

If you tell us what you're calling and where, someone can probably tell you
how to insert an XML element into a DOM tree or otherwise get what you want.


Re: Invalid SOAP message

2008-04-16 Thread Benson Margulies
Personally, I can't imagine a way to persuade CXF to send 'ed' and '0'. Can
you send us your cxf.xml or java code that you use?

On Wed, Apr 16, 2008 at 3:37 AM, Jan Pechanec [EMAIL PROTECTED] wrote:


 I have problem with SOAP request message generated with Apache CXF 2.0.4.
 I generated java client from WSDL (wsdl2java), and tried to call web
 service running in the cobol MicroFocus Enteprise Server - the response was
 following:
 ...
 faultcodeClient/faultcode
 faultstringError in client request message/faultstring
 ...

 I suppose it means that SOAP request message is bad for the server side of
 web service.
 I tried following:
 Apache CFX client - cobol server : Error in client request message
 soapUI client generated from WSDL - cobol server : OK
 Apache CFX client - soapUI Mock service generated from WSDL : OK

 In the tcpmon I can see that there are strange chars (ed, 0) around
 SOAP message.
 I suppose this is the problem, but why there are these chars?
 See below.

 
 POST / HTTP/1.1
 Content-Type: text/xml; charset=UTF-8
 SOAPAction: 
 Accept: *
 Cache-Control: no-cache
 Pragma: no-cache
 User-Agent: Java/1.6.0_04
 Host: localhost:8081
 Connection: keep-alive
 Transfer-Encoding: chunked

 ed
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:BodyRead
 xmlns=http://tempuri.org/wmapserv
 BookStockno/BookStocknoBookTitle/BookTitleBookAuthor/BookAuthor/Read/soap:Body/soap:Envelope
 0
 --

 Thank you for any help, any hint,
 Jan




Re: [2.0.5] no write methods....

2008-04-15 Thread Benson Margulies
I've never heard of @Version. I very much doubt that Aegis sees it.

What version of CXF are you using? Could you please post a self-contained
test case to Jira?


On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson [EMAIL PROTECTED]
wrote:

 I am getting this error now:

 *INFO: Interceptor has thrown exception, unwinding now
 java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException: No
 write method for property {http://domain.baselogic.com}version in class
  com.baselogic.domain.Address
at

 org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:92)
at

 org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:44)
 *
 Here is my address object and versioned objects:

 *Address:*
 [EMAIL PROTECTED]
 @Table(name = address)
 public class Address extends IdentifiedObject implements Serializable {

private static final long serialVersionUID = 3617859655330969141L;
protected String address;
protected String city;
protected String province;
protected String country;
protected String postalCode;

public Address() {
}

public Address(Long id) {
setId(id);
}

 *

 *VersionedObject:
 [EMAIL PROTECTED]
 public class VersionedObject implements Serializable {
private static final long serialVersionUID = 1L;

protected Integer version;

@Version
public Integer getVersion() {
return version;
}

protected void setVersion(Integer version) {
this.version = version;
}

 }
 *


 So what is the issue with @Version?
 When I remove this set/get method, everything is fine.



 --
 Thanks,
 Mick Knutson

 http://www.baselogic.com
 http://www.blincmagazine.com
 http://www.linkedin.com/in/mickknutson
 http://www.djmick.com
 http://www.myspace.com/mickknutson
 http://www.myspace.com/BLiNCMagazine
 http://tahoe.baselogic.com
 ---



Re: [2.0.5] no write methods....

2008-04-15 Thread Benson Margulies
Hmm, I'll look at that. This rings a portion of a bell.

On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp [EMAIL PROTECTED] wrote:


 It might be due to the setVersion method being protected, not public.
 Thus, it might not see it as a propery as there aren't public getters
 and setters.  Not really sure though.

 Dan


 On Tuesday 15 April 2008, Benson Margulies wrote:
  I've never heard of @Version. I very much doubt that Aegis sees it.
 
  What version of CXF are you using? Could you please post a
  self-contained test case to Jira?
 
 
  On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson [EMAIL PROTECTED]
 
  wrote:
   I am getting this error now:
  
   *INFO: Interceptor has thrown exception, unwinding now
   java.lang.RuntimeException:
   org.apache.cxf.aegis.DatabindingException: No write method for
   property {http://domain.baselogic.com}version in class
   com.baselogic.domain.Address
  at
  
   org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
  ataReader.java:92) at
  
   org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
  ataReader.java:44) *
   Here is my address object and versioned objects:
  
   *Address:*
   [EMAIL PROTECTED]
   @Table(name = address)
   public class Address extends IdentifiedObject implements
   Serializable {
  
  private static final long serialVersionUID =
   3617859655330969141L; protected String address;
  protected String city;
  protected String province;
  protected String country;
  protected String postalCode;
  
  public Address() {
  }
  
  public Address(Long id) {
  setId(id);
  }
  
   *
  
   *VersionedObject:
   [EMAIL PROTECTED]
   public class VersionedObject implements Serializable {
  private static final long serialVersionUID = 1L;
  
  protected Integer version;
  
  @Version
  public Integer getVersion() {
  return version;
  }
  
  protected void setVersion(Integer version) {
  this.version = version;
  }
  
   }
   *
  
  
   So what is the issue with @Version?
   When I remove this set/get method, everything is fine.
  
  
  
   --
   Thanks,
   Mick Knutson
  
   http://www.baselogic.com
   http://www.blincmagazine.com
   http://www.linkedin.com/in/mickknutson
   http://www.djmick.com
   http://www.myspace.com/mickknutson
   http://www.myspace.com/BLiNCMagazine
   http://tahoe.baselogic.com
   ---



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



Re: [2.0.5] no write methods....

2008-04-15 Thread Benson Margulies
Hmm, I guess this is working as designed.

On Tue, Apr 15, 2008 at 12:58 PM, Mick Knutson [EMAIL PROTECTED]
wrote:

 I just tried that, and it works.

 On Tue, Apr 15, 2008 at 8:33 AM, Benson Margulies [EMAIL PROTECTED]
 wrote:

  Hmm, I'll look at that. This rings a portion of a bell.
 
  On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp [EMAIL PROTECTED] wrote:
 
  
   It might be due to the setVersion method being protected, not public.
   Thus, it might not see it as a propery as there aren't public getters
   and setters.  Not really sure though.
  
   Dan
  
  
   On Tuesday 15 April 2008, Benson Margulies wrote:
I've never heard of @Version. I very much doubt that Aegis sees it.
   
What version of CXF are you using? Could you please post a
self-contained test case to Jira?
   
   
On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson 
 [EMAIL PROTECTED]
   
wrote:
 I am getting this error now:

 *INFO: Interceptor has thrown exception, unwinding now
 java.lang.RuntimeException:
 org.apache.cxf.aegis.DatabindingException: No write method for
 property {http://domain.baselogic.com}version in class
 com.baselogic.domain.Address
at


 org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
ataReader.java:92) at


 org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
ataReader.java:44) *
 Here is my address object and versioned objects:

 *Address:*
 [EMAIL PROTECTED]
 @Table(name = address)
 public class Address extends IdentifiedObject implements
 Serializable {

private static final long serialVersionUID =
 3617859655330969141L; protected String address;
protected String city;
protected String province;
protected String country;
protected String postalCode;

public Address() {
}

public Address(Long id) {
setId(id);
}

 *

 *VersionedObject:
 [EMAIL PROTECTED]
 public class VersionedObject implements Serializable {
private static final long serialVersionUID = 1L;

protected Integer version;

@Version
public Integer getVersion() {
return version;
}

protected void setVersion(Integer version) {
this.version = version;
}

 }
 *


 So what is the issue with @Version?
 When I remove this set/get method, everything is fine.



 --
 Thanks,
 Mick Knutson

 http://www.baselogic.com
 http://www.blincmagazine.com
 http://www.linkedin.com/in/mickknutson
 http://www.djmick.com
 http://www.myspace.com/mickknutson
 http://www.myspace.com/BLiNCMagazine
 http://tahoe.baselogic.com
 ---
  
  
  
   --
   J. Daniel Kulp
   Principal Engineer, IONA
   [EMAIL PROTECTED]
   http://www.dankulp.com/blog
  
 



 --
 Thanks,
 Mick Knutson

 http://www.baselogic.com
 http://www.blincmagazine.com
 http://www.linkedin.com/in/mickknutson
 http://www.djmick.com
 http://www.myspace.com/mickknutson
 http://www.myspace.com/BLiNCMagazine
 http://tahoe.baselogic.com
 ---



Re: [2.0.5] no write methods....

2008-04-15 Thread Benson Margulies
Aegis doesn't know from DAO and Domain objects. It just knows that you want
to map a class to XML. It requires a way to both retrieve and set a field.
Dan, is JAXB more permissive here? If so, I guess we could change Aegis to
permit Java-XML and throw on XML-Java.


Re: Q: Issues when attempting to send . Wind up with gt;

2008-04-15 Thread Benson Margulies
Something happened to your email, there are no gt expressions in the XML.

Any  inside of an XML element has to be escaped. If you are trying to add
your own XML elements inside of this, then you need a different mechanism.



On Tue, Apr 15, 2008 at 1:23 PM, adam_j_bradley [EMAIL PROTECTED]
wrote:


 I'm currently setting this string (which forms part of the
 WSSecurityHeader),
 however, when I try and use  I wind up with gt;.

 ---snip---
 ppSoapHeader25s:ppSoapHeader
 xmlns:s=http://url/SoapServices/SoapHeader;
 version=1.0s:lcid1033/s:lcids:sitetokent:siteheader
 xmlns:t=http://url/SiteToken; id=253988
 //s:sitetoken/s:ppSoapHeader/ppSoapHeader25
 ---snip---

 What I want the web service to see is

 ---snip---
 ppSoapHeader25s:ppSoapHeader xmlns:s=http://url/SoapHeader;
 version=1.0s:lcid1033/s:lcids:sitetokent:siteheader
 xmlns:t=http://url/SiteToken; id=253988
 //s:sitetoken/s:ppSoapHeader/ppSoapHeader25
 ---snip---

 Any ideas?
 Thanks in advance!
 Adam


 --
 View this message in context:
 http://www.nabble.com/Q%3A-Issues-when-attempting-to-send-%22-gt%22.-Wind-up-with-%22-amp-gt-%22-tp16703395p16703395.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: Local transport is both up and down at the same time, sort of.

2008-04-13 Thread Benson Margulies
JNI is a pain in a web container. It occured to me that the most portable
way to share JNI between webapps was to put it into a web service in one web
app, and consume it in the others.


Re: Local transport is both up and down at the same time, sort of.

2008-04-13 Thread Benson Margulies
To share a bus, I'd have to get CXF in as a global resource across webapps.

That's non-portable between containers, each does it differently.

So I think I'll stick with TCP between webapps!


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

2008-04-11 Thread Benson Margulies
It goes inside the schema element. Any schema that references another schema
needs an import.

On Fri, Apr 11, 2008 at 7:18 AM, Tim Perrett [EMAIL PROTECTED] wrote:

 Hey Guys,

 Thanks for the various replies on this - If i wanted to add s:import -
 what would I need to add to the WSDL file?

 Cheers

 Tim

 On 8 Apr 2008, at 21:31, Daniel Kulp wrote:

  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.
 




Re: [HelloWorld JavaScript client] problem on IE.

2008-04-11 Thread Benson Margulies
I fixed it. you'll need a new snapshot.


Re: [HelloWorld JavaScript client] problem on IE.

2008-04-11 Thread Benson Margulies
There's a new snapshot.


Re: Local transport is both up and down at the same time, sort of.

2008-04-10 Thread Benson Margulies
I see your point. Maybe I made a cut-and-paste error and set up the service
factory instead of the proxy factory.

On Thu, Apr 10, 2008 at 4:14 AM, Willem Jiang [EMAIL PROTECTED]
wrote:

 Hi Benson,

 I am confused about the Webapp#2's log.

[java] Apr 9, 2008 9:11:35 PM
 org.apache.cxf.transport.local.LocalTransportFactory createDestination
[java] INFO: Creating destination for address
 local://RosetteTextAnalyzer

 It looks you create the same local transport destination in Webapp#2.

 AFAIK , if your two application are in the same JVM , the local transport
 should work :)


 Willem




 Benson Margulies wrote:

  Webapp #1 sets up a service, with an endpoint on the local transport.
 
   [java] INFO: Creating Service {urn:basistech.com:
  rta}RosetteTextAnalyzer
  from class com.basistech.rta.ws.RosetteTextAnalyzer
  [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
  initDestination
  [java] INFO: Setting the server's publish address to be
  local://RosetteTextAnalyzer
 
  Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
  Unhappiness results. First, some diagnostic complaints from the RSFB
  while
  creating the proxy (this is all JAXWS+JAXB) then we get the complaint
  that
  no-one and nothing is listening. Will the local transport in fact work
  across webapps? For that matter, are the complaints because all I've
  given
  the proxy factory to work on is an interface, and it doesn't have param
  names? I've been working inside CXF for so long that I'm pretty lost
  when I
  just try to use it.
 
   [java] Apr 9, 2008 9:11:34 PM
  org.apache.cxf.service.factory.ReflectionServiceFactoryBean
  buildServiceFromClass
  [java] INFO: Creating Service
  {urn:basistech.com:rta}RosetteTextAnalyzerService
  from class com.basistech.rta.RosetteTextAnalyzer
  [java] Apr 9, 2008 9:11:35 PM
  org.apache.cxf.service.factory.ReflectionServiceFactoryBean
  buildServiceFromClass
  [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type
  QName
  null.
  [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
  [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
  [java] {urn:basistech.com:rta:v1.0}glossaries part type QName null.
  [java]
  [java] Apr 9, 2008 9:11:35 PM
  org.apache.cxf.transport.local.LocalTransportFactory createDestination
  [java] INFO: Creating destination for address
  local://RosetteTextAnalyzer
  [java] Apr 9, 2008 9:11:35 PM
  org.apache.cxf.phase.PhaseInterceptorChain doIntercept
  [java] INFO: Interceptor has thrown exception, unwinding now
  [java] java.lang.IllegalStateException: Local destination does not
  have
  a MessageObserver on address local://RosetteTextAnalyzer
 
 
 




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

2008-04-09 Thread Benson Margulies
It shouldn't be too hard to write some xslt to script the edit Dan suggests.

For the two errors you report, I think that the second requires -exsh (or
one one the other command-line args to the tool) and the other requires a
minimal import element that specifies the namespace but no system id.







Multiple addresses for a service

2008-04-09 Thread Benson Margulies
A bit of googling got me nowhere here.

I want to publish a service on both a http: address and a local: address.
Two jaxws:endpoints? Can they point to the same #implementation bean?


Re: SoapWithAttachments - missing images

2008-04-09 Thread Benson Margulies
An image from *inside* the PDF is missing? That's hard to believe. Have you
just diffed the PDF to see the nature of the problem? Is it just truncated?


Re: I have the TRaX, can you help?

2008-04-09 Thread Benson Margulies
Honestly, my first thought is to hope that Thomas from JBoss, who has been
posting a lot of traffic on the dev list, might be able to help you.

On Wed, Apr 9, 2008 at 5:42 PM, jm1468 [EMAIL PROTECTED] wrote:


 We have found a way to reproduce it.  We are using JBoss 4.2 and CXF
 2.0.3.

 When JBoss is starting, if a client {java or .net} attempts to connect to
 the webservice before the JBoss server is completely up and servicing the
 webservice, the exception will be thrown after JBoss displays it's started
 successfully message. Now it's looking more like a JBoss problem than a
 CXF
 problem.  Any thoughts?

 Thanks,
 Jason



 dkulp wrote:
 
  On Friday 04 April 2008, Daniel Kulp wrote:
  On Thursday 03 April 2008, jm1468 wrote:
   ...
   WARNING: org.apache.cxf.transport.http.WSDLQueryHandler Exception
   caught writing response: Failed to configure TRaX
   ...
  org.apache.cxf.interceptor.Fault: No such operation
 
  Ick.. there are several things wrong that I need to dig into quite a
  bit more:
 
  1) The WSDLQueryHandler is throwing the above exception.  However, we
  only log the basic getMessage() thing and not the full stack trace
  that would indicate any internal cause exceptions and stuff that
  would actually help to diagnose it.
 
  2) If an exception is thrown, wrather than returning an error to the
  client like error generating wsdl, we try to dispatch the request
  into the interceptor chains like its a service invokation.  Since it
  doesn't look like a normal request, it doesn't find an operaion.
 
  I'm going to fix both of those.  It most likely won't fix your problem
  as it's having problems creating a transformer, but it MAY at least
  provide a better indication of WHY it's not working.
 
  Actually, I'm going to go one furthur and change from using a
 transformer
  to write the wsdl out to using our Stax based writers.  Since Stax HAS
  to work for pretty much anything in CXF to work, that should be a bit
  more reliable.  :-)   It may be a bit quicker as well.
 
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog
 
 

 --
 View this message in context:
 http://www.nabble.com/I-have-the-TRaX%2C-can-you-help--tp16455965p16597540.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Local transport is both up and down at the same time, sort of.

2008-04-09 Thread Benson Margulies
Webapp #1 sets up a service, with an endpoint on the local transport.

  [java] INFO: Creating Service {urn:basistech.com:rta}RosetteTextAnalyzer
from class com.basistech.rta.ws.RosetteTextAnalyzer
 [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
initDestination
 [java] INFO: Setting the server's publish address to be
local://RosetteTextAnalyzer

Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
Unhappiness results. First, some diagnostic complaints from the RSFB while
creating the proxy (this is all JAXWS+JAXB) then we get the complaint that
no-one and nothing is listening. Will the local transport in fact work
across webapps? For that matter, are the complaints because all I've given
the proxy factory to work on is an interface, and it doesn't have param
names? I've been working inside CXF for so long that I'm pretty lost when I
just try to use it.

  [java] Apr 9, 2008 9:11:34 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
 [java] INFO: Creating Service
{urn:basistech.com:rta}RosetteTextAnalyzerService
from class com.basistech.rta.RosetteTextAnalyzer
 [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
 [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type QName
null.
 [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
 [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
 [java] {urn:basistech.com:rta:v1.0}glossaries part type QName null.
 [java]
 [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.transport.local.LocalTransportFactory createDestination
 [java] INFO: Creating destination for address
local://RosetteTextAnalyzer
 [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
 [java] INFO: Interceptor has thrown exception, unwinding now
 [java] java.lang.IllegalStateException: Local destination does not have
a MessageObserver on address local://RosetteTextAnalyzer


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

2008-04-08 Thread Benson Margulies
Can you post the wsdl?

On Tue, Apr 8, 2008 at 10:46 AM, Tim Perrett [EMAIL PROTECTED] wrote:

 Hey All,

 Just trying to get up and running with CXF wsdl2java but I keep getting
 this error from the service I want to consume:

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

 Its a .NET 2 web service and it [the service] works just fine in other
 languages (ruby, python etc) - has anyone seen this error before?

 Many thanks

 Tim





Manifest puzzle

2008-04-08 Thread Benson Margulies
Building from ant, I find that using the CXF Manifest jar works fine for the
'java' task, but not for the 'javac' task. Am I rediscovering a wheel?


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

2008-04-08 Thread Benson Margulies
This error emerges from the bowels of JAXB's xjc tool, complete with the
lack of navigational info.

However,

What is

 s:complexType
   s:sequence
 s:element ref=s:schema /
 s:any /
   /s:sequence
 /s:complexType


supposed to mean?

I see no element named 'schema' .


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

2008-04-08 Thread Benson Margulies
Well, I don't know how hard it is to apply the jaxb customization inside of
CXF. My superiors in the secret college of JAXB will, with any luck, pipe up
at this point.

On Tue, Apr 8, 2008 at 12:15 PM, Ian Roberts [EMAIL PROTECTED]
wrote:

 Benson Margulies wrote:

  What is
 
  s:complexType
s:sequence
  s:element ref=s:schema /
  s:any /
/s:sequence
  /s:complexType
 
 
  supposed to mean?
 

 It defines a complex type consisting of an XML schema document followed by
 any XML element, but that doesn't help understand what it *means* ;-)

 Ian

 --
 Ian Roberts   | Department of Computer Science
 [EMAIL PROTECTED]  | University of Sheffield, UK



Re: Need help with WSDL2Java

2008-04-08 Thread Benson Margulies
That's soap encoding. CXF 2.0.x doesn't support it at all. CXF 2.1 might
support it enough, I don't recall how complete is the job Dain did on it.

On Tue, Apr 8, 2008 at 2:44 PM, Syed Haq [EMAIL PROTECTED] wrote:

 Hi,



 We have been using Axis (1.3)'s in our project for quite some time now.
 While trying to evaluate migration effort to cxf, I'm stuck right at the
 first step - unable to generate Java source out of WSDL file.



 Here is the error that I get:



 WSDLToJava Error: Thrown by JAXB : undefined simple or complex type
 'SOAP-ENC:Array'



 I'm attaching the WSDL for reference. We use GSoap to generate it out of
 C headers.



 When I remove the SOAP array reference, and just use the unbounded type,
 it works find and generates code that uses List.

 Note that ArrayOfAlarmInfo and ArrayOfDbChangeInfo are defined both as
 unbounded and bounded arrays. Removing the unbounded reference also
 doesn't have any effect.

 Thanks for all the help.



 Regards,

 Syed



 WSDL:



 ?xml version=1.0 encoding=UTF-8?

 definitions name=GMS

  targetNamespace=http://silverpeak.com/gms.wsdl;

  xmlns:tns=http://silverpeak.com/gms.wsdl;

  xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;

  xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;

  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

  xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  xmlns:ns=urn:soap:silverpeak:com

  xmlns:SOAP=http://schemas.xmlsoap.org/wsdl/soap/;

  xmlns:MIME=http://schemas.xmlsoap.org/wsdl/mime/;

  xmlns:DIME=http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/;

  xmlns:WSDL=http://schemas.xmlsoap.org/wsdl/;

  xmlns=http://schemas.xmlsoap.org/wsdl/;



 types



  schema targetNamespace=urn:soap:silverpeak:com

  xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;

  xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;

  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

  xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  xmlns:ns=urn:soap:silverpeak:com

  xmlns=http://www.w3.org/2001/XMLSchema;

  elementFormDefault=unqualified

  attributeFormDefault=unqualified

  import namespace=http://schemas.xmlsoap.org/soap/encoding//

  simpleType name=soap-boolean

   restriction base=xsd:string

enumeration value=false/

enumeration value=true/

   /restriction

  /simpleType

  simpleType name=AlarmSeverity

   restriction base=xsd:string

enumeration value=Critical/

enumeration value=Major/

enumeration value=Minor/

enumeration value=Warning/

enumeration value=Info/

   /restriction

  /simpleType

  simpleType name=AlarmAction

   restriction base=xsd:string

enumeration value=actionNone/

enumeration value=actionRaise/

enumeration value=actionClear/

enumeration value=actionAck/

enumeration value=actionUnack/

   /restriction

  /simpleType

  simpleType name=DbChangeAction

   restriction base=xsd:string

enumeration value=DbActionNone/

enumeration value=DbActionCreate/

enumeration value=DbActionDelete/

enumeration value=DbActionModify/

   /restriction

  /simpleType

  complexType name=Empty

   sequence

   /sequence

  /complexType

  complexType name=SystemRegister

   sequence

 element name=applianceIp type=xsd:string minOccurs=0
 maxOccurs=1 nillable=true/

 element name=mgmtIp type=xsd:string minOccurs=0
 maxOccurs=1 nillable=true/

 element name=user type=xsd:string minOccurs=0 maxOccurs=1
 nillable=true/

 element name=passwd type=xsd:string minOccurs=0
 maxOccurs=1 nillable=true/

   /sequence

  /complexType

  complexType name=AlarmInfo

   sequence

 element name=type type=xsd:string minOccurs=0 maxOccurs=1
 nillable=true/

 element name=name type=xsd:string minOccurs=0 maxOccurs=1
 nillable=true/

 element name=description type=xsd:string minOccurs=0
 maxOccurs=1 nillable=true/

 element name=source type=xsd:string minOccurs=0
 maxOccurs=1 nillable=true/

 element name=time type=xsd:long minOccurs=1 maxOccurs=1/

 element name=severity type=ns:AlarmSeverity minOccurs=1
 maxOccurs=1/

 element name=id type=xsd:int minOccurs=1 maxOccurs=1/

 element name=count type=xsd:int minOccurs=1 maxOccurs=1/

 element name=acknowledged type=xsd:boolean minOccurs=1
 maxOccurs=1/

 element name=clearable type=xsd:boolean minOccurs=1
 maxOccurs=1/

 element name=active type=xsd:boolean minOccurs=1
 maxOccurs=1/

 element name=serviceAffect type=xsd:boolean minOccurs=1
 maxOccurs=1/

 element name=action type=ns:AlarmAction minOccurs=1
 maxOccurs=1/

   /sequence

  /complexType

  complexType name=ArrayOfAlarmInfo

   complexContent

restriction base=SOAP-ENC:Array

 sequence

  element name=item type=ns:AlarmInfo minOccurs=0
 maxOccurs=unbounded/

 /sequence

 attribute ref=SOAP-ENC:arrayType
 WSDL:arrayType=ns:AlarmInfo[]/

/restriction

   /complexContent

  /complexType

  complexType name=DbChangeInfo

   sequence

 element 

Re: AegisDataBinding throwing NullPointer

2008-04-06 Thread Benson Margulies
Aegis does not support unqualified schema. However, it should have just made
up one for you. Please post a JIRA.

On Sun, Apr 6, 2008 at 2:40 AM, Judes Tumuhairwe [EMAIL PROTECTED]
wrote:

 Hi,
 I have an interesting case binding/marshalling complex types using the 2.1
 snapshot. A NullPointer is thrown [in NamespaceHelper.getPrefix() ] when I
 used AegisDataBinding but it works perfectly fine when I use JAXB (see the
 comment me to use JAXB line in the server  client).

 Question: Do I absolutely have to have a prefix for my namespace? How come
 it works fine with primitives? [actually I was trying to get the service
 working with some interfaces  abstract classes  was running into no
 write
 method for property xxx so when I took them out  dealt with POJOs, I ran
 into this NPE.]

 About the environment: Eclipse Europa, Win XP, Java 1.6
 I have 2 beans, the interface and the implementation, the server  the
 client (all in the same package).
 First, here is the stacktrace:

 Apr 6, 2008 2:06:05 AM
 org.apache.cxf.service.factory.ReflectionServiceFactoryBean
 buildServiceFromClass
 INFO: Creating Service 
 {http://education.toorosystems.com/}Universityhttp://education.toorosystems.com/%7DUniversityfrom
 class com.toorosystems.education.University
 Exception in thread main java.lang.NullPointerException
at

 org.apache.cxf.aegis.util.NamespaceHelper.getPrefix(NamespaceHelper.java:71)
at

 org.apache.cxf.aegis.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:57)
at

 org.apache.cxf.aegis.type.basic.BeanType.getNameWithPrefix(BeanType.java:533)
at
 org.apache.cxf.aegis.type.basic.BeanType.writeSchema(BeanType.java:483)
at

 org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(AegisDatabinding.java:477)
at

 org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:322)
at

 org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:343)
at

 org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:392)
at

 org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:180)
at

 org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:79)
at

 org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:113)
at com.toorosystems.education.Server.main(Server.java:19)

 The model:
 *a)* The beans:
 1. Course [id (long), name  description; their getters and setters, + 2
 constructors: (no-arg  all-arg)]
 2. Teacher [age (int), name, department; their getters/setters, + 2
 constructors (no-arg  all-arg i.e. Course(int age, String name, String
 dept)]

 *b)* The interface:
 package com.toorosystems.education;

 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
 import javax.jws.WebMethod;
 import javax.jws.WebResult;
 import javax.jws.WebParam;

 @WebService(name=University, targetNamespace=
 http://education.toorosystems.com/;)
 @SOAPBinding(use=SOAPBinding.Use.LITERAL,
 style=SOAPBinding.Style.DOCUMENT,
 parameterStyle=SOAPBinding.ParameterStyle.BARE)
 public interface University {

@WebResult(targetNamespace=http://education.toorosystems.com/;,
 name=return, partName=return)
@WebMethod(operationName=getTeacher, exclude=false)
public Teacher getTeacher(@WebParam(targetNamespace=
 http://education.toorosystems.com/;, name=course, mode=WebParam.Mode.IN)
Course course);
 }

 *c)* The implementation
 package com.toorosystems.education;

 import javax.xml.ws.WebServiceClient;

 //@WebServiceClient(name=com.toorosystems.education.UniversityImpl,
 targetNamespace=http://education.toorosystems.com/;)
 public class UniversityImpl implements University {

public UniversityImpl() {}
public Teacher getTeacher(Course course) {
System.out.println(getTeacher called...);
return new Teacher(Mr. Tom, 52, Computer Science +
 course.getName());
}

 }


 *d)* The Server
 package com.toorosystems.education;

 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.frontend.ServerFactoryBean;

 public class Server {

public static void main(String[] args) {
// Create our service implementation
System.out.println(Starting server ...);
ServerFactoryBean svrFactory = new ServerFactoryBean();
svrFactory.setServiceClass(University.class);
svrFactory.setAddress(http://localhost:9090/TV;);
svrFactory.setServiceBean(new UniversityImpl());

// comment me to use JAXB
svrFactory.getServiceFactory().setDataBinding(new
 AegisDatabinding());

svrFactory.create();
System.out.println(Server started!);
}
 }

 *e)* The client
 package com.toorosystems.education;

 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;

 

Re: /soapenv:Envelope

2008-04-06 Thread Benson Margulies
Did you enable validation?

On Fri, Apr 4, 2008 at 4:30 PM, Web Man [EMAIL PROTECTED] wrote:


 When a SOAP request is submitted without the closing /soapenv:Envelope,
 the
 Web Service is called and no errors are thrown.

 soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
 
 xmlns:v1=
 http://www.nortel.com/xmlprotocol/wsdl/data/protocol_interfaces/cisco_icm/v1_0
 
   soapenv:Header/
   soapenv:Body
  v1:CallCleared-Event
 !--Optional:--
 callId35756/callId
 cause6/cause
  /v1:CallCleared-Event
   /soapenv:Body

 *  There should be a /soapenv:Envelope at the end of this request
 *
 --
 View this message in context:
 http://www.nabble.com/%3C-soapenv%3AEnvelope%3E-tp16498308p16498308.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: I have the TRaX, can you help?

2008-04-04 Thread Benson Margulies
I think this has to do with the XML jars in your path. What container are
you in?


Re: SoapWithAttachments

2008-04-04 Thread Benson Margulies
SwA is different from MTOM. I don't know of CXF does SwA.

On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam 
[EMAIL PROTECTED] wrote:

 In this case I do not have element that represents the attachment in WSDL.
 It comes as part of the Soap message as multi part attachment. So not sure
 how do I get the attachment. I could only find code that can easily get
 attachment using axis1.1 for the request.

 --Vijay


 On 4/3/08 7:58 PM, Freeman Fang [EMAIL PROTECTED] wrote:

  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
  

Re: Problem with secure connections via https

2008-04-03 Thread 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);
httpConduit.setTlsClientParameters(tlsParams);

HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

httpClientPolicy.setConnectionTimeout(36000);
httpClientPolicy.setAllowChunking(false);
httpConduit.getClient().setAutoRedirect(true);
httpConduit.setClient(httpClientPolicy);
configClientInterceptors(client);
echo.sayHi(Luba);
}






 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2008 6:55 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Problem deserializing pojos (fields not initialized)

 Why don't you send in a new email message with a new subject line that
 describes exactly what you did and what didn't work. This thread was
 about
 the very specific question of the new configuration system for Aegis.

 On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba [EMAIL PROTECTED] wrote:

  I need use secure SOAP.
  I succeeded with publish my services on
  https://localhost:8080/ServiceName;
  But client methods call

Re: Problem deserializing pojos (fields not initialized)

2008-04-02 Thread Benson Margulies
Create an AegisContext, set the flag in there, push it into the
AegisDatabinding.


Re: Problem deserializing pojos (fields not initialized)

2008-04-02 Thread Benson Margulies
I don't see what https has to do with this.


Re: Problem deserializing pojos (fields not initialized)

2008-04-02 Thread Benson Margulies
Why don't you send in a new email message with a new subject line that
describes exactly what you did and what didn't work. This thread was about
the very specific question of the new configuration system for Aegis.

On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba [EMAIL PROTECTED] wrote:

 I need use secure SOAP.
 I succeeded with publish my services on
 https://localhost:8080/ServiceName;
 But client methods call fails.
 Thanks for your time.
 Regards,
 Luba.



 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2008 5:27 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Problem deserializing pojos (fields not initialized)

 I don't see what https has to do with this.



Re: Error during build !!

2008-03-31 Thread Benson Margulies
I *may* have been caught out by the servicemix upgrade.

On Mon, Mar 31, 2008 at 9:30 AM, Daniel Kulp [EMAIL PROTECTED] wrote:



 Did you have a full internet connection (no proxy required) while doing
 the build?  There is an issue in the validator tests that requires a
 host name to be resolved and a connection established.   We've fixed
 that on trunk and I think for 2.0.5, although Benson mentioned the other
 day that there are still failures if the internet isn't available.

 Dan



 On Monday 31 March 2008, harbhanu wrote:
  Hi,
  I am able to solve that problem...
  It was due to some goof up that I did with the set of WSDL files under
  testutils.
  Apologies for bugging the group for such a mistake from my side :(
 
  Now that particular testcase execution is thru but now getting another
  one...
 
  Expecting prompt reply on this too ;) .. Thanks !
 
  Regards,
  Harbhanu
 
  PS: Error information for testcase failure...
  Running org.apache.cxf.tools.wsdlto.jaxws.CodeGenBugTest
  2008-03-31 12:34:29.365::INFO:  Logging to STDERR via
  org.mortbay.log.StdErrLog
  2008-03-31 12:34:29.427::INFO:  jetty-6.1.6
  2008-03-31 12:34:29.662::INFO:  Started [EMAIL PROTECTED]:8585
  Tests run: 49, Failures: 0, Errors: 2, Skipped: 0, Time elapsed:
  217.141 sec  FAILURE!
  testCatalog2(org.apache.cxf.tools.wsdlto.jaxws.CodeGenBugTest)  Time
  elapsed: 63.046 sec   ERROR!
  org.apache.cxf.tools.common.ToolException: java.net.ConnectException:
  Connection timed out: connect
  at
  org.apache.cxf.tools.validator.internal.WSDL11Validator.getWSDLDoc(WSD
 L11Val idator.java:80)
  at
  org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11
 Valida tor.java:95)
  at
  org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuild
 er.val idate(JAXWSDefinitionBuilder.jav
 
  :198)
 
  at
  org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuild
 er.val idate(JAXWSDefinitionBuilder.jav
 
  :61)
 
  at
  org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCont
 ainer. java:128)
  at
  org.apache.cxf.tools.wsdlto.jaxws.CodeGenBugTest.testCatalog2(CodeGenB
 ugTest .java:852)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
 ava:39 )
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
 orImpl .java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at
  org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMeth
 odRunn er.java:99)
  at
  org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodR
 unner. java:81)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAnd
 AfterR unner.java:34)
  at
  org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner
 .java: 75)
  at
  org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:
 45) at
  org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(Tes
 tClass MethodsRunner.java:66)
  at
  org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethods
 Runner .java:35)
  at
  org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassR
 unner. java:42)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAnd
 AfterR unner.java:34)
  at
  org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52
 ) at
  org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.j
 ava:62 )
  at
  org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest
 Set(Ab stractDirectoryTestSuite.java:13
  )
  at
  org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Abs
 tractD irectoryTestSuite.java:125)
  at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
 ava:39 )
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
 orImpl .java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at
  org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Sur
 efireB ooter.java:290)
  at
  org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.ja
 va:818 )
  Caused by: java.net.ConnectException: Connection timed out: connect
  at java.net.PlainSocketImpl.socketConnect(Native Method)
  at
  java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at
  java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  at java.net.Socket.connect(Socket.java:520)
  at java.net.Socket.connect(Socket.java:470)
  at 

Re: Error occurs when I generate wsdl in Eclipse

2008-03-28 Thread Benson Margulies
No attachments got here. Please open a JIRA or paste from the eclipse log
window in text.

On Thu, Mar 27, 2008 at 9:30 PM, Jackey Ding [EMAIL PROTECTED] wrote:

 Step:
 1. Create a new Java first JAX-WS project
 2. Create a new Interface called HelloWorld
 3. Add web service and web method annotation and set SOAPBinding = true
 4. Then I want to generate WSDL and other Client and Server code, the
 error occurs, please see the pictures in the attach

 Any body who can help me solve that

 Thanks and best regards
 Jackey



Re: service caching

2008-03-28 Thread Benson Margulies
Please supply some sort of test case. I've profiled extensively. I don't
believe that service caching, as discussed, would have any effect. The
current 2.1 code (as ported by Dan to 2.0.5) appears to be constrained by
the performance of JAXB, and I don't think we have a caching opportunity
there, though I would love to be wrong. Perhaps there's something about your
services that use a lot more time in the service model code than the sample
I've been profiling.

On Fri, Mar 28, 2008 at 8:13 AM, Christopher Cheng 
[EMAIL PROTECTED] wrote:

 I just tried to rerun it with the snapshot 2.0.5. It is running about 20%
 faster, but it still takes 3 seconds to build services.
 I hope that the service caching will be available soon so I can migrate
 the
 current axis-1.2 application to cxf

 On Thu, Mar 20, 2008 at 7:33 PM, Daniel Kulp [EMAIL PROTECTED] wrote:

  On Thursday 20 March 2008, Christopher Cheng wrote:
   Looks like 2.0.5 is going to release soon, is this service caching in
   2.0.5?
 
  Yea.   The stuff that Benson has done is being ported to 2.0.x.
 
  That said, it's not the full service caching.   It's basically a bunch
 of
  incremental improvements to the current algorithms, but it's definitely
  a big improvement.
 
  Dan
 
 
  
   On Wed, Mar 5, 2008 at 11:50 AM, Christopher Cheng 
  
   [EMAIL PROTECTED] wrote:
Looking forward to have this in the next release 2.0.5 or 2.1 :)
   
On Tue, Mar 4, 2008 at 11:55 PM, Daniel Kulp [EMAIL PROTECTED]
  wrote:
 Willem,

 The issue is that they CAN be modified after that.   One popular
 modification is to grab the EndpointInfo out of it and change the
 address.   Other things like adding interceptors to the
 BindingInfo, changing properties on the service (like to enable
 schema validation), etc... are all modifications that affect the
 servicemodel.

 Databinding is less of an issue, but still one.   For example,
 the databinding has an mtomThreshold and a namespaceMap that can
 be set programatically.

 In both of those cases, a modification should only affect the
 proxy on which the modification is made.   Thus, the servicemodel
 would need a full clone, which may not be easy to do.   It's
 certainly a lot more code to add.

 That said, I don't think it's a bad idea at all.  On the contrary,
 it's a
 good idea.   It's just a bit of work.

 Dan

 On Tuesday 04 March 2008, Willem Jiang wrote:
  Hi Dan,
 
  I think we could cache the ServiceInfo object and DataBinding
  object which will take lots of time to be created and can't be
  modified after that. Any thought?
 
  Willem
 
  Daniel Kulp wrote:
   On Tuesday 04 March 2008, Christopher Cheng wrote:
   I haven't read the codes of Axis, but I have been using it
   for 2 years and it doesn't have this problem.
   Having an overhead for 5-8 seconds is not an option for a
   production system in term of performance
  
   What you are saying is that all the services must implement
   Clonable interface?
  
   No, not the services themselves.   Just our interal service
   model stuff that holds all the metadata.  Basically, when
   creating a new service, we need to calculate the metadata.
   We should cache that if possible.
  
   Dan
  
   On Tue, Mar 4, 2008 at 4:48 AM, Daniel Kulp
   [EMAIL PROTECTED]

 wrote:
   Christopher,
  
   We cannot just reuse the Service model objects as they are
   completely modifiable at runtime. For example, one proxy
   could be reconfigured with new address or have additional
   interceptors added or similar.  Those shouldn't affect
   others.
  
   On option that propably would make sense is to add a fast
   clone functionality to the entire service model so we
   could cache one, and then clone it whenever one is really
   needed.   All the individual versions could be modified and
   not affect the original. However, doing that would be quite
   a bit of work as there are a LOT of classes that would need
   to be updated to support that.
  
   Patches towards that end would be great.   :-)
  
   Dan
  
   On Monday 03 March 2008, Christopher Cheng wrote:
   wsdl is indeed cached in WSDLManagerImpl.definitionsMap
  
   After reading the codes, I have some questions. My
   workstation is a PentiumD 3GHz with 1.5GB RAM
  
   In the class
   org.apache.cxf.service.factory.ReflectionServiceFactoryBea
  n.buil d Serv iceFromWSDL(String url),
   setService(factory.create()); takes 3 seconds
   getDataBinding().initialize(getService()); takes 2
   seconds
  
   These 2 methods are called even in 2nd calls. Can you also
   cache the services perhaps using jakarta commons-pool? or
   eh-cache?
  
   By the 

Re: service caching

2008-03-28 Thread Benson Margulies
Thanks for the pointer. I'll do more profiling and report back.

On Fri, Mar 28, 2008 at 12:18 PM, Christopher Cheng 
[EMAIL PROTECTED] wrote:

 You could try to generate java codes using 
 org.apache.cxf.tools.wsdlto.WSDLToJava with the following wsdl and see
 the
 performance.


 http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_HotelAvailLLS1.5.1RQ.wsdl

 If it's jaxb that's causing the performance problem, which databinding in
 your opinion has the best performance?


 On Fri, Mar 28, 2008 at 11:26 PM, Benson Margulies [EMAIL PROTECTED]
 wrote:

  Please supply some sort of test case. I've profiled extensively. I don't
  believe that service caching, as discussed, would have any effect. The
  current 2.1 code (as ported by Dan to 2.0.5) appears to be constrained
 by
  the performance of JAXB, and I don't think we have a caching opportunity
  there, though I would love to be wrong. Perhaps there's something about
  your
  services that use a lot more time in the service model code than the
  sample
  I've been profiling.
 
  On Fri, Mar 28, 2008 at 8:13 AM, Christopher Cheng 
  [EMAIL PROTECTED] wrote:
 
   I just tried to rerun it with the snapshot 2.0.5. It is running about
  20%
   faster, but it still takes 3 seconds to build services.
   I hope that the service caching will be available soon so I can
 migrate
   the
   current axis-1.2 application to cxf
  
   On Thu, Mar 20, 2008 at 7:33 PM, Daniel Kulp [EMAIL PROTECTED] wrote:
  
On Thursday 20 March 2008, Christopher Cheng wrote:
 Looks like 2.0.5 is going to release soon, is this service caching
  in
 2.0.5?
   
Yea.   The stuff that Benson has done is being ported to 2.0.x.
   
That said, it's not the full service caching.   It's basically a
 bunch
   of
incremental improvements to the current algorithms, but it's
  definitely
a big improvement.
   
Dan
   
   

 On Wed, Mar 5, 2008 at 11:50 AM, Christopher Cheng 

 [EMAIL PROTECTED] wrote:
  Looking forward to have this in the next release 2.0.5 or 2.1 :)
 
  On Tue, Mar 4, 2008 at 11:55 PM, Daniel Kulp [EMAIL PROTECTED]
wrote:
   Willem,
  
   The issue is that they CAN be modified after that.   One
 popular
   modification is to grab the EndpointInfo out of it and change
  the
   address.   Other things like adding interceptors to the
   BindingInfo, changing properties on the service (like to
 enable
   schema validation), etc... are all modifications that affect
 the
   servicemodel.
  
   Databinding is less of an issue, but still one.   For
 example,
   the databinding has an mtomThreshold and a namespaceMap that
  can
   be set programatically.
  
   In both of those cases, a modification should only affect the
   proxy on which the modification is made.   Thus, the
  servicemodel
   would need a full clone, which may not be easy to do.   It's
   certainly a lot more code to add.
  
   That said, I don't think it's a bad idea at all.  On the
  contrary,
   it's a
   good idea.   It's just a bit of work.
  
   Dan
  
   On Tuesday 04 March 2008, Willem Jiang wrote:
Hi Dan,
   
I think we could cache the ServiceInfo object and
 DataBinding
object which will take lots of time to be created and can't
 be
modified after that. Any thought?
   
Willem
   
Daniel Kulp wrote:
 On Tuesday 04 March 2008, Christopher Cheng wrote:
 I haven't read the codes of Axis, but I have been using
 it
 for 2 years and it doesn't have this problem.
 Having an overhead for 5-8 seconds is not an option for a
 production system in term of performance

 What you are saying is that all the services must
 implement
 Clonable interface?

 No, not the services themselves.   Just our interal
 service
 model stuff that holds all the metadata.  Basically, when
 creating a new service, we need to calculate the metadata.
 We should cache that if possible.

 Dan

 On Tue, Mar 4, 2008 at 4:48 AM, Daniel Kulp
 [EMAIL PROTECTED]
  
   wrote:
 Christopher,

 We cannot just reuse the Service model objects as they
  are
 completely modifiable at runtime. For example, one proxy
 could be reconfigured with new address or have
 additional
 interceptors added or similar.  Those shouldn't affect
 others.

 On option that propably would make sense is to add a
 fast
 clone functionality to the entire service model so we
 could cache one, and then clone it whenever one is
 really
 needed.   All the individual versions could be modified
  and
 not affect the original. However, doing that would be
  quite
 a bit of work as there are a LOT of classes

Re: service caching

2008-03-28 Thread Benson Margulies
Dan,

Can we really blame the GC? When I profile a loop of 1000 client endpoint
creations, I think I see 1000 JAXB context creations. Surely the GC isn't
working *that* hard?

I'll certainly try the experiment of holding out an endpoint.

--benson


On Fri, Mar 28, 2008 at 1:38 PM, Daniel Kulp [EMAIL PROTECTED] wrote:


 Chris,

 Can you try something?   Create a single proxy and keep that proxy around
 (like in a static or something) for the duration of the test.  You don't
 need to use it, it just needs to stay around.

 We do do some caching of JAXB contexts (we should probably cache the
 schemas that go with that context), but those are stored in a
 WeakHashMap type thing so if something isn't kept around to hold onto
 them, they would get collected and have to be recreated.  Likewise, the
 wsdl and and schemas from the wsdl need something holding onto them to
 keep them from being collected.


 Dan



 On Friday 28 March 2008, Christopher Cheng wrote:
  You could try to generate java codes using 
  org.apache.cxf.tools.wsdlto.WSDLToJava with the following wsdl and
  see the performance.
 
  http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_HotelAvailLLS
 1.5.1RQ.wsdl
 
  If it's jaxb that's causing the performance problem, which databinding
  in your opinion has the best performance?
 
 
  On Fri, Mar 28, 2008 at 11:26 PM, Benson Margulies
  [EMAIL PROTECTED]
 
  wrote:
   Please supply some sort of test case. I've profiled extensively. I
   don't believe that service caching, as discussed, would have any
   effect. The current 2.1 code (as ported by Dan to 2.0.5) appears to
   be constrained by the performance of JAXB, and I don't think we have
   a caching opportunity there, though I would love to be wrong.
   Perhaps there's something about your
   services that use a lot more time in the service model code than the
   sample
   I've been profiling.
  
   On Fri, Mar 28, 2008 at 8:13 AM, Christopher Cheng 
  
   [EMAIL PROTECTED] wrote:
I just tried to rerun it with the snapshot 2.0.5. It is running
about
  
   20%
  
faster, but it still takes 3 seconds to build services.
I hope that the service caching will be available soon so I can
migrate the
current axis-1.2 application to cxf
   
On Thu, Mar 20, 2008 at 7:33 PM, Daniel Kulp [EMAIL PROTECTED]
 wrote:
 On Thursday 20 March 2008, Christopher Cheng wrote:
  Looks like 2.0.5 is going to release soon, is this service
  caching
  
   in
  
  2.0.5?

 Yea.   The stuff that Benson has done is being ported to 2.0.x.

 That said, it's not the full service caching.   It's basically a
 bunch
   
of
   
 incremental improvements to the current algorithms, but it's
  
   definitely
  
 a big improvement.

 Dan

  On Wed, Mar 5, 2008 at 11:50 AM, Christopher Cheng 
 
  [EMAIL PROTECTED] wrote:
   Looking forward to have this in the next release 2.0.5 or
   2.1 :)
  
   On Tue, Mar 4, 2008 at 11:55 PM, Daniel Kulp
   [EMAIL PROTECTED]

 wrote:
Willem,
   
The issue is that they CAN be modified after that.   One
popular modification is to grab the EndpointInfo out of it
and change
  
   the
  
address.   Other things like adding interceptors to the
BindingInfo, changing properties on the service (like to
enable schema validation), etc... are all modifications
that affect the servicemodel.
   
Databinding is less of an issue, but still one.   For
example, the databinding has an mtomThreshold and a
namespaceMap that
  
   can
  
be set programatically.
   
In both of those cases, a modification should only affect
the proxy on which the modification is made.   Thus, the
  
   servicemodel
  
would need a full clone, which may not be easy to do.
It's certainly a lot more code to add.
   
That said, I don't think it's a bad idea at all.  On the
  
   contrary,
  
it's a
good idea.   It's just a bit of work.
   
Dan
   
On Tuesday 04 March 2008, Willem Jiang wrote:
 Hi Dan,

 I think we could cache the ServiceInfo object and
 DataBinding object which will take lots of time to be
 created and can't be modified after that. Any thought?

 Willem

 Daniel Kulp wrote:
  On Tuesday 04 March 2008, Christopher Cheng wrote:
  I haven't read the codes of Axis, but I have been
  using it for 2 years and it doesn't have this
  problem. Having an overhead for 5-8 seconds is not an
  option for a production system in term of performance
 
  What you are saying is that all the services must
  implement Clonable interface?
 
  No, not the services themselves.   Just our interal
  service model stuff

Re: Override schemalocation when creating a client

2008-03-23 Thread Benson Margulies
The catalog manager might help, but, really, Glen's suggestion will lead to
much faster performance.

On Sun, Mar 23, 2008 at 1:47 AM, 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.

 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: REST-JS

2008-03-21 Thread Benson Margulies
Sergey,

I implemented ?js, but it generates Soap clients, not REST clients. have a
look at rt/javascript.

--benson


On Fri, Mar 21, 2008 at 6:44 AM, Sergey Beryozkin [EMAIL PROTECTED]
wrote:

 Hi Arul, Benson

 yes, that would be a rather simple thing to do, and in fact you'd likely
 get this JS code (or indeed code in your language of choice) generated for
 live services, as we've introduced SystemQueryHandlers (not sure it's a good
 name though) which are supposed to handle different types of query
 extensions and possibly let the invocation to proceed to the actual object
 afterwards. For example, at the moment, one can debug a live service and
 check on what format it can produce, for example, if it's an Atom-enbaled
 service then you can try ?_contentType=json. In this case the only thing the
 handler does is to update the Accept headers on the message.

 Likewise, one should be able to do ?_js or ?_lang=js.

 That said, supporting extensions like _js has not been prioritized. That
 would be a cool thing to do so if someone in the community is interested
 then the input would be welcomed.

 Cheers, Sergey


  There is no existing code to do this, if I follow your definition of a
  'resource object'. It would be only a few days of work to add to the
  existing Javascript generator to add this, I bet. If you post an example
 of
  what you'd like to see generated that might clarify. I for one wouldn't
 be
  in a position to tackle the job if I've understood it correctly.
 
 
 
  Here is my scenario. I have a JAX-RS CXF service. I have a web
  application which consumes this service. Is it possible to generate the
  REST resources as JavaScript so that the web app can use it directly
  when doing a POST (ex: construct the resource object)?
 
 
 
 

 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland



Re: Generated Faults and Inheritance

2008-03-21 Thread Benson Margulies
Aegis allows you to declare a base class in the throw clause and deliver
specific subclasses based on the actual class thrown. All the classes in
question end up in the wsdl.



On Fri, Mar 21, 2008 at 9:41 AM, mikem2005 [EMAIL PROTECTED] wrote:


 I'm trying to do the same thing...does anyone know if hierarchical
 exceptions
 are possible with CXF?

 Thanks!
 Mike




 Joel Turkel wrote:
 
  Hi,
 
  Is there anyway to get CXF to generate an inheritance hierarchy of users
  defined exceptions? For example, I'd like to generate something like the
  following from a WSDL:
 
  public interface Greeter {
 
  public void pingMe() throws PingMeSubclassFault, PingMeFault;
 
  }
 
  where PingMeSubclassFault is a subclass of PingMeFault. The WSDL below
  doesn't seem to do the trick i.e. PingMeFault and PingMeSubclassFault
 are
  not related via inheritance. The actually WSDL I'm working with has a
 rich
  hierarchy of exception so the lack of exception inheritance makes the
  generated code hard to work with.
 
  Thanks,
  Joel
 
  ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions name=HelloWorld
targetNamespace=http://apache.org/hello_world_soap_http;
xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:tns=http://apache.org/hello_world_soap_http;
xmlns:x1=http://apache.org/hello_world_soap_http/types;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
wsdl:types
schema
targetNamespace=
 http://apache.org/hello_world_soap_http/types;
xmlns=http://www.w3.org/2001/XMLSchema;
xmlns:tns=
 http://apache.org/hello_world_soap_http/types;
elementFormDefault=qualified
element name=pingMe
complexType /
/element
element name=pingMeResponse
complexType /
/element
element name=faultDetail type=tns:faultDetail
 /
complexType name=faultDetail
sequence
element name=minor type=short
 /
element name=major type=short
 /
/sequence
/complexType
element name=subclassFaultDetail
complexType
complexContent
extension
 base=tns:faultDetail
sequence /
/extension
/complexContent
/complexType
/element
/schema
/wsdl:types
wsdl:message name=pingMeRequest
wsdl:part name=in element=x1:pingMe /
/wsdl:message
wsdl:message name=pingMeResponse
wsdl:part name=out element=x1:pingMeResponse /
/wsdl:message
wsdl:message name=pingMeFault
wsdl:part name=faultDetail element=x1:faultDetail /
/wsdl:message
wsdl:message name=pingMeSubclassFault
wsdl:part name=faultDetail
 element=x1:subclassFaultDetail /
/wsdl:message
wsdl:portType name=Greeter
wsdl:operation name=pingMe
wsdl:input name=pingMeRequest
message=tns:pingMeRequest /
wsdl:output name=pingMeResponse
message=tns:pingMeResponse /
wsdl:fault name=pingMeFault
 message=tns:pingMeFault /
wsdl:fault name=pingMeSubclassFault
message=tns:pingMeSubclassFault /
/wsdl:operation
/wsdl:portType
wsdl:binding name=Greeter_SOAPBinding type=tns:Greeter
soap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http;
 /
wsdl:operation name=pingMe
soap:operation style=document /
wsdl:input
soap:body use=literal /
/wsdl:input
wsdl:output
soap:body use=literal /
/wsdl:output
wsdl:fault name=pingMeFault
soap:fault name=pingMeFault
 use=literal /
/wsdl:fault
wsdl:fault name=pingMeSubclassFault
soap:fault name=pingMeSubclassFault
 use=literal /
/wsdl:fault
   

Re: Generated Faults and Inheritance

2008-03-21 Thread Benson Margulies
1) Build code-first with Aegis.
2) Run java2ws from 2.1 with the Aegis databinding.
3) Use that WDSL as your starting point.

Warning: while I've worked on the code that supports all of this, I've never
looked closely at what come out of it.

On Fri, Mar 21, 2008 at 11:24 AM, Joel Turkel [EMAIL PROTECTED]
wrote:


 Is there anyway to do this using WSDL first development?


 Benson Margulies-4 wrote:
 
  Aegis allows you to declare a base class in the throw clause and deliver
  specific subclasses based on the actual class thrown. All the classes in
  question end up in the wsdl.
 
 
 
  On Fri, Mar 21, 2008 at 9:41 AM, mikem2005 [EMAIL PROTECTED] wrote:
 
 
  I'm trying to do the same thing...does anyone know if hierarchical
  exceptions
  are possible with CXF?
 
  Thanks!
  Mike
 
 
 
 
  Joel Turkel wrote:
  
   Hi,
  
   Is there anyway to get CXF to generate an inheritance hierarchy of
  users
   defined exceptions? For example, I'd like to generate something like
  the
   following from a WSDL:
  
   public interface Greeter {
  
   public void pingMe() throws PingMeSubclassFault, PingMeFault;
  
   }
  
   where PingMeSubclassFault is a subclass of PingMeFault. The WSDL
 below
   doesn't seem to do the trick i.e. PingMeFault and PingMeSubclassFault
  are
   not related via inheritance. The actually WSDL I'm working with has a
  rich
   hierarchy of exception so the lack of exception inheritance makes the
   generated code hard to work with.
  
   Thanks,
   Joel
  
   ?xml version=1.0 encoding=UTF-8?
   wsdl:definitions name=HelloWorld
 targetNamespace=http://apache.org/hello_world_soap_http;
 xmlns=http://schemas.xmlsoap.org/wsdl/;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:tns=http://apache.org/hello_world_soap_http;
 xmlns:x1=http://apache.org/hello_world_soap_http/types;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 wsdl:types
 schema
 targetNamespace=
  http://apache.org/hello_world_soap_http/types;
 xmlns=http://www.w3.org/2001/XMLSchema;
 xmlns:tns=
  http://apache.org/hello_world_soap_http/types;
 elementFormDefault=qualified
 element name=pingMe
 complexType /
 /element
 element name=pingMeResponse
 complexType /
 /element
 element name=faultDetail
  type=tns:faultDetail
  /
 complexType name=faultDetail
 sequence
 element name=minor
  type=short
  /
 element name=major
  type=short
  /
 /sequence
 /complexType
 element name=subclassFaultDetail
 complexType
 complexContent
 extension
  base=tns:faultDetail
 sequence /
 /extension
 /complexContent
 /complexType
 /element
 /schema
 /wsdl:types
 wsdl:message name=pingMeRequest
 wsdl:part name=in element=x1:pingMe /
 /wsdl:message
 wsdl:message name=pingMeResponse
 wsdl:part name=out element=x1:pingMeResponse /
 /wsdl:message
 wsdl:message name=pingMeFault
 wsdl:part name=faultDetail element=x1:faultDetail
 /
 /wsdl:message
 wsdl:message name=pingMeSubclassFault
 wsdl:part name=faultDetail
  element=x1:subclassFaultDetail /
 /wsdl:message
 wsdl:portType name=Greeter
 wsdl:operation name=pingMe
 wsdl:input name=pingMeRequest
 message=tns:pingMeRequest /
 wsdl:output name=pingMeResponse
 message=tns:pingMeResponse /
 wsdl:fault name=pingMeFault
  message=tns:pingMeFault /
 wsdl:fault name=pingMeSubclassFault
 message=tns:pingMeSubclassFault /
 /wsdl:operation
 /wsdl:portType
 wsdl:binding name=Greeter_SOAPBinding type=tns:Greeter
 soap:binding style=document
 transport=http://schemas.xmlsoap.org/soap/http
 
  /
 wsdl:operation name=pingMe
 soap:operation style=document /
 wsdl:input

Re: REST-JS

2008-03-21 Thread Benson Margulies
Oh, I see, I was completely confused. I didn't appreciate that you were
talking about ? handling in the JAX-RS code. Still, you might find some code
you like in rt/javascript if/when you look at this ?js for REST.


On Fri, Mar 21, 2008 at 1:27 PM, Sergey Beryozkin [EMAIL PROTECTED]
wrote:

 Hi Benson

 For current CXF JAX-RS impl, the idea is to treat queries starting from
 '_' as system ones, intended for the JAX-RS runtime, such
 that such queries can be distinguished from application-specific ones.
 We've added SystemQueryHandlers which are invoked before the
 actual target object, so one of such handlers can be created to handle
 '_js' extension to avoid a clash with ?js support in
 runtime/js...

 Cheers, Sergey

 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland



Re: How to change the namespace position in the generate xml message (SOAP message)?

2008-03-20 Thread Benson Margulies
The CXF JAXB binding has a custom namespace mapper which can be told to
control the prefixes. You can override it for further control. However, I'm
very skeptical as to the idea modifying where the prefixes are defined. You
might need to just make an interceptor that rewrites the XML.

On Thu, Mar 20, 2008 at 8:20 AM, Ian Roberts [EMAIL PROTECTED]
wrote:

 Yuval Zou wrote:
  Hi,
 
  Recently, I'm working on a web services client using CXF. But some
 request
  messages can't be parsed by the web services server. I found the problem
 is
  related to the namespace and prefix.
  The correct message:
  ?xml version=1.0 encoding=UTF-8?
  CreateItemRequest xmlns=
 http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema;
   [snip]
  /CreateItemRequest
  The namespace http://www.ibm.com/xmlns/db2/cm/api/1.0/schema was put in
 the
  element that needs it in this correct message.
 
  The mesage can't be parsed by server (sent by CXF):
  ?xml version=1.0 encoding=UTF-8?
  CreateItemRequest xmlns:ns2=
 http://www.ibm.com/xmlns/db2/cm/api/1.0/schema;
  xmlns=http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema;
   [snip]
  /CreateItemRequest
 
  The namespace http://www.ibm.com/xmlns/db2/cm/api/1.0/schema was put in
 the
  root element.

 In XML terms the two messages are exactly the same, so it's more the
 fault of whatever is parsing the message on the server side rather than
 of the XML generator in CXF.  Nontheless...

 If you're using JAXB databinding then you may be able to do what you
 want using a custom namespace prefix mapper in the data binding.
 Something like this (not tested but you get the idea):

 jaxws:client ...
   jaxws:dataBinding
 bean class=org.apache.cxf.jaxb.JAXBDataBinding
   property name=marshallerProperties
 map
   entry key=com.sun.xml.bind.namespacePrefixMapper
 bean class=my.package.NoPrefixNamespaceMapper /
   /entry
 /map
   /property
 /bean
   /jaxws:dataBinding
 /jaxws:client

 Where NoPrefixNamespaceMapper is an implementation of
 com.sun.xml.bind.marshaller.NamespacePrefixMapper whose
 getPreferredPrefix method always returns .  This should force the
 marshaller to only use prefixes when it absolutely has to.

 Ian

 --
 Ian Roberts   | Department of Computer Science
 [EMAIL PROTECTED]  | University of Sheffield, UK



Re: REST-JS

2008-03-20 Thread Benson Margulies
Arul,

CXF has a 'front end' that allows you to run Javascript on the server in
Rhino. I believe that this should work fine for REST, but I'm not the REST
expert.

Java2js generates Client javascript. It does not generate REST clients, only
SOAP clients.

Does that clarify?

-benson


On Thu, Mar 20, 2008 at 1:29 PM, Arul Dhesiaseelan [EMAIL PROTECTED]
wrote:

 Hi,

 Currently CXF supports Java2JS for simple or JAX-WS front ends. Does CXF
 support JAX-RS front end (REST-JavaScript) too?

 Thanks!
 Arul




Re: REST-JS

2008-03-20 Thread Benson Margulies
There is no existing code to do this, if I follow your definition of a
'resource object'. It would be only a few days of work to add to the
existing Javascript generator to add this, I bet. If you post an example of
what you'd like to see generated that might clarify. I for one wouldn't be
in a position to tackle the job if I've understood it correctly.



 Here is my scenario. I have a JAX-RS CXF service. I have a web
 application which consumes this service. Is it possible to generate the
 REST resources as JavaScript so that the web app can use it directly
 when doing a POST (ex: construct the resource object)?





Re: ListDouble with aegis mapping issue

2008-03-20 Thread Benson Margulies
2.1 snapshot? Looks like a goof to me. Please make a JIRA.

On Thu, Mar 20, 2008 at 5:03 PM, Javier Delgadillo [EMAIL PROTECTED]
wrote:

 All,



 I've recently run into an issue with the Mar 14 snapshot build and was
 wondering if anyone has experienced something similar.



 If I have a service with a method that takes a parameter of type
 ListDouble and use aegis mapping files to map the argument's
 componentType to java.lang.Double, the produced wsdl adds the
 following block:



 ...

 xsd:import namespace=http://lang.java/

 ...

 xsd:complexType name=ArrayOfDouble

xsd:sequence

xsd:element maxOccurs=unbounded minOccurs=0
 name=Double nillable=true type=tns:Double/

/xsd:sequence

 /xsd:complexType

 ..



 In previous builds, a paratmer of type ListDouble added the following
 block:

 xsd:complexType name=ArrayOfDouble

xsd:sequence

xsd:element maxOccurs=unbounded minOccurs=0
 name=double nillable=true type=xsd:double/

/xsd:sequence

 /xsd:complexType



 The difference being that the Object java.lang.Double is no longer being
 mapped to xsd:double.



 Is this intended?  I tried using the snapshot build from Mar 19, but
 that won't even start up.  Seems there was a change or regression with
 the parsing of the Spring 2.0 simple:server parsing since with that
 build I get the following error at start-up:

 Invocation of init method failed; nested exception is
 java.lang.NoSuchMethodError:
 org.apache.cxf.service.model.ServiceInfo.getSchemas()Ljava/util/Collecti
 on;



 Has anyone else come across this issue.



 

 Javier Delgadillo

 ESRI / ArcWeb Services

 http://www.esri.com/

 (909) 793-2853 x1068






Performance of repeated creation

2008-03-19 Thread Benson Margulies
Dear users,

Some of you reported performance issues in creating the same endpoint over
and over again.

The next 2.1 snapshot will have a significant improvement in this for
multiple creation of an endpoint on the client side. I measured this for
JAX-WS + JAXB client endpoints.

Please do take the snapshot that will be published later today and give us
some feedback.

I plan to proceed with additional work in this area.

--benson


Re: sending up casted beans with XFire does not work ?

2008-03-12 Thread Benson Margulies
We don't really support XFire on this list. The doc I recently posted
explains how to do this with CXF 2.1. It is also hypothetically possible
with CXF 2.0.4, but I'm not quite sure of the recipe.


On Wed, Mar 12, 2008 at 10:07 AM, Maxim Veksler [EMAIL PROTECTED]
wrote:

 Hello everyone,

 I'm using XFire 1.2.6.

 I would like to expose an interface that can return varying Beans. For
 this
 I've created an interface with codepublic Object
 getExtendedStatus(String
 taskId);/code method.  The server side up casts the Bean to be send over
 the wire, in the client I'm trying to downcast it back to the correct bean
 but this does not work. I'm getting servlet.ServletException (see stack
 trace at the end of email).

 The question I assume is: Does XFire supports up casting POJO all the way
 to
 Object before sending them via SOAP in a way that could be down casted on
 the other end ?



 Thank you,
 Maxim.


 Stack trace:
 
 org.apache.jasper.JasperException: javax.servlet.ServletException:
 java.lang.StackOverflowError
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(
 JspServletWrapper.java:502)
at org.apache.jasper.servlet.JspServletWrapper.service(
 JspServletWrapper.java:414)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
 :320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:206)
at com.ml.multiusers.filters.URLFilter.proceedToURL(URLFilter.java:23)
at com.ml.multiusers.filters.URLFilter.doFilter(URLFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(
 StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(
 StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(
 StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(
 ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
 StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(
 CoyoteAdapter.java:212)
at org.apache.coyote.http11.Http11Processor.process(
 Http11Processor.java
 :818)
at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
 Http11Protocol.java:624)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
 :445)
at java.lang.Thread.run(Thread.java:595)
 Caused by: javax.servlet.ServletException: java.lang.StackOverflowError
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(
 PageContextImpl.java:855)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(
 PageContextImpl.java:784)
at org.apache.jsp.pushActionTable_jsp._jspService
 (pushActionTable_jsp.java:864)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(
 JspServletWrapper.java:390)
... 19 more
 Caused by: java.lang.StackOverflowError
at org.codehaus.xfire.util.stax.DepthXMLStreamReader.getNamespaceURI(
 DepthXMLStreamReader.java:142)
at org.codehaus.xfire.util.stax.DepthXMLStreamReader.getNamespaceURI(
 DepthXMLStreamReader.java:142)
at org.codehaus.xfire.aegis.stax.ElementReader.getNamespaceForPrefix(
 ElementReader.java:266)
at org.codehaus.xfire.aegis.type.basic.ObjectType.extractQName(
 ObjectType.java:146)
at org.codehaus.xfire.aegis.type.basic.ObjectType.readObject(
 ObjectType.java:97)
at org.codehaus.xfire.aegis.type.basic.ObjectType.readObject(
 ObjectType.java:133)
something like 100 more lines like the last one
 
 --
 Cheers,
 Maxim Veksler

 Free as in Freedom - Do u GNU ?



Re: Exposing java Map fields using CXF to C++ code

2008-03-09 Thread Benson Margulies
CXF can expose a Map in one of three ways:

1) Using the Aegis databinding, CXF will automatically generate a schema
from a Map. Other fully-compliant kits should be able to build clients from
the WSDL that results. It won't, however, necessarily translate into a 'Map'
on the client side.

2) Using CXF 2.1, still in snapshot only, you can use the complex JAXB
mechanisms that allow support for maps.

3) You can roll your own: probably more like an explicit

ListMap.Entrykey, value



On Sun, Mar 9, 2008 at 10:34 AM, Maxim Veksler [EMAIL PROTECTED]
wrote:

 Hi,


 I would like to get the general idea of what can be done with CXF or with
 SOAP in general.

 Can I use this library to expose java.util.Map based interface for Java,
 C++, php, python and co. code.
 I would like my user to pass me a list of parameters of Map String,
 ListString, which would be used as parameters for implementation class.


 Is this possible with CXF or even with SOAP in general ?


 Thank you,
 Maxim.

 --
 Cheers,
 Maxim Veksler

 Free as in Freedom - Do u GNU ?



Re: Nordic charaters problem in SOAP/MQ

2008-03-07 Thread Benson Margulies
WIndows does not have a code page for UTF-8. If you want to display UTF-8,
you have either send UTF-16 to the 'W' API or convert to some local code
page.

On Fri, Mar 7, 2008 at 2:54 AM, mr.andersen [EMAIL PROTECTED] wrote:



 Problem found and solved!

 First of all - thanks for the quick responses.

 I have looked more into kode and the bytes written to my log.
 And I can conclude that there is no problem with SAAJ (which would wonder
 me) or CXF.
 The problem lays in the way bytes are presented onscreen, when nordic
 characters are displayed.

 Maybe I should start to tell more about the environment i'm working in:

 Windows (danish XP version)
 RAD 7, which by the way uses cp1252 as encoding in the projects)
 IBM MQ


 As you proberly know nordic characters is presented as 2 bytes in UTF-8 -
 for example is aring; - C3 A5.
 When the that character is written onscreen or I use Wordpad, the cp1252
 is
 taking over and the translation is Atilde;yen;. But if you use
 ultraedit
 to see which bytes (short cut: ctrl+h) it is, it's okay.

 So where is the problem? Well the problem lays in the way IBM have
 implemented javax.jms.TextMesage. It seams like when a TextMessage is
 created the dobbelt bytes are converted into dobbelt bytes. So Atilde; is
 converted to C3 A0 and yen; C2 A5.

 So the way to solve this is using ByteMessage and luckily CXF gives a way
 to
 set the runtime policy in the WSDL (lt;jms:runtimePolicy
 messageType=binary/gt;)
 The problem here is that doesn't work in CXF 2.0.1, so I had to take out
 the
 conduit and set the messageType by myself.


 JMSConduit conduit = (JMSConduit)client.getConduit();
 conduit.getRuntimePolicy().setMessageType(MessageFormatType.BINARY);



 --
 View this message in context:
 http://www.nabble.com/Nordic-charaters-problem-in-SOAP-MQ-tp15845741p15891076.html
 Sent from the cxf-user mailing list archive at Nabble.com.



Re: Contract-last, empty List null

2008-03-05 Thread Benson Margulies
Tell us more about what you did and how you configured it. Can you post a
JIRA with a test case?

On Wed, Mar 5, 2008 at 8:46 AM, Michael McCaskill [EMAIL PROTECTED]
wrote:


 I've checked the response from my server side web service method. It is
 indeed not null and empty. But the client gets a null object back. I tried
 using the CXF 2.1-SNAPSHOT (for JAXB 2.1) but I couldn't get my services
 to
 work. What else can I try short of writing XSDs?
 --
 View this message in context:
 http://www.nabble.com/Contract-last%2C-empty-List-null-tp15850232p15850232.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: Nordic charaters problem in SOAP/MQ

2008-03-05 Thread Benson Margulies
Could you please send along these characters in hex? I am not confident that
we're seeing the same stuff.

I suspect that the CXF-MQ connector is failing to tell MQ about UTF-8
somehow, but I need a little more traction.

On Wed, Mar 5, 2008 at 7:31 AM, mr.andersen [EMAIL PROTECTED] wrote:


 I'm expecting UTF-8 since the reciever expects that I live up to WS-I
 Basic
 Profile.
 And it's also my understanding that CXF uses UTF-8 all the way, but I
 cannot
 understand why my å is converted to Ã¥ when SOAPMessage.writeTo() is used.


 Benson Margulies-4 wrote:
 
  In every other area, CXF writes UTF-8. Are you expecting UTF-8, or
  something
  else?
 
  On Wed, Mar 5, 2008 at 4:00 AM, mr.andersen [EMAIL PROTECTED] wrote:
 
 
  I have at problem with sending nordic charaters such as æøå via SOAP
 over
  MQ.
  I'm using cxf version 2.0.1 and SAAJ version 1.3.
 
  I have tried to trace where is could go wrong and what I can see, the å
  looks okay when it is added to W3CDOMXMLStreamWriter.writeCharaters(),
  but
  when the SOAPMessage.writeTo() method is called with System.out or
  OutputStream in SAAJOutInterceptor it is viewed as å.
 
  Can anyone tell me if I can do anything to avoid this behaviour or have
  it
  something to do with the SAAJ implementation?
 
  --
  View this message in context:
 
 http://www.nabble.com/Nordic-charaters-problem-in-SOAP-MQ-tp15845741p15845741.html
  Sent from the cxf-user mailing list archive at Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Nordic-charaters-problem-in-SOAP-MQ-tp15845741p15848926.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: Illegal Protocol https for HTTP URLConnection Factory

2008-03-04 Thread Benson Margulies
How about a really specific exception to indicate that we're missing the CA
config?

On Tue, Mar 4, 2008 at 7:04 AM, Arundel, Donal [EMAIL PROTECTED]
wrote:

 Hi Dan,

 Cheers for the change to the default ciphersuite list :-)

 I have some comments relating to implications from your https change
 though.
 This regards the addition of support for automatically using https
 instead of http when a URL starts with https.

 By itself this is a good idea, upgrading to SSL sounds fine in
 isolation,
 but..

 1) In general TLS requires some configuration for it to be worth
 anything.
 Minimally a trusted CA needs to be specified or you may as well not be
 using SSL in practical terms.. You will speak to anybody! (and be
 subject to man in the middle attacks to boot). Sure we can default all
 the other stuff to be sensible (max cert chain length, ciphersuites,
 protocol versions etc etc) but the trust config is vital.

 2) If the current use of CXF allows a user to NOT specify any trusted CA
 by default and also interprets this as a desire to accept any servers CA
 by default then this is an issue for two reasons.

 a) It's a security issue as mentioned in 1).
 Trusted CAs are such a vital config parameter that I think it should be
 required by default.
 Having the potential for things to work accidentally is something that
 would normally be avoided in secure systems where possible.
 i.e. one would default to the secure behaviour and force the user to
 explicitly specify that they want the less secure behaviour.

 b) The newly added automatic detection for when to use secure https
 comms based purely on the URL means that it would be very easy to
 accidentally
 introduce security to parts of your application that might make it hard
 to audit later when you do want to make your application meaningfully
 secure. i.e. specifically you could be using the valueless Accept any
 CA mode by default. Things might look like they are secure since they
 work but it's a false sense of security.


 3) BTW Have you also (perhaps inadvertently) enabled the opposite
 change?
 i.e. Downgrading from https to http just because the URL starts with
 http? I think this would be a security issue.
 In most cases for secure applications a client should have an advance
 expectation of whether a connection should be secure or not.
 Since there are many dynamic ways of retrieving urls (including over
 insecure HTTP or insecure wsdl publish) this would effectively allow
 dumbing down of the client to insecure comms when perhaps the author
 only wanted to use insecure comms to one endpoint or most likely for a
 secure application perhaps none! :-)

 (Aside: There would be an advanced use case where a client might be
 prepared
 to use ether http or https depending on the servers requirements but
 this is a less likely and less useful scenario - effectively the client
 has no security requirements).

 I think three separate items might help here?

 a) If there was a way to easily specify the trust info or other TLS
 parameters for all conduits or endpoints without repetition then you
 would get the effect you are looking for (no SSL per-conduit or endpoint
 config)
 by simply specifying your root CA at a high enough logical scope for it
 to be picked up by the connections.
 Then any encountered HTTPS URL could be used without explicit
 configuration but would result in meaningful authentication of the
 server endpoints concerned.

 b) The CXF runtime disallowing null CA lists by default for non
 anonymous ciphersuites. We could providing a config knob for folks that
 really want this secure behaviour, this should be a small majority of
 users.

 c) If your change has enabled the dumbing-down to http where https was
 intended by the user the perhaps we should amend that behaviour
 Again It might be possible to give more control over this setting.
 Logically there are three scenarios:
 i) client requires SSL
 ii) client requires insecure comms
 iii) client is happy to use either secure or insecure comms, possibly
 with a preference specifier.

 Does this make (any/some/non) sense? :-)

 Cheers,
Donal

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: 03 March 2008 20:28
 To: cxf-user@incubator.apache.org
 Cc: yulinxp
 Subject: Re: Illegal Protocol https for HTTP URLConnection Factory


 Yea.  I hit this while testing your testcase as well.   For some oddball

 reason, using an address like https doesn't allow https to actually be

 used.   You MUST configure a TLSClientParameters thing on the conduit
 prior to connecting.   Kind of strange and I'm not exactly sure why.
 Thus, you have to get the TLS thing configured either via spring config
 or programatic config.

 In anycase, I fixed it this morning.   :-)I'm going to deploy new
 2.0.5 and 2.1 snapshots later today.

 Dan




 On Monday 03 March 2008, yulinxp wrote:
  My excitement for my first CXF client connection didn't last long.
  Now I have another 

Re: Illegal Protocol https for HTTP URLConnection Factory

2008-03-04 Thread Benson Margulies
Dan,

Browsers ship with a list of globally trusted CAs. Should we do that, too?

--benson


On Tue, Mar 4, 2008 at 9:35 AM, Daniel Kulp [EMAIL PROTECTED] wrote:


 Donal,

 The use case that MUST work, IMO, is that if I am given an https URL to a
 service and that is it, that MUST work without having to go through a
 whole bunch of hoops and junk to get it configured.   Every other
 toolkit on the planet will work.  So should we.

 You don't go through a bunch of hoops and stuff to get your browser to
 talk HTTPS to amazon.com to buy things, do you?   I didn't think so.
 This is the same thing.

 It may come down to a client vs server thing.   For servers, sure, we
 should definitely make sure any services that are created meet minimal
 security requires.   For client consuming services, however, we must
 make it work out of the box with as many of the services that are out
 there as possible.   Give them the option to make sure it's more secure,
 but out of the box, it just works.

 Dan




 On Tuesday 04 March 2008, Arundel, Donal wrote:
  Hi Dan,
 
  Cheers for the change to the default ciphersuite list :-)
 
  I have some comments relating to implications from your https change
  though.
  This regards the addition of support for automatically using https
  instead of http when a URL starts with https.
 
  By itself this is a good idea, upgrading to SSL sounds fine in
  isolation,
  but..
 
  1) In general TLS requires some configuration for it to be worth
  anything.
  Minimally a trusted CA needs to be specified or you may as well not be
  using SSL in practical terms.. You will speak to anybody! (and be
  subject to man in the middle attacks to boot). Sure we can default all
  the other stuff to be sensible (max cert chain length, ciphersuites,
  protocol versions etc etc) but the trust config is vital.
 
  2) If the current use of CXF allows a user to NOT specify any trusted
  CA by default and also interprets this as a desire to accept any
  servers CA by default then this is an issue for two reasons.
 
  a) It's a security issue as mentioned in 1).
  Trusted CAs are such a vital config parameter that I think it should
  be required by default.
  Having the potential for things to work accidentally is something that
  would normally be avoided in secure systems where possible.
  i.e. one would default to the secure behaviour and force the user to
  explicitly specify that they want the less secure behaviour.
 
  b) The newly added automatic detection for when to use secure https
  comms based purely on the URL means that it would be very easy to
  accidentally
  introduce security to parts of your application that might make it
  hard to audit later when you do want to make your application
  meaningfully secure. i.e. specifically you could be using the
  valueless Accept any CA mode by default. Things might look like they
  are secure since they work but it's a false sense of security.
 
 
  3) BTW Have you also (perhaps inadvertently) enabled the opposite
  change?
  i.e. Downgrading from https to http just because the URL starts with
  http? I think this would be a security issue.
  In most cases for secure applications a client should have an advance
  expectation of whether a connection should be secure or not.
  Since there are many dynamic ways of retrieving urls (including over
  insecure HTTP or insecure wsdl publish) this would effectively allow
  dumbing down of the client to insecure comms when perhaps the author
  only wanted to use insecure comms to one endpoint or most likely for a
  secure application perhaps none! :-)
 
  (Aside: There would be an advanced use case where a client might be
  prepared
  to use ether http or https depending on the servers requirements but
  this is a less likely and less useful scenario - effectively the
  client has no security requirements).
 
  I think three separate items might help here?
 
  a) If there was a way to easily specify the trust info or other TLS
  parameters for all conduits or endpoints without repetition then you
  would get the effect you are looking for (no SSL per-conduit or
  endpoint config)
  by simply specifying your root CA at a high enough logical scope for
  it to be picked up by the connections.
  Then any encountered HTTPS URL could be used without explicit
  configuration but would result in meaningful authentication of the
  server endpoints concerned.
 
  b) The CXF runtime disallowing null CA lists by default for non
  anonymous ciphersuites. We could providing a config knob for folks
  that really want this secure behaviour, this should be a small
  majority of users.
 
  c) If your change has enabled the dumbing-down to http where https was
  intended by the user the perhaps we should amend that behaviour
  Again It might be possible to give more control over this setting.
  Logically there are three scenarios:
  i) client requires SSL
  ii) client requires insecure comms
  iii) client is happy to use either 

Re: Illegal Protocol https for HTTP URLConnection Factory

2008-03-03 Thread Benson Margulies
I just finished deploying a snapshot.

On Mon, Mar 3, 2008 at 3:27 PM, Daniel Kulp [EMAIL PROTECTED] wrote:


 Yea.  I hit this while testing your testcase as well.   For some oddball
 reason, using an address like https doesn't allow https to actually be
 used.   You MUST configure a TLSClientParameters thing on the conduit
 prior to connecting.   Kind of strange and I'm not exactly sure why.
 Thus, you have to get the TLS thing configured either via spring config
 or programatic config.

 In anycase, I fixed it this morning.   :-)I'm going to deploy new
 2.0.5 and 2.1 snapshots later today.

 Dan




 On Monday 03 March 2008, yulinxp wrote:
  My excitement for my first CXF client connection didn't last long.
  Now I have another problem for my 2nd CXF client connection to
  https://mdf.ingenixmedpoint.com/mdfwebservices/hpretriever.asmx?WSDL
 
 
  The same exception happens even after I set httpconduit SSL.
  Why it would get a HTTP URLConnection Factory at the first  place??
 
  :confused:
 
  org.apache.cxf.interceptor.Fault: Could not send Message.
at
  org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Mess
 ageSenderInterceptor.java:48) 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 $Proxy27.getHealthProfileNDA(Unknown Source)
at
  https.mdf_ingenixmedpoint_com.mdfwebservices.hpretriever.HPRetrieverWS
 Soap_HPRetrieverWSSoap_Client.main(HPRetrieverWSSoap_HPRetrieverWSSoap_
 Client.java:57) Caused by: java.io.IOException: Illegal Protocol https
  for HTTP URLConnection Factory.
at
  org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConne
 ction(HttpURLConnectionFactoryImpl.java:44) at
  org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:474
 ) at
  org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Mess
 ageSenderInterceptor.java:46) ... 7 more
  Exception in thread main javax.xml.ws.soap.SOAPFaultException: Could
  not send Message.
at
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175
 ) at $Proxy27.getHealthProfileNDA(Unknown Source)
at
  https.mdf_ingenixmedpoint_com.mdfwebservices.hpretriever.HPRetrieverWS
 Soap_HPRetrieverWSSoap_Client.main(HPRetrieverWSSoap_HPRetrieverWSSoap_
 Client.java:57) Caused by: org.apache.cxf.interceptor.Fault: Could not
  send Message. at
  org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Mess
 ageSenderInterceptor.java:48) 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
 ) ... 2 more
  Caused by: java.io.IOException: Illegal Protocol https for HTTP
  URLConnection Factory.
at
  org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConne
 ction(HttpURLConnectionFactoryImpl.java:44) at
  org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:474
 ) at
  org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Mess
 ageSenderInterceptor.java:46) ... 7 more



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



2.1 javadoc posted

2008-03-03 Thread Benson Margulies
http://incubator.apache.org/cxf/javadoc/2.1-SNAPSHOT/


Re: 2.1 AegisServiceConfiguration

2008-03-02 Thread Benson Margulies
All that class foes is change namespace URIs. You can, in 2.1, either change
to the new class (and keep using xfire-compatible) uri's, or you can inherit
from its base class.

On Sat, Mar 1, 2008 at 7:34 PM, tog [EMAIL PROTECTED] wrote:

 On Sun, Mar 2, 2008 at 1:02 AM, Benson Margulies [EMAIL PROTECTED]
 wrote:
  XFireCompatibilityServiceConfiguration. The javadoc claims to say so,
 did it
   not come through?

 humm, no there is nothing about aegis in the javadoc ;-) I could not
 find it for 2.0.3 either (btw I am looking in docs/api)

 
   Also, I don't see how that has anything to do with operation tuning.
 All
   it's ever done is to change namespace URIs.
 
 Here is what I am doing with it (and still expect from 2.1 :-))

 public class GroovyConfiguration extends AegisServiceConfiguration {
public Boolean isOperation(Method m) {

try {
Method method =
 GroovyObject.class.getMethod(m.getName(),
 m.getParameterTypes());
return false;
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
return super.isOperation(m);
}
}

public String getAction(OperationInfo op, Method m){
return op.getName().getLocalPart();
}

 }

 



Re: 2.1 AegisServiceConfiguration

2008-03-02 Thread Benson Margulies
I'll talk to DKulp.

On Sun, Mar 2, 2008 at 9:57 AM, tog [EMAIL PROTECTED] wrote:

 Ok, then I will probably inherit from it's base class.
 What about the doc ? any chance to have it online ?

 Thanks
 Guillaume

 On Sun, Mar 2, 2008 at 10:44 PM, Benson Margulies [EMAIL PROTECTED]
 wrote:
  All that class foes is change namespace URIs. You can, in 2.1, either
 change
   to the new class (and keep using xfire-compatible) uri's, or you can
 inherit
   from its base class.
 
 
 
   On Sat, Mar 1, 2008 at 7:34 PM, tog [EMAIL PROTECTED] wrote:
 
On Sun, Mar 2, 2008 at 1:02 AM, Benson Margulies 
 [EMAIL PROTECTED]
wrote:
 XFireCompatibilityServiceConfiguration. The javadoc claims to say
 so,
did it
  not come through?
   
humm, no there is nothing about aegis in the javadoc ;-) I could not
find it for 2.0.3 either (btw I am looking in docs/api)
   

  Also, I don't see how that has anything to do with operation
 tuning.
All
  it's ever done is to change namespace URIs.

Here is what I am doing with it (and still expect from 2.1 :-))
   
public class GroovyConfiguration extends AegisServiceConfiguration {
   public Boolean isOperation(Method m) {
   
   try {
   Method method =
GroovyObject.class.getMethod(m.getName(),
m.getParameterTypes());
   return false;
   } catch (SecurityException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   return false;
   } catch (NoSuchMethodException e) {
   // TODO Auto-generated catch block
   return super.isOperation(m);
   }
   }
   
   public String getAction(OperationInfo op, Method m){
   return op.getName().getLocalPart();
   }
   
}
   

   
 



 --
 Best Regards
 Guillaume
 PGP KeyID:C1A0A73F  FingerPrint:A4A2 73C0 E7D4 6437 8185  D05E ECF2
 AD84 C1A0 A73F
 http://cheztog.blogspot.com



Aegis doc for 2.1

2008-03-02 Thread Benson Margulies
http://cwiki.apache.org/confluence/display/CXF20DOC/Introduction+to+Aegis+%282.1%29


Re: 2.1 AegisServiceConfiguration

2008-03-01 Thread Benson Margulies
XFireCompatibilityServiceConfiguration. The javadoc claims to say so, did it
not come through?

Also, I don't see how that has anything to do with operation tuning. All
it's ever done is to change namespace URIs.

On Sat, Mar 1, 2008 at 5:59 AM, tog [EMAIL PROTECTED] wrote:

 Hi Benson,
 This is deprecated in 2.1. What should I use to tune the operations
 that are/aren't published now ?

 Cheers
 Guillaume

 --
 Best Regards
 Guillaume
 PGP KeyID:C1A0A73F  FingerPrint:A4A2 73C0 E7D4 6437 8185  D05E ECF2
 AD84 C1A0 A73F
 http://cheztog.blogspot.com



Re: REST CDATA Marshalling

2008-03-01 Thread Benson Margulies
Why do you want to do this? The distinction between CDATA and various
-entities is way below the level of web service semantics. Any conformant
XML parser is going to treat them identically.

On Sat, Mar 1, 2008 at 2:01 PM, Todd Orr [EMAIL PROTECTED] wrote:

 I'm attempting to get String data wrapped in CDATA before being
 returned to the client. I do not want special characters to be
 escaped. First I tried simply wrapping the properties in my getters
 with the CDATA block. Unfortunately, JAXB continued to escape all the
 special characters.

 I found this post:
 http://forum.java.sun.com/thread.jspa?threadID=607524messageID=3531931.
 Although promising, I could not find out how to setup JAXB in my
 applicationContext in such a way to set this as the XMLSerializer.

 Has anyone accomplished this? It seems as though it would be a fairly
 common need.

 Thanks,
 T



Re: REST CDATA Marshalling

2008-03-01 Thread Benson Margulies
Indeed, the CXF JAXB data binding does not provide any simple way around
this.

In the example at hand, the code knows the target byte stream for the
output, and is concocting a specialized XML writer that has the desired
behavior. CXF uses StaX to write out XML. You'd need a StaX implementation.

I wonder if you could create an interceptor that rewrote the XML the way you
like it? I'm not much of an interceptor expert.

On Sat, Mar 1, 2008 at 4:32 PM, Benson Margulies [EMAIL PROTECTED]
wrote:

 Why do you want to do this? The distinction between CDATA and various
 -entities is way below the level of web service semantics. Any conformant
 XML parser is going to treat them identically.


 On Sat, Mar 1, 2008 at 2:01 PM, Todd Orr [EMAIL PROTECTED] wrote:

  I'm attempting to get String data wrapped in CDATA before being
  returned to the client. I do not want special characters to be
  escaped. First I tried simply wrapping the properties in my getters
  with the CDATA block. Unfortunately, JAXB continued to escape all the
  special characters.
 
  I found this post:
  http://forum.java.sun.com/thread.jspa?threadID=607524messageID=3531931.
  Although promising, I could not find out how to setup JAXB in my
  applicationContext in such a way to set this as the XMLSerializer.
 
  Has anyone accomplished this? It seems as though it would be a fairly
  common need.
 
  Thanks,
  T
 




Re: Does CXF Support Interfaces as Web Params?

2008-02-29 Thread Benson Margulies
Aegis has interface support. You can specify a map from Class? to class
name that maps interface classes to proxy class names, and it will create
objects of the proxy types.

On Wed, Feb 27, 2008 at 10:15 PM, Daniel Kulp [EMAIL PROTECTED] wrote:

 On Wednesday 27 February 2008, Ayush Gupta wrote:
  Yes, I've used JAXB with interfaces and its painful but does work.
 
  However, it appears from the code in JAXBUtils that CXF explicitly
  excludes interfaces even if they are annotated to be properly
  marshaled by JAXB (as per
  https://jaxb.dev.java.net/guide/Mapping_interfaces.html)

 Actually, that code IS correct.   I've been experimenting with this quite
 a bit tonight and JAXB will barf if you try to create a context with any
 class that is an interface, even if the interface has the
 XmlJavaTypeAdapter annotation on it and such.   Thus, that code is
 correct.   However, this also means that you cannot use interfaces
 for top level  things, only for stuff within actual concrete beans.

 That said, I was pleasantly suprised when I wrote my test case that the
 test actually worked with whats on the trunk today PROVIDING you have a
 valid version of asm jar available AND you use wrapped doc/lit.   With
 the work I did two weeks ago, in the wrapped doc/lit case, it will use
 ASM to buildup concrete beans in memory and the interface params get put
 over just fine and they work.   (This is on the 2.1 line only.  Way to
 complex to port back to 2.0.x.)

 If you AREN'T using wrapped doc/lit or you don't have an asm jar
 available, then there are issues.  We have to drop down to JAXB
 proprietary API's and types to get them to work.   That's not going to
 be easy and due to the extra book keeping, is going to be a performance
 issue.In general, I strongly suggest the wrapped doc/lit with asm.

 In anycase, I'm adding a sample of this to the java_first_jaxws sample to
 kind of show it working.   I'll start a new snapshot deploy before I
 head to bed tonight so the 2.1 snapshots in the morning should have it.
 I'd really appreciate it if folks could look at it and let me know how
 to improve the sample to show some more of these complex scenarios.   I
 do admit most of our samples are very basic.  This should be a step in
 the right direction for providing something a bit more complex.

 Dan


 
 
  -Original Message-
  From: jim ma [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 26, 2008 9:18 PM
  To: cxf-user@incubator.apache.org
  Subject: Re: Does CXF Support Interfaces as Web Params?
 
  Kohsuke Kawaguchi's blog talked about this , you can get some
  information from
  this link:
  http://weblogs.java.net/blog/kohsuke/archive/2006/06/jaxb_and_interf.h
 tml
 
  On Wed, Feb 27, 2008 at 9:25 AM, Glen Mazza [EMAIL PROTECTED]
 wrote:
   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.ComplexObjectInterfaceis
 
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());



 --
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 

Re: WSDLtoJava

2008-02-29 Thread Benson Margulies
You'd need to show us your wsdl.

On Fri, Feb 29, 2008 at 11:20 AM, John-M Baker [EMAIL PROTECTED] wrote:

 Hello,

 I'm looking for a reliable wsdl2java product and I'm looking at CXF. I've
 generated a set of sources from a WSDL but a set of java.util.xsd.*
 sources have been generated. When compiled and run, the VM complains that
 java.util is a protected package (because it is).

 I'm generating the source using the following ant configuration:

java classname=org.apache.cxf.tools.wsdlto.WSDLToJava fork=true
   arg value=-client/
   arg value=-d/
   arg value=${dist.dir}/stubs/
   arg value=${dist.dir}/Query.wsdl/
   classpath
  path refid=classpath.cxf/
   /classpath
/java

 Can someone give me some guidance on what I may be doing wrong?

 Thanks,


 John



 ---

 This e-mail may contain confidential and/or privileged information. If you
 are not the intended recipient (or have received this e-mail in error)
 please notify the sender immediately and delete this e-mail. Any
 unauthorized copying, disclosure or distribution of the material in this
 e-mail is strictly forbidden.

 Please refer to http://www.db.com/en/content/eu_disclosures.htm for
 additional EU corporate and regulatory disclosures.


Re: WSDLtoJava

2008-02-29 Thread Benson Margulies
It's wrong in my opinion. HashMap's in JAXB are hard, but they can be done.

What's your  frustration with java-first and CXF?


On Fri, Feb 29, 2008 at 12:06 PM, John-M Baker [EMAIL PROTECTED] wrote:

 Yep, I agree. Or rather, Axis2's java2wsdl has helpfully put that
 namespace in the file. The -p option obviously resolved it for me. I
 assume Axis2 is behaving correctly by generating this WSDL given returning
 a Map must be a fairly common feature, yet 'claiming' that namespace seems
 to be a 'bad thing'?


 John Baker
 --
 Web SSO
 IT Infrastructure
 Deutsche Bank London

 URL:  http://websso.cto.gt.intranet.db.com




 Benson Margulies [EMAIL PROTECTED]
 29/02/2008 17:01
 Please respond to
 cxf-user@incubator.apache.org


 To
 cxf-user@incubator.apache.org
 cc

 Subject
 Re: WSDLtoJava






 It is doing what you asked it to do. You've got namespaces like

   xs:schema xmlns:ax22=http://util.java/xsd;

 in your file. You are claiming control of that package. Either change the
 namespace or remap it to a package of your own.

 There's nothing wrong with returning hashmaps.


 On Fri, Feb 29, 2008 at 11:58 AM, John-M Baker [EMAIL PROTECTED]
 wrote:

  Thanks, that fixed the problem. I'm returning a java.util.HashMap from
 one
  of the objects - I assume that's where the problem lies? Is this a bad
  thing?
 
  John Baker
  --
  Web SSO
  IT Infrastructure
  Deutsche Bank London
 
  URL:  http://websso.cto.gt.intranet.db.com
 
 
 
 
  Daniel Lipofsky [EMAIL PROTECTED]
  29/02/2008 16:42
  Please respond to
  cxf-user@incubator.apache.org
 
 
  To
  cxf-user@incubator.apache.org
  cc
 
  Subject
  RE: WSDLtoJava
 
 
 
 
 
 
  I'm not sure why it is using that package,
  it usually bases the package name off the
  namespace URL, but you can override by adding the -p
  parameter like this
 
 arg value=-p/
 arg value=com.mycompany.foobar.ws.impl.jaxws/
 
  try that and see if it helps.
  - Dan
 
   -Original Message-
   From: John-M Baker [mailto:[EMAIL PROTECTED]
   Sent: Friday, February 29, 2008 9:20 AM
   To: [EMAIL PROTECTED]
   Subject: WSDLtoJava
  
   Hello,
  
   I'm looking for a reliable wsdl2java product and I'm looking
   at CXF. I've
   generated a set of sources from a WSDL but a set of java.util.xsd.*
   sources have been generated. When compiled and run, the VM
   complains that
   java.util is a protected package (because it is).
  
   I'm generating the source using the following ant configuration:
  
   java classname=org.apache.cxf.tools.wsdlto.WSDLToJava
   fork=true
  arg value=-client/
  arg value=-d/
  arg value=${dist.dir}/stubs/
  arg value=${dist.dir}/Query.wsdl/
  classpath
 path refid=classpath.cxf/
  /classpath
   /java
  
   Can someone give me some guidance on what I may be doing wrong?
  
   Thanks,
  
  
   John
  
  
  
   ---
  
   This e-mail may contain confidential and/or privileged
   information. If you are not the intended recipient (or have
   received this e-mail in error) please notify the sender
   immediately and delete this e-mail. Any unauthorized copying,
   disclosure or distribution of the material in this e-mail is
   strictly forbidden.
  
   Please refer to
   http://www.db.com/en/content/eu_disclosures.htm for
   additional EU corporate and regulatory disclosures.
  
 
 
 
  ---
 
  This e-mail may contain confidential and/or privileged information. If
 you
  are not the intended recipient (or have received this e-mail in error)
  please notify the sender immediately and delete this e-mail. Any
  unauthorized copying, disclosure or distribution of the material in this
  e-mail is strictly forbidden.
 
  Please refer to http://www.db.com/en/content/eu_disclosures.htm for
  additional EU corporate and regulatory disclosures.
 



 ---

 This e-mail may contain confidential and/or privileged information. If you
 are not the intended recipient (or have received this e-mail in error)
 please notify the sender immediately and delete this e-mail. Any
 unauthorized copying, disclosure or distribution of the material in this
 e-mail is strictly forbidden.

 Please refer to http://www.db.com/en/content/eu_disclosures.htm for
 additional EU corporate and regulatory disclosures.



Re: WSDLtoJava

2008-02-29 Thread Benson Margulies
It is doing what you asked it to do. You've got namespaces like

   xs:schema xmlns:ax22=http://util.java/xsd;

in your file. You are claiming control of that package. Either change the
namespace or remap it to a package of your own.

There's nothing wrong with returning hashmaps.


On Fri, Feb 29, 2008 at 11:58 AM, John-M Baker [EMAIL PROTECTED] wrote:

 Thanks, that fixed the problem. I'm returning a java.util.HashMap from one
 of the objects - I assume that's where the problem lies? Is this a bad
 thing?

 John Baker
 --
 Web SSO
 IT Infrastructure
 Deutsche Bank London

 URL:  http://websso.cto.gt.intranet.db.com




 Daniel Lipofsky [EMAIL PROTECTED]
 29/02/2008 16:42
 Please respond to
 cxf-user@incubator.apache.org


 To
 cxf-user@incubator.apache.org
 cc

 Subject
 RE: WSDLtoJava






 I'm not sure why it is using that package,
 it usually bases the package name off the
 namespace URL, but you can override by adding the -p
 parameter like this

arg value=-p/
arg value=com.mycompany.foobar.ws.impl.jaxws/

 try that and see if it helps.
 - Dan

  -Original Message-
  From: John-M Baker [mailto:[EMAIL PROTECTED]
  Sent: Friday, February 29, 2008 9:20 AM
  To: [EMAIL PROTECTED]
  Subject: WSDLtoJava
 
  Hello,
 
  I'm looking for a reliable wsdl2java product and I'm looking
  at CXF. I've
  generated a set of sources from a WSDL but a set of java.util.xsd.*
  sources have been generated. When compiled and run, the VM
  complains that
  java.util is a protected package (because it is).
 
  I'm generating the source using the following ant configuration:
 
  java classname=org.apache.cxf.tools.wsdlto.WSDLToJava
  fork=true
 arg value=-client/
 arg value=-d/
 arg value=${dist.dir}/stubs/
 arg value=${dist.dir}/Query.wsdl/
 classpath
path refid=classpath.cxf/
 /classpath
  /java
 
  Can someone give me some guidance on what I may be doing wrong?
 
  Thanks,
 
 
  John
 
 
 
  ---
 
  This e-mail may contain confidential and/or privileged
  information. If you are not the intended recipient (or have
  received this e-mail in error) please notify the sender
  immediately and delete this e-mail. Any unauthorized copying,
  disclosure or distribution of the material in this e-mail is
  strictly forbidden.
 
  Please refer to
  http://www.db.com/en/content/eu_disclosures.htm for
  additional EU corporate and regulatory disclosures.
 



 ---

 This e-mail may contain confidential and/or privileged information. If you
 are not the intended recipient (or have received this e-mail in error)
 please notify the sender immediately and delete this e-mail. Any
 unauthorized copying, disclosure or distribution of the material in this
 e-mail is strictly forbidden.

 Please refer to http://www.db.com/en/content/eu_disclosures.htm for
 additional EU corporate and regulatory disclosures.



Re: WSDLtoJava

2008-02-29 Thread Benson Margulies
I thought you wrote that you were also failing with CXF java2wsdl?

On Fri, Feb 29, 2008 at 12:17 PM, John-M Baker [EMAIL PROTECTED] wrote:

 Sorry, What's your frustration with java-first and CXF?

 John Baker
 --
 Web SSO
 IT Infrastructure
 Deutsche Bank London

 URL:  http://websso.cto.gt.intranet.db.com




 Benson Margulies [EMAIL PROTECTED]
 29/02/2008 17:08
 Please respond to
 cxf-user@incubator.apache.org


 To
 cxf-user@incubator.apache.org
 cc

 Subject
 Re: WSDLtoJava






 It's wrong in my opinion. HashMap's in JAXB are hard, but they can be
 done.

 What's your  frustration with java-first and CXF?


 On Fri, Feb 29, 2008 at 12:06 PM, John-M Baker [EMAIL PROTECTED]
 wrote:

  Yep, I agree. Or rather, Axis2's java2wsdl has helpfully put that
  namespace in the file. The -p option obviously resolved it for me. I
  assume Axis2 is behaving correctly by generating this WSDL given
 returning
  a Map must be a fairly common feature, yet 'claiming' that namespace
 seems
  to be a 'bad thing'?
 
 
  John Baker
  --
  Web SSO
  IT Infrastructure
  Deutsche Bank London
 
  URL:  http://websso.cto.gt.intranet.db.com
 
 
 
 
  Benson Margulies [EMAIL PROTECTED]
  29/02/2008 17:01
  Please respond to
  cxf-user@incubator.apache.org
 
 
  To
  cxf-user@incubator.apache.org
  cc
 
  Subject
  Re: WSDLtoJava
 
 
 
 
 
 
  It is doing what you asked it to do. You've got namespaces like
 
xs:schema xmlns:ax22=http://util.java/xsd;
 
  in your file. You are claiming control of that package. Either change
 the
  namespace or remap it to a package of your own.
 
  There's nothing wrong with returning hashmaps.
 
 
  On Fri, Feb 29, 2008 at 11:58 AM, John-M Baker [EMAIL PROTECTED]
  wrote:
 
   Thanks, that fixed the problem. I'm returning a java.util.HashMap from
  one
   of the objects - I assume that's where the problem lies? Is this a bad
   thing?
  
   John Baker
   --
   Web SSO
   IT Infrastructure
   Deutsche Bank London
  
   URL:  http://websso.cto.gt.intranet.db.com
  
  
  
  
   Daniel Lipofsky [EMAIL PROTECTED]
   29/02/2008 16:42
   Please respond to
   cxf-user@incubator.apache.org
  
  
   To
   cxf-user@incubator.apache.org
   cc
  
   Subject
   RE: WSDLtoJava
  
  
  
  
  
  
   I'm not sure why it is using that package,
   it usually bases the package name off the
   namespace URL, but you can override by adding the -p
   parameter like this
  
  arg value=-p/
  arg value=com.mycompany.foobar.ws.impl.jaxws/
  
   try that and see if it helps.
   - Dan
  
-Original Message-
From: John-M Baker [mailto:[EMAIL PROTECTED]
Sent: Friday, February 29, 2008 9:20 AM
To: [EMAIL PROTECTED]
Subject: WSDLtoJava
   
Hello,
   
I'm looking for a reliable wsdl2java product and I'm looking
at CXF. I've
generated a set of sources from a WSDL but a set of java.util.xsd.*
sources have been generated. When compiled and run, the VM
complains that
java.util is a protected package (because it is).
   
I'm generating the source using the following ant configuration:
   
java classname=org.apache.cxf.tools.wsdlto.WSDLToJava
fork=true
   arg value=-client/
   arg value=-d/
   arg value=${dist.dir}/stubs/
   arg value=${dist.dir}/Query.wsdl/
   classpath
  path refid=classpath.cxf/
   /classpath
/java
   
Can someone give me some guidance on what I may be doing wrong?
   
Thanks,
   
   
John
   
   
   
---
   
This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient (or have
received this e-mail in error) please notify the sender
immediately and delete this e-mail. Any unauthorized copying,
disclosure or distribution of the material in this e-mail is
strictly forbidden.
   
Please refer to
http://www.db.com/en/content/eu_disclosures.htm for
additional EU corporate and regulatory disclosures.
   
  
  
  
   ---
  
   This e-mail may contain confidential and/or privileged information. If
  you
   are not the intended recipient (or have received this e-mail in error)
   please notify the sender immediately and delete this e-mail. Any
   unauthorized copying, disclosure or distribution of the material in
 this
   e-mail is strictly forbidden.
  
   Please refer to http://www.db.com/en/content/eu_disclosures.htm for
   additional EU corporate and regulatory disclosures.
  
 
 
 
  ---
 
  This e-mail may contain confidential and/or privileged information. If
 you
  are not the intended recipient (or have received this e-mail in error)
  please notify the sender immediately and delete this e-mail. Any
  unauthorized copying, disclosure or distribution of the material in this
  e-mail is strictly forbidden.
 
  Please refer to http://www.db.com/en/content/eu_disclosures.htm for
  additional EU corporate and regulatory disclosures.
 



 ---

 This e-mail

Re: Aegis databinding custom types

2008-02-28 Thread Benson Margulies
We're made a lot of changes in this area for 2.1. If you're willing to move
to a 2.1 snapshot, I'm willing to work with you to figure out how to do what
you need to do.


On Thu, Feb 28, 2008 at 6:30 AM, Tony Burdett [EMAIL PROTECTED] wrote:

 Hi,

 I'm in the process of porting my service from xfire and I'm having some
 difficulties using a custom type that worked previously.  My service
 returns some pretty complex objects that have XML representations but
 don't readily serialize using the standard JAXB/Aegis databindings.

 In XFire I wrote some custom serializers (extending
 org.codehaus.xfire.aegis.type.Type) and by annotating my Service
 Interface using @XmlReturnType annotations.

 When I ported the project over to CXF, this functionality all seems to
 have been ported, so I'm able to annotate my service with
 org.apache.cxf.aegis.type.java5.XmlParamType annotations and I've
 adapted the custom type serializers I'd written to extend
 org.apache.cxf.aegis.type.Type.

 My service is configured using JAX-WS annotations and a spring config
 file, similar to the xfire migration docs.  When I was using XFire, I
 had the required configuration elements in services.xml to initialize my
 custom types.  But I can't figure out what the equivalent is in CXF.
 Presumably I need to add the relevant bits to my spring configuration
 xml but I'm not sure what these bits are!  Can anyone point me in the
 right direction?

 Thanks in advance,

 Tony Burdett.

 --
 Tony Burdett
 Software Developer,
 ComparaGrid.

 European Bioinformatics Institute
 email: [EMAIL PROTECTED]
 tel:   01223 494624




Re: Aegis databinding custom types

2008-02-28 Thread Benson Margulies
In 2.1, you'd create a DefaultTypeMapping object, add your mappings, and
then push that into an AegisContext object. You'd then push the AegisContext
object into the AegisDatabinding object. You'll really need to be looking at
CXF source. Look at the AegisContext class and the AbstractEncodingTest
class.

CXF isn't my day job, so if you pile up some more questions for this evening
I'll answer them.



On Thu, Feb 28, 2008 at 8:13 AM, Tony Burdett [EMAIL PROTECTED] wrote:

 Hi Benson,

 Thanks for the response.  I've nothing to tie me to any particular
 version, so I'm more than happy to use a 2.1 snapshot.  I believe that
 all I actually need to do is configure my service to recognise the
 additional types I want it to use.  But where I would even start doing
 this I haven't any idea!

 Tony.


 Benson Margulies wrote:
  We're made a lot of changes in this area for 2.1. If you're willing to
 move
  to a 2.1 snapshot, I'm willing to work with you to figure out how to do
 what
  you need to do.
 
 
  On Thu, Feb 28, 2008 at 6:30 AM, Tony Burdett [EMAIL PROTECTED]
 wrote:
 
 
  Hi,
 
  I'm in the process of porting my service from xfire and I'm having some
  difficulties using a custom type that worked previously.  My service
  returns some pretty complex objects that have XML representations but
  don't readily serialize using the standard JAXB/Aegis databindings.
 
  In XFire I wrote some custom serializers (extending
  org.codehaus.xfire.aegis.type.Type) and by annotating my Service
  Interface using @XmlReturnType annotations.
 
  When I ported the project over to CXF, this functionality all seems to
  have been ported, so I'm able to annotate my service with
  org.apache.cxf.aegis.type.java5.XmlParamType annotations and I've
  adapted the custom type serializers I'd written to extend
  org.apache.cxf.aegis.type.Type.
 
  My service is configured using JAX-WS annotations and a spring config
  file, similar to the xfire migration docs.  When I was using XFire, I
  had the required configuration elements in services.xml to initialize
 my
  custom types.  But I can't figure out what the equivalent is in CXF.
  Presumably I need to add the relevant bits to my spring configuration
  xml but I'm not sure what these bits are!  Can anyone point me in the
  right direction?
 
  Thanks in advance,
 
  Tony Burdett.
 
  --
  Tony Burdett
  Software Developer,
  ComparaGrid.
 
  European Bioinformatics Institute
  email: [EMAIL PROTECTED]
  tel:   01223 494624
 
 
 
 
 


 --
 Tony Burdett
 Software Developer,
 ComparaGrid.

 European Bioinformatics Institute
 email: [EMAIL PROTECTED]
 tel:   01223 494624




Re: JAX-WS client proxy returning nulls

2008-02-26 Thread Benson Margulies
Get rid of the service configuration on the server, or add it to the client.
It changes the rules for mapping packages to and from namespaces. I rewrote
the doc over the last few days to deconfuse this.

On Tue, Feb 26, 2008 at 9:03 AM, Tony Burdett [EMAIL PROTECTED] wrote:

 Benson,

 Thanks for the tips.  I have enabled AegisServiceConfiguration on the
 server side, yes, and I admit I was wondered if this was causing the
 problem.  I had found these docs before and I'd used them to set up
 things on the server side (although it's possible I'm doing this wrong),
 and I've tried tweaking things based on the new stuff in the Aegis
 docs.  I still haven't managed to solve the problem, though.

 The thing that was puzzling me is that the SOAP messages being
 sent/received seem to be correct.  I assume this means that my service
 is configured correctly, and that I haven't set the client up to
 correctly interpret the response - but I've tried directing my client to
 use the Aegis databinding in a variety of ways and still seem to be
 getting this null problem.  If I'm doing it incorrectly, does anyone
 have any code examples of how to do this?

 I can provide more details about my service/client configuration if that
 will help.

 Thanks again,

 Tony.



 Benson Margulies wrote:
  Tony,
 
  Please check out the current (newly modified) Aegis doc. Perhaps you
 have
  the 'AegisServiceConfiguration' enabled on the server side?
 
 
 
  On Tue, Feb 26, 2008 at 6:08 AM, Tony Burdett [EMAIL PROTECTED]
 wrote:
 
 
  Hi,
 
  I'm having a problem trying to build a client for my service with cxf.
  My service is up and running, but whenever I try and access it from a
  client I'm getting null pointer exceptions.  The code to setup my
 client
  looks like this:
 
 // SNIP
 JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
 
 proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
 proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
 
 proxyFactory.setServiceClass(FluxionService.class);
 proxyFactory.setAddress(serviceURL);
 proxyFactory.setDataBinding(new AegisDatabinding());
 
 FluxionService fs = (FluxionService)proxyFactory.create();
 // SNIP
 
  Now, I should be able to do:
 
 SetURI uris = fs.getDataSources();
 
  to retrieve a set of URIs from this service.  When I make this call, I
  get the following SOAP request and response:
 
  Request:
 
   soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
 soap:Body
   ns1:getDataSources
  xmlns:ns1=http://service.fluxion.comparagrid.org/; /
 /soap:Body
   /soap:Envelope
 
  Response:
 
   soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
 soap:Body
   ns1:getDataSourcesResponse
  xmlns:ns1=http://service.fluxion.comparagrid.org/;
 return
   ns2:anyURI
  xmlns:ns2=http://impl.service.fluxion.comparagrid.org/;
 http://metagenome.ncl.ac.uk/cgdemo.owl
   /ns2:anyURI
 /return
   /ns1:getDataSourcesResponse
 /soap:Body
   /soap:Envelope
 
  That's exactly what I'd expect.  However, the actual SetURI returned
  in my app is null, so I'm seeing NPEs whenever I try and iterate over
  this set.  What's going on here? I'm relatively new to CXF as I've just
  ported over from XFire so I'm prepared to admit that I might be missing
  something fundamental but this looks pretty weird to me.
 
  Any advice would be highly appreciated as this is driving me mad!
 
  Thanks,
 
  Tony
 
  --
  Tony Burdett
  Software Developer,
  ComparaGrid.
 
  European Bioinformatics Institute
  email: [EMAIL PROTECTED]
  tel:   01223 494624
 
 
 
 
 





Re: How to pass a HashMap

2008-02-25 Thread Benson Margulies
Please try my suggestion of declaring MapType,Type in your SEI instead of
just 'map'.


On Mon, Feb 25, 2008 at 10:04 AM, Li, Weiye [EMAIL PROTECTED] wrote:

 Should be the latest one:2.0.4
 Thanks for the reply.


 On 2/23/08 11:49 AM, Benson Margulies [EMAIL PROTECTED] wrote:

 What version of CXF have you got?


 On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye [EMAIL PROTECTED] wrote:

  The CXF document says that Aegis data binding can even works on Map. I
  tried this, but it always return an empty one. Here's my testing codes.
 Did
  I miss something? Or I need to write special config file?
 
 
 
 
  @WebService(name=EmicroManager, targetNamespace=http://test.emicro )
  @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle=
  ParameterStyle.WRAPPED)
  public interface EmicroService {
   @WebMethod
   @RequestWrapper(className=test.model.Employee,
   localName=employee, targetNamespace=
  http://test.emicro/types )
   @Oneway
   public void addEmployee(Employee emp);
 
 
   @WebMethod(operationName=getEmployeesAsMap)
   @ResponseWrapper(className=java.util.HashMap,
   localName=EmployeesMap, targetNamespace=
  http://test.emicro/types;)
   public Map getEmployeesMap();
 
  }
 
 
 
 
 
  public static void main(String args[]) throws Exception {
 
   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
 
   factory.setServiceClass(test.EmicroService.class);
 
   factory.setAddress(http://localhost:9080/emicro-ws/EmicroService
 );
 
   factory.getServiceFactory().setDataBinding(new AegisDatabinding());
 
 
 
   EmicroService client = (EmicroService)factory.create();
 
 
 
 // add 2 employees here, then
 
 
 
 MapInteger, Employee emap = client.getEmployeesMap();
 
 logger.info(emap);
 
 
 
 System.exit(0);
 
 }
 
 
 
  The backend configuration is just following the CXF tutorial
  bean id=aegisBean class=
  org.apache.cxf.aegis.databinding.AegisDatabinding scope=prototype/
 
 
 
   bean id=jaxws-and-aegis-service-factory
 
 class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
  scope=prototype
 
 property name=dataBinding ref=aegisBean /
 
 property name=serviceConfigurations
 
   list
 
 bean class=
  org.apache.cxf.jaxws.support.JaxWsServiceConfiguration /
 
 bean class=
  org.apache.cxf.aegis.databinding.AegisServiceConfiguration /
 
 bean class=
  org.apache.cxf.service.factory.DefaultServiceConfiguration /
 
   /list
 
 /property
 
   /bean
 
 
 
 
 
   bean id=emicro class=org.stjude.ri.emicro.ws.EmicroServiceImpl
  /
 
 
 
   jaxws:endpoint id=helloWorld implementor=#emicro
  address=/EmicroService
 
 jaxws:serviceFactory
 
   ref bean='jaxws-and-aegis-service-factory' /
 
 /jaxws:serviceFactory
 
   /jaxws:endpoint
 
 
 
 
 
  Any advice? Thanks
 
 
 






Re: How to work with document type?

2008-02-25 Thread Benson Margulies
If you get rid of all your JAX-WS annotations except @WebParam, which are
not needed for CXF, you won't get this error. I tried it with your test
case.

On Mon, Feb 25, 2008 at 10:35 AM, Li, Weiye [EMAIL PROTECTED] wrote:

 My testing Jax-WS with Aegis worked only with RPC style. When I changed
 soapbinding with RPC style, the same codes give exception. Here's my WS
 file:

 @WebService(name=EmicroManager, targetNamespace=http://emicro.test;)
 @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=
 ParameterStyle.WRAPPED) public interface EmicroService {
 .
 }

 When client tried to use the service: ws.addEmployee(Employee) or any
 other method, exception thrown as:
 Feb 25, 2008 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChaindoIntercept 
 INFO: Interceptor has thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault: NO_MESSAGE_FOR_PARTat
 org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(
 XMLStreamDataWriter.java:72)at
 org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(
 XMLStreamDataWriter.java:45)at
 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(
 AbstractOutDatabindingInterceptor.java:93)at
 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(
 BareOutInterceptor.java:68)at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
 PhaseInterceptorChain.java:208)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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
  at $Proxy24.addEmployee(Unknown Source)


 Where the Employee extends a base class People. Both of them are
 simple Java bean.

 The same codes works if I change DOCUMENT to RPC. I believe I must miss
 something, but what's that?
 Help?

 Thanks.




Re: best practices for Map and List in webservices

2008-02-25 Thread Benson Margulies
Maps are hard. JAXB barely support them, with a ton of snails, in 2.1. I
would personally recommend specifying a vector or list of pairs instead.

On Mon, Feb 25, 2008 at 6:24 PM, Daniel Lipofsky 
[EMAIL PROTECTED] wrote:

 I have got some WebServices that basically take and return
 MapString,String and ListString.  I am wondering what is
 considered the best way to do this, especially for interoperability
 with both Java and .NET.  I don't have to use the Java collections
 (although it sure is convenient).  Previously we used WebMethods Glue
 which provided this for us, but I understand it was not great for
 interoperability.

 Thanks,
 Dan



Re: MTOM attachments question

2008-02-24 Thread Benson Margulies
I'm sorry, my head was on sideways. I was confusing the WSDL extension with
the xmime stuff (xmime:base64Binary) that goes on the wire.

On Sat, Feb 23, 2008 at 2:48 PM, Glen Mazza [EMAIL PROTECTED] wrote:

 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: How to pass a HashMap

2008-02-24 Thread Benson Margulies
It does work. But you have to tell it what's in the map. Either declare the
type as

MapA,B, or use a .aegis.xml file to tell it.

On Sat, Feb 23, 2008 at 1:39 PM, Benson Margulies [EMAIL PROTECTED]
wrote:

 I'm fairly sure I see what the problem is here. You need to either declare
 your map with generic args, or use a .aegis.xml file to specify the types.

 On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye [EMAIL PROTECTED] wrote:

  The CXF document says that Aegis data binding can even works on Map. I
  tried this, but it always return an empty one. Here's my testing codes. Did
  I miss something? Or I need to write special config file?
 
 
 
 
  @WebService(name=EmicroManager, targetNamespace=http://test.emicro )
  @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle=
  ParameterStyle.WRAPPED)
  public interface EmicroService {
   @WebMethod
   @RequestWrapper(className=test.model.Employee,
   localName=employee, targetNamespace=
  http://test.emicro/types )
   @Oneway
   public void addEmployee(Employee emp);
 
 
   @WebMethod(operationName=getEmployeesAsMap)
   @ResponseWrapper(className=java.util.HashMap,
   localName=EmployeesMap, targetNamespace=
  http://test.emicro/types;)
   public Map getEmployeesMap();
 
  }
 
 
 
 
 
  public static void main(String args[]) throws Exception {
 
   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
 
   factory.setServiceClass(test.EmicroService.class);
 
   factory.setAddress(http://localhost:9080/emicro-ws/EmicroService
  );
 
   factory.getServiceFactory().setDataBinding(new AegisDatabinding());
 
 
 
   EmicroService client = (EmicroService)factory.create();
 
 
 
 // add 2 employees here, then
 
 
 
 MapInteger, Employee emap = client.getEmployeesMap();
 
 logger.info(emap);
 
 
 
 System.exit(0);
 
 }
 
 
 
  The backend configuration is just following the CXF tutorial
  bean id=aegisBean class=
  org.apache.cxf.aegis.databinding.AegisDatabinding scope=prototype/
 
 
 
   bean id=jaxws-and-aegis-service-factory
 
 class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
  scope=prototype
 
 property name=dataBinding ref=aegisBean /
 
 property name=serviceConfigurations
 
   list
 
 bean class=
  org.apache.cxf.jaxws.support.JaxWsServiceConfiguration /
 
 bean class=
  org.apache.cxf.aegis.databinding.AegisServiceConfiguration /
 
 bean class=
  org.apache.cxf.service.factory.DefaultServiceConfiguration /
 
   /list
 
 /property
 
   /bean
 
 
 
 
 
   bean id=emicro class=org.stjude.ri.emicro.ws.EmicroServiceImpl
  /
 
 
 
   jaxws:endpoint id=helloWorld implementor=#emicro
  address=/EmicroService
 
 jaxws:serviceFactory
 
   ref bean='jaxws-and-aegis-service-factory' /
 
 /jaxws:serviceFactory
 
   /jaxws:endpoint
 
 
 
 
 
  Any advice? Thanks
 
 
 



Re: How to pass a HashMap

2008-02-23 Thread Benson Margulies
What version of CXF have you got?


On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye [EMAIL PROTECTED] wrote:

 The CXF document says that Aegis data binding can even works on Map. I
 tried this, but it always return an empty one. Here's my testing codes. Did
 I miss something? Or I need to write special config file?




 @WebService(name=EmicroManager, targetNamespace=http://test.emicro )
 @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle=
 ParameterStyle.WRAPPED)
 public interface EmicroService {
  @WebMethod
  @RequestWrapper(className=test.model.Employee,
  localName=employee, targetNamespace=
 http://test.emicro/types )
  @Oneway
  public void addEmployee(Employee emp);


  @WebMethod(operationName=getEmployeesAsMap)
  @ResponseWrapper(className=java.util.HashMap,
  localName=EmployeesMap, targetNamespace=
 http://test.emicro/types;)
  public Map getEmployeesMap();

 }





 public static void main(String args[]) throws Exception {

  JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

  factory.setServiceClass(test.EmicroService.class);

  factory.setAddress(http://localhost:9080/emicro-ws/EmicroService;);

  factory.getServiceFactory().setDataBinding(new AegisDatabinding());



  EmicroService client = (EmicroService)factory.create();



// add 2 employees here, then



MapInteger, Employee emap = client.getEmployeesMap();

logger.info(emap);



System.exit(0);

}



 The backend configuration is just following the CXF tutorial
 bean id=aegisBean class=
 org.apache.cxf.aegis.databinding.AegisDatabinding scope=prototype/



  bean id=jaxws-and-aegis-service-factory

class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
 scope=prototype

property name=dataBinding ref=aegisBean /

property name=serviceConfigurations

  list

bean class=
 org.apache.cxf.jaxws.support.JaxWsServiceConfiguration /

bean class=
 org.apache.cxf.aegis.databinding.AegisServiceConfiguration /

bean class=
 org.apache.cxf.service.factory.DefaultServiceConfiguration /

  /list

/property

  /bean





  bean id=emicro class=org.stjude.ri.emicro.ws.EmicroServiceImpl
 /



  jaxws:endpoint id=helloWorld implementor=#emicro
 address=/EmicroService

jaxws:serviceFactory

  ref bean='jaxws-and-aegis-service-factory' /

/jaxws:serviceFactory

  /jaxws:endpoint





 Any advice? Thanks





Re: How to pass a HashMap

2008-02-23 Thread Benson Margulies
I've reproduced this.

On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye [EMAIL PROTECTED] wrote:

 The CXF document says that Aegis data binding can even works on Map. I
 tried this, but it always return an empty one. Here's my testing codes. Did
 I miss something? Or I need to write special config file?




 @WebService(name=EmicroManager, targetNamespace=http://test.emicro )
 @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle=
 ParameterStyle.WRAPPED)
 public interface EmicroService {
  @WebMethod
  @RequestWrapper(className=test.model.Employee,
  localName=employee, targetNamespace=
 http://test.emicro/types )
  @Oneway
  public void addEmployee(Employee emp);


  @WebMethod(operationName=getEmployeesAsMap)
  @ResponseWrapper(className=java.util.HashMap,
  localName=EmployeesMap, targetNamespace=
 http://test.emicro/types;)
  public Map getEmployeesMap();

 }





 public static void main(String args[]) throws Exception {

  JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

  factory.setServiceClass(test.EmicroService.class);

  factory.setAddress(http://localhost:9080/emicro-ws/EmicroService;);

  factory.getServiceFactory().setDataBinding(new AegisDatabinding());



  EmicroService client = (EmicroService)factory.create();



// add 2 employees here, then



MapInteger, Employee emap = client.getEmployeesMap();

logger.info(emap);



System.exit(0);

}



 The backend configuration is just following the CXF tutorial
 bean id=aegisBean class=
 org.apache.cxf.aegis.databinding.AegisDatabinding scope=prototype/



  bean id=jaxws-and-aegis-service-factory

class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
 scope=prototype

property name=dataBinding ref=aegisBean /

property name=serviceConfigurations

  list

bean class=
 org.apache.cxf.jaxws.support.JaxWsServiceConfiguration /

bean class=
 org.apache.cxf.aegis.databinding.AegisServiceConfiguration /

bean class=
 org.apache.cxf.service.factory.DefaultServiceConfiguration /

  /list

/property

  /bean





  bean id=emicro class=org.stjude.ri.emicro.ws.EmicroServiceImpl
 /



  jaxws:endpoint id=helloWorld implementor=#emicro
 address=/EmicroService

jaxws:serviceFactory

  ref bean='jaxws-and-aegis-service-factory' /

/jaxws:serviceFactory

  /jaxws:endpoint





 Any advice? Thanks





Re: How to pass a HashMap

2008-02-23 Thread Benson Margulies
This is now CXF-1451. Please comment there, but mostly stand by whilst I try
to make some sense of it.

On Sat, Feb 23, 2008 at 1:11 PM, Benson Margulies [EMAIL PROTECTED]
wrote:

 I've reproduced this.

 On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye [EMAIL PROTECTED] wrote:

  The CXF document says that Aegis data binding can even works on Map. I
  tried this, but it always return an empty one. Here's my testing codes. Did
  I miss something? Or I need to write special config file?
 
 
 
 
  @WebService(name=EmicroManager, targetNamespace=http://test.emicro )
  @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle=
  ParameterStyle.WRAPPED)
  public interface EmicroService {
   @WebMethod
   @RequestWrapper(className=test.model.Employee,
   localName=employee, targetNamespace=
  http://test.emicro/types )
   @Oneway
   public void addEmployee(Employee emp);
 
 
   @WebMethod(operationName=getEmployeesAsMap)
   @ResponseWrapper(className=java.util.HashMap,
   localName=EmployeesMap, targetNamespace=
  http://test.emicro/types;)
   public Map getEmployeesMap();
 
  }
 
 
 
 
 
  public static void main(String args[]) throws Exception {
 
   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
 
   factory.setServiceClass(test.EmicroService.class);
 
   factory.setAddress(http://localhost:9080/emicro-ws/EmicroService
  );
 
   factory.getServiceFactory().setDataBinding(new AegisDatabinding());
 
 
 
   EmicroService client = (EmicroService)factory.create();
 
 
 
 // add 2 employees here, then
 
 
 
 MapInteger, Employee emap = client.getEmployeesMap();
 
 logger.info(emap);
 
 
 
 System.exit(0);
 
 }
 
 
 
  The backend configuration is just following the CXF tutorial
  bean id=aegisBean class=
  org.apache.cxf.aegis.databinding.AegisDatabinding scope=prototype/
 
 
 
   bean id=jaxws-and-aegis-service-factory
 
 class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
  scope=prototype
 
 property name=dataBinding ref=aegisBean /
 
 property name=serviceConfigurations
 
   list
 
 bean class=
  org.apache.cxf.jaxws.support.JaxWsServiceConfiguration /
 
 bean class=
  org.apache.cxf.aegis.databinding.AegisServiceConfiguration /
 
 bean class=
  org.apache.cxf.service.factory.DefaultServiceConfiguration /
 
   /list
 
 /property
 
   /bean
 
 
 
 
 
   bean id=emicro class=org.stjude.ri.emicro.ws.EmicroServiceImpl
  /
 
 
 
   jaxws:endpoint id=helloWorld implementor=#emicro
  address=/EmicroService
 
 jaxws:serviceFactory
 
   ref bean='jaxws-and-aegis-service-factory' /
 
 /jaxws:serviceFactory
 
   /jaxws:endpoint
 
 
 
 
 
  Any advice? Thanks
 
 
 



Re: How to pass a HashMap

2008-02-23 Thread Benson Margulies
I'm fairly sure I see what the problem is here. You need to either declare
your map with generic args, or use a .aegis.xml file to specify the types.

On Fri, Feb 22, 2008 at 4:39 PM, Li, Weiye [EMAIL PROTECTED] wrote:

 The CXF document says that Aegis data binding can even works on Map. I
 tried this, but it always return an empty one. Here's my testing codes. Did
 I miss something? Or I need to write special config file?




 @WebService(name=EmicroManager, targetNamespace=http://test.emicro )
 @SOAPBinding(style=Style.RPC, use=Use.LITERAL, parameterStyle=
 ParameterStyle.WRAPPED)
 public interface EmicroService {
  @WebMethod
  @RequestWrapper(className=test.model.Employee,
  localName=employee, targetNamespace=
 http://test.emicro/types )
  @Oneway
  public void addEmployee(Employee emp);


  @WebMethod(operationName=getEmployeesAsMap)
  @ResponseWrapper(className=java.util.HashMap,
  localName=EmployeesMap, targetNamespace=
 http://test.emicro/types;)
  public Map getEmployeesMap();

 }





 public static void main(String args[]) throws Exception {

  JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

  factory.setServiceClass(test.EmicroService.class);

  factory.setAddress(http://localhost:9080/emicro-ws/EmicroService;);

  factory.getServiceFactory().setDataBinding(new AegisDatabinding());



  EmicroService client = (EmicroService)factory.create();



// add 2 employees here, then



MapInteger, Employee emap = client.getEmployeesMap();

logger.info(emap);



System.exit(0);

}



 The backend configuration is just following the CXF tutorial
 bean id=aegisBean class=
 org.apache.cxf.aegis.databinding.AegisDatabinding scope=prototype/



  bean id=jaxws-and-aegis-service-factory

class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
 scope=prototype

property name=dataBinding ref=aegisBean /

property name=serviceConfigurations

  list

bean class=
 org.apache.cxf.jaxws.support.JaxWsServiceConfiguration /

bean class=
 org.apache.cxf.aegis.databinding.AegisServiceConfiguration /

bean class=
 org.apache.cxf.service.factory.DefaultServiceConfiguration /

  /list

/property

  /bean





  bean id=emicro class=org.stjude.ri.emicro.ws.EmicroServiceImpl
 /



  jaxws:endpoint id=helloWorld implementor=#emicro
 address=/EmicroService

jaxws:serviceFactory

  ref bean='jaxws-and-aegis-service-factory' /

/jaxws:serviceFactory

  /jaxws:endpoint





 Any advice? Thanks





Re: Aegis DataBinding does not work

2008-02-21 Thread Benson Margulies
What version of CXF?

On Thu, Feb 21, 2008 at 11:36 AM, [EMAIL PROTECTED] wrote:

 Hi
 I have configured the CXF demo.spring.HelloWorld using Aegis DataBinding
 as per instructions found at
 http://cwiki.apache.org/CXF20DOC/aegis-databinding.html
 When I run my client I am receiving the following error
 [21.02.08 17:26:16:939 CET] 0031 PhaseIntercep I
 org.apache.cxf.phase.PhaseInterceptorChain doIntercept Interceptor has
 thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault: Message part
 {http://pojo.spring.demo/}sayHi http://pojo.spring.demo/%7DsayHi was not
 recognized.

 Can anyone help me?

 Cheers
 Tezcan
 ---
 Here is the client code
 
 ClientProxyFactoryBean factory = new ClientProxyFactoryBean();

 factory.getInInterceptors().add(new LoggingInInterceptor());
 factory.getOutInterceptors().add(new LoggingOutInterceptor());
 factory.setServiceClass(HelloWorldPojo.class);
 factory.setAddress(http://localhost:9080/Test_Pojo_WebApp/HelloWorldPoj
 o);
 factory.getServiceFactory().setDataBinding(new AegisDatabinding());
 HelloWorldPojo client = (HelloWorldPojo) factory.create();
 String reply = client.sayHi(Tex);
 ---
 Here is the client log
 --
 INFO: Outbound Message
 --
 soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:s
 ayHi xmlns:ns1=http://pojo.spring.demo/;arg0
 xmlns=http://pojo.spring.demo/;Tex/arg0/ns1:sayHi/soap:Body/soa
 p:Envelope
 --
 21.02.2008 17:26:17 org.apache.cxf.interceptor.LoggingInInterceptor
 handleMessage
 INFO: Inbound Message
 --
 soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Bodysoap:
 Faultfaultcodesoap:Client/faultcodefaultstringMessage part
 {http://pojo.spring.demo/}sayHi http://pojo.spring.demo/%7DsayHi was not
 recognized./faultstring/soap:Fault/soap:Body/soap:Envelope
 --
 org.apache.cxf.binding.soap.SoapFault: Message part
 {http://pojo.spring.demo/}sayHi http://pojo.spring.demo/%7DsayHi was not
 recognized.
 ---
 Here is the spring config
 ---
 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-2.0.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=aegisBean
 class=org.apache.cxf.aegis.databinding.AegisDatabinding
 scope=prototype/

bean id=jaxws-and-aegis-service-factory
class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
scope=prototype
property name=dataBinding ref=aegisBean/
 property name=serviceConfigurations
 list
   bean
 class=org.apache.cxf.jaxws.support.JaxWsServiceConfiguration/
   bean
 class=org.apache.cxf.aegis.databinding.AegisServiceConfiguration/
   bean
 class=org.apache.cxf.service.factory.DefaultServiceConfiguration/
/list
/property
/bean

jaxws:endpoint id=helloWorldPojo
implementor=demo.spring.pojo.HelloWorldPojoImpl
 address=/HelloWorldPojo 
jaxws:serviceFactory
ref bean='jaxws-and-aegis-service-factory' /
/jaxws:serviceFactory
/jaxws:endpoint

 /beans



Re: Aegis DataBinding does not work

2008-02-21 Thread Benson Margulies
I think I see. You've got a JAX-WS+JAXB service, and you're trying to talk
to it with an Aegis client, using the same SEI. That's not going to match
up. It's not very possible to use Aegis as the client to talk to something
else, as we don't have wsdl2java for Aegis, nor could we easily make one.

On Thu, Feb 21, 2008 at 12:16 PM, Benson Margulies [EMAIL PROTECTED]
wrote:

 What version of CXF?


 On Thu, Feb 21, 2008 at 11:36 AM, [EMAIL PROTECTED]
 wrote:

  Hi
  I have configured the CXF demo.spring.HelloWorld using Aegis DataBinding
  as per instructions found at
  http://cwiki.apache.org/CXF20DOC/aegis-databinding.html
  When I run my client I am receiving the following error
  [21.02.08 17:26:16:939 CET] 0031 PhaseIntercep I
  org.apache.cxf.phase.PhaseInterceptorChain doIntercept Interceptor has
  thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault: Message part
  {http://pojo.spring.demo/}sayHi http://pojo.spring.demo/%7DsayHi was
  not recognized.
 
  Can anyone help me?
 
  Cheers
  Tezcan
  ---
  Here is the client code
  
  ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
 
  factory.getInInterceptors().add(new LoggingInInterceptor());
  factory.getOutInterceptors().add(new LoggingOutInterceptor());
  factory.setServiceClass(HelloWorldPojo.class);
  factory.setAddress(http://localhost:9080/Test_Pojo_WebApp/HelloWorldPoj
  o);
  factory.getServiceFactory().setDataBinding(new AegisDatabinding());
  HelloWorldPojo client = (HelloWorldPojo) factory.create();
  String reply = client.sayHi(Tex);
  ---
  Here is the client log
  --
  INFO: Outbound Message
  --
  soap:Envelope
  xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:s
  ayHi xmlns:ns1=http://pojo.spring.demo/;arg0
  xmlns=http://pojo.spring.demo/;Tex/arg0/ns1:sayHi/soap:Body/soa
  p:Envelope
  --
  21.02.2008 17:26:17 org.apache.cxf.interceptor.LoggingInInterceptor
  handleMessage
  INFO: Inbound Message
  --
  soap:Envelope
  xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Bodysoap:
  Faultfaultcodesoap:Client/faultcodefaultstringMessage part
  {http://pojo.spring.demo/}sayHi http://pojo.spring.demo/%7DsayHi was
  not
  recognized./faultstring/soap:Fault/soap:Body/soap:Envelope
  --
  org.apache.cxf.binding.soap.SoapFault: Message part
  {http://pojo.spring.demo/}sayHi http://pojo.spring.demo/%7DsayHi was
  not recognized.
  ---
  Here is the spring config
  ---
  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-2.0.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=aegisBean
  class=org.apache.cxf.aegis.databinding.AegisDatabinding
  scope=prototype/
 
 bean id=jaxws-and-aegis-service-factory
 class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
 scope=prototype
 property name=dataBinding ref=aegisBean/
  property name=serviceConfigurations
  list
bean
  class=org.apache.cxf.jaxws.support.JaxWsServiceConfiguration/
bean
  class=org.apache.cxf.aegis.databinding.AegisServiceConfiguration/
bean
  class=org.apache.cxf.service.factory.DefaultServiceConfiguration/
 /list
 /property
 /bean
 
 jaxws:endpoint id=helloWorldPojo
 implementor=demo.spring.pojo.HelloWorldPojoImpl
  address=/HelloWorldPojo 
 jaxws:serviceFactory
 ref bean='jaxws-and-aegis-service-factory' /
 /jaxws:serviceFactory
 /jaxws:endpoint
 
  /beans
 




Re: Aegis DataBinding Problem - Error initializing parameters for operation

2008-02-21 Thread Benson Margulies
can you attach your class to a JIRA? Do you have a .aegis.xml file for your
SEI?

On Wed, Feb 20, 2008 at 11:01 AM, chengas123 [EMAIL PROTECTED]
wrote:


 Hi,
 I am getting Error initializing parameters for operation from Aegis.  I
 set it up through Spring.  The method it is referring to
 (getEmployeePrivilegesByUid) takes two Strings as arguments, so I'm not
 sure
 why it's having a problem.  I've included the stack trace below.

 Thanks,
 Ben



 2008-02-20 10:53:34 ContextLoader [ERROR] Context initialization failed
 org.springframework.beans.factory.BeanCreationException: Error creating
 bean
 with name 'auth': Invocation of init method failed; nested exception is
 org.apache.cxf.aegis.DatabindingException: Error initializing parameters
 for
 operation 
 {http://service.auth.sd.sherwin.com/}getEmployeePrivilegesByUidhttp://service.auth.sd.sherwin.com/%7DgetEmployeePrivilegesByUid
 :
 Caused by:
 org.apache.cxf.aegis.DatabindingException: Error initializing parameters
 for
 operation 
 {http://service.auth.sd.sherwin.com/}getEmployeePrivilegesByUidhttp://service.auth.sd.sherwin.com/%7DgetEmployeePrivilegesByUid
 :
at
 org.apache.cxf.aegis.type.DefaultTypeCreator.createCollectionType(
 DefaultTypeCreator.java:59)
at
 org.apache.cxf.aegis.type.java5.Java5TypeCreator.createCollectionType(
 Java5TypeCreator.java:137)
at
 org.apache.cxf.aegis.type.XMLTypeCreator.createCollectionType(
 XMLTypeCreator.java:241)
at
 org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(
 AbstractTypeCreator.java:114)
at
 org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(
 AegisDatabinding.java:455)
at
 org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(
 AegisDatabinding.java:257)
at
 org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(
 AegisDatabinding.java:221)
at
 org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(
 AegisDatabinding.java:154)
at

 org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass
 (ReflectionServiceFactoryBean.java:313)
at

 org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel
 (ReflectionServiceFactoryBean.java:362)
at
 org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(
 ReflectionServiceFactoryBean.java:156)
at
 org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(
 JaxWsServiceFactoryBean.java:89)
at
 org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
 AbstractWSDLBasedEndpointFactory.java:74)
at
 org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java
 :108)
at
 org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
 JaxWsServerFactoryBean.java:147)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java
 :299)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java
 :230)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:181)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:352)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
 (AbstractAutowireCapableBeanFactory.java:1240)
at

 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
 (AbstractAutowireCapableBeanFactory.java:1205)
at

 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
 (AbstractAutowireCapableBeanFactory.java:1171)
at

 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
 (AbstractAutowireCapableBeanFactory.java:425)
at
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
 AbstractBeanFactory.java:251)
at

 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:156)
at
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
 AbstractBeanFactory.java:248)
at
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
 AbstractBeanFactory.java:160)
at

 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
 (DefaultListableBeanFactory.java:287)
at
 org.springframework.context.support.AbstractApplicationContext.refresh(
 AbstractApplicationContext.java:352)
at
 org.springframework.web.context.ContextLoader.createWebApplicationContext(
 ContextLoader.java:244)
at
 

Re: how to configure HTTPConduit for client using java code

2008-02-15 Thread Benson Margulies
On Fri, Feb 15, 2008 at 10:17 AM, yulinxp [EMAIL PROTECTED] wrote:


 For server side, I understand. But I thought client shouldn't worry about
 the
 data binding at all.



 The CXF client has to use a data binding just like the server. How else
 can know how to map XML to Java for you.



Re: doesn client need to use AegisDatabinding if server does

2008-02-13 Thread Benson Margulies
No. If you get the WSDL from the server and feed it to whatever kit you
want, including CXF with JAXB, it works. Unless you find a bug. The Java you
get may be quite different from the Java on the server side, however.

On Feb 13, 2008 11:41 AM, yulinxp [EMAIL PROTECTED] wrote:


 If CXF server uses SimpleFront end/AegisBinding, does the cxf client need
 to
 use ClientProxyFactoryBean to set AegisDatabinding? I am very confused.


 --
 View this message in context:
 http://www.nabble.com/doesn-client-need-to-use-AegisDatabinding-if-server-does-tp15459869p15459869.html
 Sent from the cxf-user mailing list archive at Nabble.com.




Re: Issue with CXF: Marshalling Error: Error writing request body to server

2008-02-05 Thread Benson Margulies

On Tue, 2008-02-05 at 06:07 -0800, Tor Arne Kvaløy wrote:
 It's not big. 5808 bytes.
 

Please try it with the version of JAXB that CXF officially references.
If it still horks, please make a JIRA with a test case.




Re: how to get rid of arg0 in wsdl file

2008-02-05 Thread Benson Margulies

On Tue, 2008-02-05 at 11:07 -0500, Daniel Kulp wrote:
 On Tuesday 05 February 2008, yulinxp wrote:
  I am having those arg0 in the wsdl file.
  xsd:element minOccurs=0 name=arg0 type=xsd:string/
 
  I can use @WebParam(name=xxx) to annotate if using JAX-WS Frontend.
  But what do I do if for simple frontend?

Use .aegis.xml files to spec out the methods. That required Aegis
instead of JAXB.





Re: set Default minOccurs and nillable Parameters

2008-02-05 Thread Benson Margulies

On Tue, 2008-02-05 at 07:55 -0800, yulinxp wrote:
 This section explains how to set Default minOccurs and nillable Parameters
 using Java API.
 Is there anyway we could do it through xml file?
 
 http://cwiki.apache.org/CXF20DOC/aegis-databinding.html
 

Start from here, and add a Configuration bean to the AegisDatabinding.

simple:server id=aegis-service
serviceClass=org.apache.cxf.javascript.fortest.AegisService
address=http://localhost:8808/aegis;
simple:serviceBean
bean

class=org.apache.cxf.javascript.fortest.AegisServiceImpl /
/simple:serviceBean
simple:dataBinding
bean

class=org.apache.cxf.aegis.databinding.AegisDatabinding
/bean
/simple:dataBinding
simple:serviceFactory
bean

class='org.apache.cxf.service.factory.ReflectionServiceFactoryBean'
property name=properties
map
entry key=overrideTypesList
list

valueorg.apache.cxf.javascript.fortest.aegis.Mammal/value
/list
/entry
/map
/property
/bean
/simple:serviceFactory
/simple:server



Re: how to get rid of arg0 in wsdl file

2008-02-05 Thread Benson Margulies
?xml version=1.0 encoding=UTF-8?
!--
  Licensed to the v Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  License); you may not use this file except in compliance
  with the License. You may obtain a copy of the License at
 
  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
--
mappings xmlns:ns=http://fortest.cxf.apache.org;
  mapping name=ns:AegisService
method name=acceptAny
  parameter index=0 mappedName=before/
  parameter index=1 mappedName=anything/
/method
method name=acceptObjects
  parameter index=0 mappedName=anything/
/method
method name=acceptStrings
  parameter index=0 mappedName=anything/
/method
  /mapping
/mappings



On Tue, 2008-02-05 at 10:35 -0800, yulinxp wrote:
 I am using Aegis binding for simple frontend.
 Could you pls give me an example for  .aegis.xml files?
 
 
 
 
 Benson Margulies-4 wrote:
  
  
  On Tue, 2008-02-05 at 11:07 -0500, Daniel Kulp wrote:
  On Tuesday 05 February 2008, yulinxp wrote:
   I am having those arg0 in the wsdl file.
   xsd:element minOccurs=0 name=arg0 type=xsd:string/
  
   I can use @WebParam(name=xxx) to annotate if using JAX-WS Frontend.
   But what do I do if for simple frontend?
  
  Use .aegis.xml files to spec out the methods. That required Aegis
  instead of JAXB.
  
  
  
  
  
 



Re: How to use Mtom in Simple FrontEnd

2008-02-05 Thread Benson Margulies
Aegis will use MTOM whether you want it to or not if you have a
DataBinding object. I did some work on this for 2.1; your mileage may
vary with 2.0.4.

On Tue, 2008-02-05 at 13:52 -0800, yulinxp wrote:
 The mtom sample uses JAX-WS frontend and annotation.
 Wondering how to use for  Simple FrontEnd.



Re: Supressing generation of xs:extension against inheritance

2008-01-31 Thread Benson Margulies

On Thu, 2008-01-31 at 17:01 -0500, Daniel Kulp wrote:
 Honestly, looking at the jaxb spec, I don't see anything that would allow 
 that.Thats something you may want to ask on the jaxb lists:
 
 https://jaxb.dev.java.net/servlets/ProjectMailingListList
 
 There might be some hidden flag or something that could be used to set 
 it.  I don't really know.

(sort of) As per the blog posting I wrote at dssheep.blogspot.com, you
could consider the following methodology:

1) Use your current classes as sacrificial.
2) Edit the XSD until you like it.
3) Regenerate new classes.

The new classes will be redundant, but will that really hurt? You could
also whip up a set of facade wrappers that delegate your interfaces to
them.





Re: item with xmlns= testcase

2008-01-25 Thread Benson Margulies
The usual method is to attach it to a JIRA. Can you do that?

On Fri, 2008-01-25 at 13:05 +0100, Marco Piraccini wrote:
 I have created a test case for the problem, but every time i try to send
 to Dan or to cxf-user mailing list the mail with the TestCase, the mail
 returns back with the message:
 
 Remote host said: 552 Message rejected as it is spam (body)
 
 How can i send the zip (that's very small, 13k)?
 Marco.
 
 



Re: 2.0.2 to 2.0.3 causes NoClassDefFoundError: ExtensionDeserializer

2008-01-24 Thread Benson Margulies
Looks to me as if you have a too-old XmlSchema jar file.

On Thu, 2008-01-24 at 08:44 -0800, 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
 



Re: Creating and publishing services from wsdl

2008-01-23 Thread Benson Margulies

 
 Ideally I'd like to achieve all of this programatically - i.e. without
 having to knock together a big config file.

All that spring config corresponds to plain old Java objects. Some of
them are even specified by the JAX-WS specification :-) 

Beyond the stock JAXWS API, all of CXF can be configured
programmatically, so you can, indeed, stamp these things out like
cookies. See the user guide section on non-spring configuration.




Re: Creating and publishing services from wsdl

2008-01-23 Thread Benson Margulies

On Thu, 2008-01-24 at 12:54 +1000, Rob Barrett wrote:
 that's what i'm looking for - got a url?

See what the following page does for you. I'm not 100% sure that I'm
following your thread, but if you could express it in Spring, you can do
it here.

http://cwiki.apache.org/CXF20DOC/a-simple-jax-ws-service.html#AsimpleJAX-WSservice-Publishingyourservice


 
 
 On Jan 24, 2008 12:46 PM, Benson Margulies [EMAIL PROTECTED] wrote:
 
  
   Ideally I'd like to achieve all of this programatically - i.e. without
   having to knock together a big config file.
 
  All that spring config corresponds to plain old Java objects. Some of
  them are even specified by the JAX-WS specification :-)
 
  Beyond the stock JAXWS API, all of CXF can be configured
  programmatically, so you can, indeed, stamp these things out like
  cookies. See the user guide section on non-spring configuration.
 
 
 



Re: More than one Element in Request Wrapper?

2008-01-22 Thread Benson Margulies

On Tue, 2008-01-22 at 06:14 -0800, silithus wrote:
 This seems more blocking issue than we initally thought. We use Java first
 approach, and Cxf-2.0.3.
 
 For example when we use ListMyType etc we get that error, when we use
 ListJavaPrimitiveType everything goes ok.
 
 We would really appreciate any news/info regarding this: when it will be
 fixed (put into Cxf binary distro since it is already fixed
 https://issues.apache.org/jira/browse/WSCOMMONS-273), any workarounds, does
 this affect older stable versions of Cxf etc. Even if you dont plan to
 distribute in weeks to come it would be welcomed to know so we know what to
 expect, so we can either fix ourselves or move to the next library.

At last count, XmlSchema has not made a release containing this. They
have a lot of overhang of fixed issues unreleased while they wait for
some Axis release to complete.

Is there a CXF JIRA on this? I don't have enough context to be more
informative.

 
 With this one its highly doubtful we will get approval from management to
 use Cxf  in production(though its not Cxf direct problem), and would have to
 go to other solutions.
 
 Thanks 



Re: WebMethod parameter is null - JAXB binding failure?

2008-01-19 Thread Benson Margulies

On Fri, 2008-01-18 at 22:19 -0800, larry ruiz wrote:
 I was running with same case today, but since you didn't mention how did you
 generate the client... in my case I was using ClientProxyFactoryBean and it
 seems to be badly enconding the soap request like if it doesn't read the
 jaxws annotations, so I tried with JaxWsProxyFactoryBean and it worked!
 
 so I hope that my comments were helpful to you.

The ClientProxyFactoryBean is the simple front end, not JAX-WS at all.
By and large, you can't expect it to read JAX-WS annotations. 



  1   2   3   4   >