You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by clandestino_bgd <cl...@yahoo.co.uk> on 2008/03/08 17:20:50 UTC

RE: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Hi,
I have the problem and found this thread to be most relevant to it.
Inside a BPM system we currently build, there is a need to speify arbitrary
endpoint URL, supply parameters and hanlde results of the invocation.
Therefore I need some kind of dynamic client mechanism and here I am on CXF
forum:)

So, the problem is how I can dynamically invoke RPC encoded (legacy)
services. Since I cannot reimplement them, only thing I can get is their
WSDL. Ok, I understand CXF will not do the binding, but I tried old WSIF and
it does the job.

But I would like to have both CXF and WSIF dynamic clients and switch
between them depending on service WSDL. If I find operation to be RPC
encoded, I would use WSIF, in any other case I would use CXF dynamic client.
Does this make sense?
If yes, can you tell me what would be the best way to find out (method,
class in CXF or somewhere else) if service is RPC/encoded (or i.e, not
supported by CXF).

I am not much into WS technology, so I appologise in advance if I ask
something stupid.
Thanx
Milan.


Glen Mazza-2 wrote:
> 
> Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
>> Thanks for the answer James,
>> 
>> Unfortunately, I don't think that it would help because the exception is
>> thrown when the wsdl is parsed (using XJC I believe)...
>> 
> 
> With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the results
> are unsupported and undefined.  (You might as well try to have it parse
> a chicken.)
> 
> Glen
> 
>> Any other suggestions?
>> Thanks, 
>> 
>> Benjamin
>> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/question-about-http%3A--schemas.xmlsoap.org-soap-encoding--and-Dynamic-Client-tp13681086p15914205.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Benson Margulies <bi...@gmail.com>.
I think I'm confused.

The purpose of the dynamic client is to allow a client to talk to a service
without carrying any compiled code for the client's data model. The more
complicated the service, the less unlikely this is to be useful. If the
dynamic client creates a set of complex bean classes, you're going to have a
hard time getting things in and out of them.

If you have java code that you could feed to java2ws, then you don't need a
dynamic client, do you? In other words, if you have a Java interface for the
SEI, and classes that could correspond to the beans, you can write code with
Aegis (and even JAXB, though you would be handling the encoded stuff from
scratch) to map.

maybe I need to digest some more lunch to understand this.


On Wed, May 28, 2008 at 12:14 PM, Benjamin Coiffe <bc...@inforsense.com>
wrote:

