Ammmm I'm having hard time understanding what you said... and I
totally missed the part with the slit proxy... you sound like the jwsdp
tutorial :-).
If you need to invoke a web service, you are not initially familiar
with (which was my idea of the problem) the approach should be the
following: First you supply your dynamic client with the wsdl. Then you
should choose one of the services defined in it and one of the
operations of the chosen service. Once your dynamic web service client
has that information it can compose the SOAP message using axiom. You
should use some user interface to supply your client with the needed
data. In the most common case - using http transport - axis2 will create
a http post request, utilizing apache commons-httpclient and will put
the SOAP message in the http body (no so called proxy is involved).
That's the picture in general... if you have any specific question - ask.
If you need to do sth different then probably everything above is an
absolute nonsense and I'm sorry for wasting your time...
Best wishes!
Stefan
amine MOKHTARI wrote:
I work on a protype. this prototype should provide mecanisms for
dynamic composition of web services. so, it have to be able to
construct proxy dynamicly in memory. this proxy is slit, it contain
all information needed for invoking one operation. for this purpose, i
need a mecanisms for manipulate a parameters (simple or complex type
in the same way.) of operation ????
have you suggestion ,?????
Stefan Vladov a écrit :
I'm not sure whether this will help you much and please excuse me
for any inaccuracy... anyway here's what I think:
First of all, I haven't heard of any API that will do all the work
for you, and axis2 is as dynamic as any other ws implementation. I
haven't used ADB so I have no idea if it could help you.... The wsdl
descriptor contains all the information you might need in order to
send a soap request or parse the response. You can easily parse the
types defined in it using xmlBeans and then be able to construct the
xml tree for the message using AXIOM. What data is to be populated
and how you'll get it is of course your business... the important
thing is that you have the structure of the message. You should have
some detailed knowledge on the wsdl specification to use this
approach because you should make the difference for example between
invoking a rpc and a literal style web service (don't get confused
with RPCMessageReceiver in axis2 - the services using it are still
doc/lit style). Using wsdl4j you can get all the information needed
from the wsdl. MTOM support is very easy, because such date is simply
declared as base64Binary or hexBinary in the types definitions, but
for SwA you should be careful, for there will be more than one part
in a single message defined in the wsdl. Furthermore you should
populate the binary data accordingly.
Actually I don't find dynamic clients much useful, apart from
testing purposes, because there will always be something that it will
not support and then it won't be generic (which would normally be the
reason to use it). Besides, according to the web service you'll
always need some post processing for the result, which won't be the
same for every web service published in the world...
Best wishes!
Stefan
amine MOKHTARI wrote:
Exist it an API that allow to define parameters and their types
dynamically; or an API that provide a mechanisms for dynamic
invocation????
Paul Fremantle a écrit :
Aha
Well no. Maybe. Yes. Maybe. No.
Actually Axis2 does NOT have the mapping registry (types <->
namespace) that Axis1 has, because Axis2 is loosely coupled with the
XML data binding. ADB has a generic mapper, but you have to provide
the namespace, and it won't map to more than one namespace without
doing code gen.
I don't know about XMLBeans - it is a much more powerful project so it
may have that support.
Paul
On 7/4/06, amine MOKHTARI <[EMAIL PROTECTED]> wrote:
therefore, axis2 gives the mechanisms to define parameters and their
types for invoking an operation belonging has web services ???
Paul Fremantle a écrit :
> Sure, Axis2 has dynamic support. You need to create the XML body of
> the message and pass it as an OMElement. You can also use STAX and
> then use a STAXOMBuilder to create the OMElement.
>
> Once you have the OMElement you can use ServiceClient or
> OperationClient to invoke the service.
>
> Paul
>
> On 7/4/06, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:
>> yes , ServiceClient has a constructor for doing that.
>>
>> amine MOKHTARI wrote:
>>
>> > Hello, My question is simple. is it axis2 allow dynamic
>> > invocation of web services ???
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
___________________________________________________________________________
>>
>> > Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo!
Mail et
>> > son interface révolutionnaire.
>> > http://fr.mail.yahoo.com
>> >
>> >
---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> Thanks,
>> Deepal
>> ................................................................
>> ~Future is Open~
>>
>>
>>
>>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]