> OK, what about that tool then: org.apache.cxf.tools.java2ws.JavaToWS
>
> The direct benefit of this is that you would be able to handle soap
> encodings (major/critical) with the dynamic client and to have a
> different service model (I guess) since you could set a different
> databinding (minor).
>
> In term of engineering, you would be reusing your tool stack from the
> top instead of hooking the dynamic client in some lower layers...
>
> Is it really worth the effort? I can't tell...
> But there are a few document/literal web services out there that still
> use soap encoding (although it was ditched by the WS-I group, right?).
> For example, http://www.chemspider.com/massspecapi.asmx?WSDL
> Let me know what you think!
>
>
> Benjamin Coiffe
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: 28 May 2008 16:59
> To: users@cxf.apache.org
> Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> and Dynamic Client
>
> That's very nearly what it does already.
>
> wsdl2java only supports JAXB, because it uses JAXB xjc facilities to
> generate code.
>
> That's  what the DynamicClientFactory does, too.
>
>
>
> On Wed, May 28, 2008 at 9:22 AM, Benjamin Coiffe
> <bc...@inforsense.com>
> wrote:
>
> > I am wondering if the DynamicClient could not be re-implemented to
> > better re-use your tools and other features.
> >
> > DynamicClientFactory.createClient could invoke wsdltojava, load the
> > ClientProxy using ClientProxyFactoryBean. Then, you return the Client
> > from the client proxy...The big deal is to find the Service among the
> > classes generated...
> > The interface would not have to change too much (maybe not at all).
> >
> > Does it sound realistic?
> >
> >
> > Benjamin Coiffe
> >
> >
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bimargulies@gmail.com]
> > Sent: 28 May 2008 12:36
> > To: users@cxf.apache.org
> > Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> > and Dynamic Client
> >
> > I don't think we can do this with the Dynamic client.
> >
> > The dynamic client uses the JAXB compiler to create classes on the fly
> > based
> > on your schema, and then the CXF JAXB data binding maps the data back
> > and
> > forth.
> >
> > We don't have any kind of code generator for Aegis. Are you really
> sure
> > that
> > you have to have a dynamic client? If not, you might be able to come
> up
> > with
> > a set of custom type mappings for Aegis that make use of the encoded
> > type
> > support that Dain added. You would type in the Java code for the
> beans,
> > and
> > then set up Aegis mappings for them.
> >
> > On Wed, May 28, 2008 at 7:20 AM, Benjamin Coiffe
> > <bc...@inforsense.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I would like to resurrect this thread once again!
> > > I understand that CXF does not support RPC/encoded AND soap
> encodings
> > > (not exactly the same thing, right...)
> > > But I have a Document/Literal ws using soap encodings and in
> > particular
> > > the soap-enc:arrayType. I read somewhere that Aegis DataBinding
> would
> > be
> > > the solution for this (in cxf 2.1) because at the moment, the basic
> > > Dynamic client fails to parse the wsdl:
> > >
> > > Caused by: java.lang.Exception: Error compiling schema from WSDL at
> > > {http://www.chemspider.com/MassSpecAPI.asmx?WSDL}: undefined simple
> or
> > > complex type 'soapenc:Array'
> > >        at
> > >
> >
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.
> > > error(DynamicClientFactory.java:470)
> > >        at
> > >
> >
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerIm
> > > pl.java:280)
> > >
> > > So, if aegis is the solution... how do I configure the
> > > dynamicclientfactory or the bus to use aegis when parsing the WSDL?
> > > Any ideas?
> > > Thanks
> > >
> > > Benjamin Coiffe
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Daniel Kulp [mailto:dkulp@apache.org]
> > > Sent: 10 March 2008 18:14
> > > To: cxf-user@incubator.apache.org
> > > Cc: clandestino_bgd
> > > Subject: Re: question about
> http://schemas.xmlsoap.org/soap/encoding/
> > > and Dynamic Client
> > >
> > >
> > >
> > > > If yes, can you tell me what would be the best way to find out
> > > > (method, class in CXF or somewhere else) if service is RPC/encoded
> > (or
> > > > i.e, not supported by CXF).
> > >
> > > Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not
> sure
> > if
> > >
> > > there is an easy way.  In theory, you should be able to grab the
> > > BindingOperaionInfo from the CXF model and check some flag on it,
> but
> > > I'm not exactly sure if we bother even recoding if it's
> > encoded/literal
> > > since we only support literal right now.
> > >
> > > That said, Dain started adding encoded support into the Aegis
> > > databinding
> > > so eventually we'll need to make sure it's recorded properly.   I'm
> > not
> > > sure if Dain has gotten that far yet though.
> > >
> > > Dan
> > >
> > >
> > >
> > > On Saturday 08 March 2008, clandestino_bgd wrote:
> > > > Hi,
> > > > I have the problem and found this thread to be most relevant to
> it.
> > > > Inside a BPM system we currently build, there is a need to speify
> > > > arbitrary endpoint URL, supply parameters and hanlde results of
> the
> > > > invocation. Therefore I need some kind of dynamic client mechanism
> > and
> > > > here I am on CXF forum:)
> > > >
> > > > So, the problem is how I can dynamically invoke RPC encoded
> (legacy)
> > > > services. Since I cannot reimplement them, only thing I can get is
> > > > their WSDL. Ok, I understand CXF will not do the binding, but I
> > tried
> > > > old WSIF and it does the job.
> > > >
> > > > But I would like to have both CXF and WSIF dynamic clients and
> > switch
> > > > between them depending on service WSDL. If I find operation to be
> > RPC
> > > > encoded, I would use WSIF, in any other case I would use CXF
> dynamic
> > > > client. Does this make sense?
> > > > If yes, can you tell me what would be the best way to find out
> > > > (method, class in CXF or somewhere else) if service is RPC/encoded
> > (or
> > > > i.e, not supported by CXF).
> > > >
> > > > I am not much into WS technology, so I appologise in advance if I
> > ask
> > > > something stupid.
> > > > Thanx
> > > > Milan.
> > > >
> > > > Glen Mazza-2 wrote:
> > > > > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> > > > >> Thanks for the answer James,
> > > > >>
> > > > >> Unfortunately, I don't think that it would help because the
> > > > >> exception is thrown when the wsdl is parsed (using XJC I
> > > > >> believe)...
> > > > >
> > > > > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > > > > results are unsupported and undefined.  (You might as well try
> to
> > > > > have it parse a chicken.)
> > > > >
> > > > > Glen
> > > > >
> > > > >> Any other suggestions?
> > > > >> Thanks,
> > > > >>
> > > > >> Benjamin
> > >
> > >
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer, IONA
> > > dkulp@apache.org
> > > http://www.dankulp.com/blog
> > >
> >
>

RE: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Benjamin Coiffe <bc...@inforsense.com>.
OK, what about that tool then: org.apache.cxf.tools.java2ws.JavaToWS

The direct benefit of this is that you would be able to handle soap
encodings (major/critical) with the dynamic client and to have a
different service model (I guess) since you could set a different
databinding (minor).

In term of engineering, you would be reusing your tool stack from the
top instead of hooking the dynamic client in some lower layers...

Is it really worth the effort? I can't tell...
But there are a few document/literal web services out there that still
use soap encoding (although it was ditched by the WS-I group, right?).
For example, http://www.chemspider.com/massspecapi.asmx?WSDL
Let me know what you think!


Benjamin Coiffe



-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: 28 May 2008 16:59
To: users@cxf.apache.org
Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
and Dynamic Client

That's very nearly what it does already.

wsdl2java only supports JAXB, because it uses JAXB xjc facilities to
generate code.

That's  what the DynamicClientFactory does, too.



On Wed, May 28, 2008 at 9:22 AM, Benjamin Coiffe
<bc...@inforsense.com>
wrote:

> I am wondering if the DynamicClient could not be re-implemented to
> better re-use your tools and other features.
>
> DynamicClientFactory.createClient could invoke wsdltojava, load the
> ClientProxy using ClientProxyFactoryBean. Then, you return the Client
> from the client proxy...The big deal is to find the Service among the
> classes generated...
> The interface would not have to change too much (maybe not at all).
>
> Does it sound realistic?
>
>
> Benjamin Coiffe
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: 28 May 2008 12:36
> To: users@cxf.apache.org
> Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> and Dynamic Client
>
> I don't think we can do this with the Dynamic client.
>
> The dynamic client uses the JAXB compiler to create classes on the fly
> based
> on your schema, and then the CXF JAXB data binding maps the data back
> and
> forth.
>
> We don't have any kind of code generator for Aegis. Are you really
sure
> that
> you have to have a dynamic client? If not, you might be able to come
up
> with
> a set of custom type mappings for Aegis that make use of the encoded
> type
> support that Dain added. You would type in the Java code for the
beans,
> and
> then set up Aegis mappings for them.
>
> On Wed, May 28, 2008 at 7:20 AM, Benjamin Coiffe
> <bc...@inforsense.com>
> wrote:
>
> > Hi,
> >
> > I would like to resurrect this thread once again!
> > I understand that CXF does not support RPC/encoded AND soap
encodings
> > (not exactly the same thing, right...)
> > But I have a Document/Literal ws using soap encodings and in
> particular
> > the soap-enc:arrayType. I read somewhere that Aegis DataBinding
would
> be
> > the solution for this (in cxf 2.1) because at the moment, the basic
> > Dynamic client fails to parse the wsdl:
> >
> > Caused by: java.lang.Exception: Error compiling schema from WSDL at
> > {http://www.chemspider.com/MassSpecAPI.asmx?WSDL}: undefined simple
or
> > complex type 'soapenc:Array'
> >        at
> >
>
org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.
> > error(DynamicClientFactory.java:470)
> >        at
> >
>
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerIm
> > pl.java:280)
> >
> > So, if aegis is the solution... how do I configure the
> > dynamicclientfactory or the bus to use aegis when parsing the WSDL?
> > Any ideas?
> > Thanks
> >
> > Benjamin Coiffe
> >
> >
> >
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: 10 March 2008 18:14
> > To: cxf-user@incubator.apache.org
> > Cc: clandestino_bgd
> > Subject: Re: question about
http://schemas.xmlsoap.org/soap/encoding/
> > and Dynamic Client
> >
> >
> >
> > > If yes, can you tell me what would be the best way to find out
> > > (method, class in CXF or somewhere else) if service is RPC/encoded
> (or
> > > i.e, not supported by CXF).
> >
> > Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not
sure
> if
> >
> > there is an easy way.  In theory, you should be able to grab the
> > BindingOperaionInfo from the CXF model and check some flag on it,
but
> > I'm not exactly sure if we bother even recoding if it's
> encoded/literal
> > since we only support literal right now.
> >
> > That said, Dain started adding encoded support into the Aegis
> > databinding
> > so eventually we'll need to make sure it's recorded properly.   I'm
> not
> > sure if Dain has gotten that far yet though.
> >
> > Dan
> >
> >
> >
> > On Saturday 08 March 2008, clandestino_bgd wrote:
> > > Hi,
> > > I have the problem and found this thread to be most relevant to
it.
> > > Inside a BPM system we currently build, there is a need to speify
> > > arbitrary endpoint URL, supply parameters and hanlde results of
the
> > > invocation. Therefore I need some kind of dynamic client mechanism
> and
> > > here I am on CXF forum:)
> > >
> > > So, the problem is how I can dynamically invoke RPC encoded
(legacy)
> > > services. Since I cannot reimplement them, only thing I can get is
> > > their WSDL. Ok, I understand CXF will not do the binding, but I
> tried
> > > old WSIF and it does the job.
> > >
> > > But I would like to have both CXF and WSIF dynamic clients and
> switch
> > > between them depending on service WSDL. If I find operation to be
> RPC
> > > encoded, I would use WSIF, in any other case I would use CXF
dynamic
> > > client. Does this make sense?
> > > If yes, can you tell me what would be the best way to find out
> > > (method, class in CXF or somewhere else) if service is RPC/encoded
> (or
> > > i.e, not supported by CXF).
> > >
> > > I am not much into WS technology, so I appologise in advance if I
> ask
> > > something stupid.
> > > Thanx
> > > Milan.
> > >
> > > Glen Mazza-2 wrote:
> > > > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> > > >> Thanks for the answer James,
> > > >>
> > > >> Unfortunately, I don't think that it would help because the
> > > >> exception is thrown when the wsdl is parsed (using XJC I
> > > >> believe)...
> > > >
> > > > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > > > results are unsupported and undefined.  (You might as well try
to
> > > > have it parse a chicken.)
> > > >
> > > > Glen
> > > >
> > > >> Any other suggestions?
> > > >> Thanks,
> > > >>
> > > >> Benjamin
> >
> >
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer, IONA
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> >
>

Re: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Benson Margulies <bi...@gmail.com>.
That's very nearly what it does already.

wsdl2java only supports JAXB, because it uses JAXB xjc facilities to
generate code.

That's  what the DynamicClientFactory does, too.



On Wed, May 28, 2008 at 9:22 AM, Benjamin Coiffe <bc...@inforsense.com>
wrote:

> I am wondering if the DynamicClient could not be re-implemented to
> better re-use your tools and other features.
>
> DynamicClientFactory.createClient could invoke wsdltojava, load the
> ClientProxy using ClientProxyFactoryBean. Then, you return the Client
> from the client proxy...The big deal is to find the Service among the
> classes generated...
> The interface would not have to change too much (maybe not at all).
>
> Does it sound realistic?
>
>
> Benjamin Coiffe
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: 28 May 2008 12:36
> To: users@cxf.apache.org
> Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> and Dynamic Client
>
> I don't think we can do this with the Dynamic client.
>
> The dynamic client uses the JAXB compiler to create classes on the fly
> based
> on your schema, and then the CXF JAXB data binding maps the data back
> and
> forth.
>
> We don't have any kind of code generator for Aegis. Are you really sure
> that
> you have to have a dynamic client? If not, you might be able to come up
> with
> a set of custom type mappings for Aegis that make use of the encoded
> type
> support that Dain added. You would type in the Java code for the beans,
> and
> then set up Aegis mappings for them.
>
> On Wed, May 28, 2008 at 7:20 AM, Benjamin Coiffe
> <bc...@inforsense.com>
> wrote:
>
> > Hi,
> >
> > I would like to resurrect this thread once again!
> > I understand that CXF does not support RPC/encoded AND soap encodings
> > (not exactly the same thing, right...)
> > But I have a Document/Literal ws using soap encodings and in
> particular
> > the soap-enc:arrayType. I read somewhere that Aegis DataBinding would
> be
> > the solution for this (in cxf 2.1) because at the moment, the basic
> > Dynamic client fails to parse the wsdl:
> >
> > Caused by: java.lang.Exception: Error compiling schema from WSDL at
> > {http://www.chemspider.com/MassSpecAPI.asmx?WSDL}: undefined simple or
> > complex type 'soapenc:Array'
> >        at
> >
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.
> > error(DynamicClientFactory.java:470)
> >        at
> >
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerIm
> > pl.java:280)
> >
> > So, if aegis is the solution... how do I configure the
> > dynamicclientfactory or the bus to use aegis when parsing the WSDL?
> > Any ideas?
> > Thanks
> >
> > Benjamin Coiffe
> >
> >
> >
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: 10 March 2008 18:14
> > To: cxf-user@incubator.apache.org
> > Cc: clandestino_bgd
> > Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> > and Dynamic Client
> >
> >
> >
> > > If yes, can you tell me what would be the best way to find out
> > > (method, class in CXF or somewhere else) if service is RPC/encoded
> (or
> > > i.e, not supported by CXF).
> >
> > Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not sure
> if
> >
> > there is an easy way.  In theory, you should be able to grab the
> > BindingOperaionInfo from the CXF model and check some flag on it, but
> > I'm not exactly sure if we bother even recoding if it's
> encoded/literal
> > since we only support literal right now.
> >
> > That said, Dain started adding encoded support into the Aegis
> > databinding
> > so eventually we'll need to make sure it's recorded properly.   I'm
> not
> > sure if Dain has gotten that far yet though.
> >
> > Dan
> >
> >
> >
> > On Saturday 08 March 2008, clandestino_bgd wrote:
> > > Hi,
> > > I have the problem and found this thread to be most relevant to it.
> > > Inside a BPM system we currently build, there is a need to speify
> > > arbitrary endpoint URL, supply parameters and hanlde results of the
> > > invocation. Therefore I need some kind of dynamic client mechanism
> and
> > > here I am on CXF forum:)
> > >
> > > So, the problem is how I can dynamically invoke RPC encoded (legacy)
> > > services. Since I cannot reimplement them, only thing I can get is
> > > their WSDL. Ok, I understand CXF will not do the binding, but I
> tried
> > > old WSIF and it does the job.
> > >
> > > But I would like to have both CXF and WSIF dynamic clients and
> switch
> > > between them depending on service WSDL. If I find operation to be
> RPC
> > > encoded, I would use WSIF, in any other case I would use CXF dynamic
> > > client. Does this make sense?
> > > If yes, can you tell me what would be the best way to find out
> > > (method, class in CXF or somewhere else) if service is RPC/encoded
> (or
> > > i.e, not supported by CXF).
> > >
> > > I am not much into WS technology, so I appologise in advance if I
> ask
> > > something stupid.
> > > Thanx
> > > Milan.
> > >
> > > Glen Mazza-2 wrote:
> > > > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> > > >> Thanks for the answer James,
> > > >>
> > > >> Unfortunately, I don't think that it would help because the
> > > >> exception is thrown when the wsdl is parsed (using XJC I
> > > >> believe)...
> > > >
> > > > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > > > results are unsupported and undefined.  (You might as well try to
> > > > have it parse a chicken.)
> > > >
> > > > Glen
> > > >
> > > >> Any other suggestions?
> > > >> Thanks,
> > > >>
> > > >> Benjamin
> >
> >
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer, IONA
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> >
>

RE: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Benjamin Coiffe <bc...@inforsense.com>.
I am wondering if the DynamicClient could not be re-implemented to
better re-use your tools and other features.

DynamicClientFactory.createClient could invoke wsdltojava, load the
ClientProxy using ClientProxyFactoryBean. Then, you return the Client
from the client proxy...The big deal is to find the Service among the
classes generated...
The interface would not have to change too much (maybe not at all).

Does it sound realistic?


Benjamin Coiffe



-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: 28 May 2008 12:36
To: users@cxf.apache.org
Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
and Dynamic Client

I don't think we can do this with the Dynamic client.

The dynamic client uses the JAXB compiler to create classes on the fly
based
on your schema, and then the CXF JAXB data binding maps the data back
and
forth.

We don't have any kind of code generator for Aegis. Are you really sure
that
you have to have a dynamic client? If not, you might be able to come up
with
a set of custom type mappings for Aegis that make use of the encoded
type
support that Dain added. You would type in the Java code for the beans,
and
then set up Aegis mappings for them.

On Wed, May 28, 2008 at 7:20 AM, Benjamin Coiffe
<bc...@inforsense.com>
wrote:

> Hi,
>
> I would like to resurrect this thread once again!
> I understand that CXF does not support RPC/encoded AND soap encodings
> (not exactly the same thing, right...)
> But I have a Document/Literal ws using soap encodings and in
particular
> the soap-enc:arrayType. I read somewhere that Aegis DataBinding would
be
> the solution for this (in cxf 2.1) because at the moment, the basic
> Dynamic client fails to parse the wsdl:
>
> Caused by: java.lang.Exception: Error compiling schema from WSDL at
> {http://www.chemspider.com/MassSpecAPI.asmx?WSDL}: undefined simple or
> complex type 'soapenc:Array'
>        at
>
org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.
> error(DynamicClientFactory.java:470)
>        at
>
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerIm
> pl.java:280)
>
> So, if aegis is the solution... how do I configure the
> dynamicclientfactory or the bus to use aegis when parsing the WSDL?
> Any ideas?
> Thanks
>
> Benjamin Coiffe
>
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: 10 March 2008 18:14
> To: cxf-user@incubator.apache.org
> Cc: clandestino_bgd
> Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> and Dynamic Client
>
>
>
> > If yes, can you tell me what would be the best way to find out
> > (method, class in CXF or somewhere else) if service is RPC/encoded
(or
> > i.e, not supported by CXF).
>
> Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not sure
if
>
> there is an easy way.  In theory, you should be able to grab the
> BindingOperaionInfo from the CXF model and check some flag on it, but
> I'm not exactly sure if we bother even recoding if it's
encoded/literal
> since we only support literal right now.
>
> That said, Dain started adding encoded support into the Aegis
> databinding
> so eventually we'll need to make sure it's recorded properly.   I'm
not
> sure if Dain has gotten that far yet though.
>
> Dan
>
>
>
> On Saturday 08 March 2008, clandestino_bgd wrote:
> > Hi,
> > I have the problem and found this thread to be most relevant to it.
> > Inside a BPM system we currently build, there is a need to speify
> > arbitrary endpoint URL, supply parameters and hanlde results of the
> > invocation. Therefore I need some kind of dynamic client mechanism
and
> > here I am on CXF forum:)
> >
> > So, the problem is how I can dynamically invoke RPC encoded (legacy)
> > services. Since I cannot reimplement them, only thing I can get is
> > their WSDL. Ok, I understand CXF will not do the binding, but I
tried
> > old WSIF and it does the job.
> >
> > But I would like to have both CXF and WSIF dynamic clients and
switch
> > between them depending on service WSDL. If I find operation to be
RPC
> > encoded, I would use WSIF, in any other case I would use CXF dynamic
> > client. Does this make sense?
> > If yes, can you tell me what would be the best way to find out
> > (method, class in CXF or somewhere else) if service is RPC/encoded
(or
> > i.e, not supported by CXF).
> >
> > I am not much into WS technology, so I appologise in advance if I
ask
> > something stupid.
> > Thanx
> > Milan.
> >
> > Glen Mazza-2 wrote:
> > > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> > >> Thanks for the answer James,
> > >>
> > >> Unfortunately, I don't think that it would help because the
> > >> exception is thrown when the wsdl is parsed (using XJC I
> > >> believe)...
> > >
> > > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > > results are unsupported and undefined.  (You might as well try to
> > > have it parse a chicken.)
> > >
> > > Glen
> > >
> > >> Any other suggestions?
> > >> Thanks,
> > >>
> > >> Benjamin
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer, IONA
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Benson Margulies <bi...@gmail.com>.
I don't think we can do this with the Dynamic client.

The dynamic client uses the JAXB compiler to create classes on the fly based
on your schema, and then the CXF JAXB data binding maps the data back and
forth.

We don't have any kind of code generator for Aegis. Are you really sure that
you have to have a dynamic client? If not, you might be able to come up with
a set of custom type mappings for Aegis that make use of the encoded type
support that Dain added. You would type in the Java code for the beans, and
then set up Aegis mappings for them.

On Wed, May 28, 2008 at 7:20 AM, Benjamin Coiffe <bc...@inforsense.com>
wrote:

> Hi,
>
> I would like to resurrect this thread once again!
> I understand that CXF does not support RPC/encoded AND soap encodings
> (not exactly the same thing, right...)
> But I have a Document/Literal ws using soap encodings and in particular
> the soap-enc:arrayType. I read somewhere that Aegis DataBinding would be
> the solution for this (in cxf 2.1) because at the moment, the basic
> Dynamic client fails to parse the wsdl:
>
> Caused by: java.lang.Exception: Error compiling schema from WSDL at
> {http://www.chemspider.com/MassSpecAPI.asmx?WSDL}: undefined simple or
> complex type 'soapenc:Array'
>        at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.
> error(DynamicClientFactory.java:470)
>        at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerIm
> pl.java:280)
>
> So, if aegis is the solution... how do I configure the
> dynamicclientfactory or the bus to use aegis when parsing the WSDL?
> Any ideas?
> Thanks
>
> Benjamin Coiffe
>
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: 10 March 2008 18:14
> To: cxf-user@incubator.apache.org
> Cc: clandestino_bgd
> Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
> and Dynamic Client
>
>
>
> > If yes, can you tell me what would be the best way to find out
> > (method, class in CXF or somewhere else) if service is RPC/encoded (or
> > i.e, not supported by CXF).
>
> Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not sure if
>
> there is an easy way.  In theory, you should be able to grab the
> BindingOperaionInfo from the CXF model and check some flag on it, but
> I'm not exactly sure if we bother even recoding if it's encoded/literal
> since we only support literal right now.
>
> That said, Dain started adding encoded support into the Aegis
> databinding
> so eventually we'll need to make sure it's recorded properly.   I'm not
> sure if Dain has gotten that far yet though.
>
> Dan
>
>
>
> On Saturday 08 March 2008, clandestino_bgd wrote:
> > Hi,
> > I have the problem and found this thread to be most relevant to it.
> > Inside a BPM system we currently build, there is a need to speify
> > arbitrary endpoint URL, supply parameters and hanlde results of the
> > invocation. Therefore I need some kind of dynamic client mechanism and
> > here I am on CXF forum:)
> >
> > So, the problem is how I can dynamically invoke RPC encoded (legacy)
> > services. Since I cannot reimplement them, only thing I can get is
> > their WSDL. Ok, I understand CXF will not do the binding, but I tried
> > old WSIF and it does the job.
> >
> > But I would like to have both CXF and WSIF dynamic clients and switch
> > between them depending on service WSDL. If I find operation to be RPC
> > encoded, I would use WSIF, in any other case I would use CXF dynamic
> > client. Does this make sense?
> > If yes, can you tell me what would be the best way to find out
> > (method, class in CXF or somewhere else) if service is RPC/encoded (or
> > i.e, not supported by CXF).
> >
> > I am not much into WS technology, so I appologise in advance if I ask
> > something stupid.
> > Thanx
> > Milan.
> >
> > Glen Mazza-2 wrote:
> > > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> > >> Thanks for the answer James,
> > >>
> > >> Unfortunately, I don't think that it would help because the
> > >> exception is thrown when the wsdl is parsed (using XJC I
> > >> believe)...
> > >
> > > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > > results are unsupported and undefined.  (You might as well try to
> > > have it parse a chicken.)
> > >
> > > Glen
> > >
> > >> Any other suggestions?
> > >> Thanks,
> > >>
> > >> Benjamin
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer, IONA
> dkulp@apache.org
> http://www.dankulp.com/blog
>

RE: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Benjamin Coiffe <bc...@inforsense.com>.
Hi,

I would like to resurrect this thread once again!
I understand that CXF does not support RPC/encoded AND soap encodings
(not exactly the same thing, right...)
But I have a Document/Literal ws using soap encodings and in particular
the soap-enc:arrayType. I read somewhere that Aegis DataBinding would be
the solution for this (in cxf 2.1) because at the moment, the basic
Dynamic client fails to parse the wsdl:

Caused by: java.lang.Exception: Error compiling schema from WSDL at
{http://www.chemspider.com/MassSpecAPI.asmx?WSDL}: undefined simple or
complex type 'soapenc:Array'
	at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.
error(DynamicClientFactory.java:470)
	at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerIm
pl.java:280)

So, if aegis is the solution... how do I configure the
dynamicclientfactory or the bus to use aegis when parsing the WSDL?
Any ideas?
Thanks

Benjamin Coiffe



-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: 10 March 2008 18:14
To: cxf-user@incubator.apache.org
Cc: clandestino_bgd
Subject: Re: question about http://schemas.xmlsoap.org/soap/encoding/
and Dynamic Client



> If yes, can you tell me what would be the best way to find out
> (method, class in CXF or somewhere else) if service is RPC/encoded (or
> i.e, not supported by CXF).

Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not sure if

there is an easy way.  In theory, you should be able to grab the 
BindingOperaionInfo from the CXF model and check some flag on it, but 
I'm not exactly sure if we bother even recoding if it's encoded/literal 
since we only support literal right now. 

That said, Dain started adding encoded support into the Aegis
databinding 
so eventually we'll need to make sure it's recorded properly.   I'm not 
sure if Dain has gotten that far yet though.

Dan



On Saturday 08 March 2008, clandestino_bgd wrote:
> Hi,
> I have the problem and found this thread to be most relevant to it.
> Inside a BPM system we currently build, there is a need to speify
> arbitrary endpoint URL, supply parameters and hanlde results of the
> invocation. Therefore I need some kind of dynamic client mechanism and
> here I am on CXF forum:)
>
> So, the problem is how I can dynamically invoke RPC encoded (legacy)
> services. Since I cannot reimplement them, only thing I can get is
> their WSDL. Ok, I understand CXF will not do the binding, but I tried
> old WSIF and it does the job.
>
> But I would like to have both CXF and WSIF dynamic clients and switch
> between them depending on service WSDL. If I find operation to be RPC
> encoded, I would use WSIF, in any other case I would use CXF dynamic
> client. Does this make sense?
> If yes, can you tell me what would be the best way to find out
> (method, class in CXF or somewhere else) if service is RPC/encoded (or
> i.e, not supported by CXF).
>
> I am not much into WS technology, so I appologise in advance if I ask
> something stupid.
> Thanx
> Milan.
>
> Glen Mazza-2 wrote:
> > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> >> Thanks for the answer James,
> >>
> >> Unfortunately, I don't think that it would help because the
> >> exception is thrown when the wsdl is parsed (using XJC I
> >> believe)...
> >
> > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > results are unsupported and undefined.  (You might as well try to
> > have it parse a chicken.)
> >
> > Glen
> >
> >> Any other suggestions?
> >> Thanks,
> >>
> >> Benjamin



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: question about http://schemas.xmlsoap.org/soap/encoding/ and Dynamic Client

Posted by Daniel Kulp <dk...@apache.org>.

> If yes, can you tell me what would be the best way to find out
> (method, class in CXF or somewhere else) if service is RPC/encoded (or
> i.e, not supported by CXF).

Oi...  Honestly, short of grabbing the WSDL and parsing, I'm not sure if 
there is an easy way.  In theory, you should be able to grab the 
BindingOperaionInfo from the CXF model and check some flag on it, but 
I'm not exactly sure if we bother even recoding if it's encoded/literal 
since we only support literal right now. 

That said, Dain started adding encoded support into the Aegis databinding 
so eventually we'll need to make sure it's recorded properly.   I'm not 
sure if Dain has gotten that far yet though.

Dan



On Saturday 08 March 2008, clandestino_bgd wrote:
> Hi,
> I have the problem and found this thread to be most relevant to it.
> Inside a BPM system we currently build, there is a need to speify
> arbitrary endpoint URL, supply parameters and hanlde results of the
> invocation. Therefore I need some kind of dynamic client mechanism and
> here I am on CXF forum:)
>
> So, the problem is how I can dynamically invoke RPC encoded (legacy)
> services. Since I cannot reimplement them, only thing I can get is
> their WSDL. Ok, I understand CXF will not do the binding, but I tried
> old WSIF and it does the job.
>
> But I would like to have both CXF and WSIF dynamic clients and switch
> between them depending on service WSDL. If I find operation to be RPC
> encoded, I would use WSIF, in any other case I would use CXF dynamic
> client. Does this make sense?
> If yes, can you tell me what would be the best way to find out
> (method, class in CXF or somewhere else) if service is RPC/encoded (or
> i.e, not supported by CXF).
>
> I am not much into WS technology, so I appologise in advance if I ask
> something stupid.
> Thanx
> Milan.
>
> Glen Mazza-2 wrote:
> > Am Montag, den 12.11.2007, 04:53 -0500 schrieb Benjamin Coiffe:
> >> Thanks for the answer James,
> >>
> >> Unfortunately, I don't think that it would help because the
> >> exception is thrown when the wsdl is parsed (using XJC I
> >> believe)...
> >
> > With JAX-WS, you cannot parse a WSDL that is RPC/encoded, the
> > results are unsupported and undefined.  (You might as well try to
> > have it parse a chicken.)
> >
> > Glen
> >
> >> Any other suggestions?
> >> Thanks,
> >>
> >> Benjamin



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog