Re: WSIF and complex type
"Bhuvan Gupta" <[email protected]> Wed, 5 Oct 2005 21:27:43 +0530
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <010a01c5c9c5$85fc9370$e880a4a4@tifosi> |
Hi,
We have followed the same approach in creating a generic version of "dynamic" WebService Consumer for FioranoESB
and it works with almost all the webservices (atleast the ones which are WS-I Basic Profile complaint).
We are using AXIS for Webservice invocation.
To give you a idea of what is done :
1. Configuration : There is a swing based Configuration Property Sheet contaiing following panels:
a) WSDL Panel - you specify WSDL or WSDL URL
b) Operation Panel - we parse the WSDL and show the list of operations available. User selects an operation here.
c) Advanced Panel - It provides a table where you can specifiy advanced AXIS call properties like username/password for basic-authentication, configurations for WSSecurity etc
Once the configurations are complete, we generate request and response XSDs (this XSD maps to the "complete" SOAPEnvelope which is to be sent as request and takes care of rpc-encoded and doc-literal cases)
2. Execution engine:
a) User send the XML complaint to the request XSD.
b) A call object is created based on the configured properties
c) Input XML is filled to the call object
d) Operation is invoked
e) We deserialize the received response to XML
I am sorry that I won't be able to share the source code for obvious reasons but I'll be more than happy to answer any technical queries.
Thanks
Bhuvan
----- Original Message -----
From: Luca Baldi
To: [email protected]
Sent: Wednesday, October 05, 2005 9:11 PM
Subject: RE: WSIF and complex type
Hi. I tried to use WSIF with complex types a few weeks ago, and decided that if you want to consume web services dynamically with complex types you're better off starting from scratch. What I mean is that you can use Apache Axis ( or SOAP ) library to create your SOAPMessage and populate it with whatever you want.
The steps that I take are the following;
a.. Read in the WSDL descriptor
b.. Get the SOAP binding and list all the operations associated with the appropriate PortType
c.. Pick an operation
d.. Build input according to the WSDL descriptor
e.. Create the request SOAPMessage and invoke the web service
f.. Process the response SOAPMessage that comes back ( if you're lucky, with no errors !! J). What to expect is again based on the WSDL file
It's quite a complex process if you want to be able to handle any web service. I reckon the best approach would be to create the Body of the SOAPMessage as xml, and just add it to the SOAPBodyElement. Having said that, I haven't done that for a variety of reasons ( which I am regretting a wee bit now ).
Basically if you follow your solution 1, you should be able to tackle this.
luca
------------------------------------------------------------------------------
From: [email protected] [mailto:[email protected]]
Sent: 05 October 2005 11:17
To: [email protected]
Subject: WSIF and complex type
Hello everybody,
I try to write a java GUI application which can invoke any Web Service (SOAP first).
Mecanism like http://www.strikeiron.com/analyzer/OnlineAnalyzer.aspx
I can parse and present graphically WSDL element on my java GUI, but, my problem is the COMPLEX TYPE !!!!
How can I manage complex type with WSIF?
So I have many solutions:
1 - Write my own SOAP client (like this : http://www2.sys-con.com/ITSG/virtualcd/WebServices/archives/0310/behera/index.htm)
2 - Use JAX-RPC to use DII interface, generate in-fly the stub and use java.lang.Reflection to use these stubs.
3 - Use XSUL2 to use WSIF interface to send directly XML element for input, output and fault parameters.
But, it seems that
1 - It is difficult to write its own SOAP client because of many different encoding
2 - I don't really know how to do this
3 - I try to use XSUL2 without success and the XSUL mailing list doesn't return me any response of my problem (I have a xsul.wsif.WSIFException)
Details: no provider could be found for WSDL port <n1:port name="HelloIFPort" binding="tns:HelloIFBinding" xmlns:n1="http://schemas.xmlsoap.org/wsdl/">
<soap:address location="http://dev2k15.dev.orsyp.com:8080/hello-dme/hello" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></n1:port>
So, I want to know if somebody resolves this issue of complex type with WSIF or with something else..
Any help or sample code will be appreciated.
Thanks a lot.
Delphine.
------------------------------------------------------------------------------------------------------------------------------------ This email is intended for the exclusive use by the person(s) mentioned as recipient(s). If you receive this email by mistake, please notify the sender and delete this email immediately from your system and destroy all copies of it. You may not, directly or indirectly, use, disclose, distribute, print or copy this email or any part of it if you are not the intended recipient. This email and its attachments, if any, contain confidential information and/or may contain information protected by intellectual property rights or other rights. This email shall/may not be construed to constitute any commitment from Fiorano Software Inc. or its subsidiaries or affiliates except when expressly agreed to in a separate written agreement between the intended recipient and Fiorano Software Inc. or its subsidiaries or affiliates. Opinions, conclusions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorized representative independent of this message. Unencrypted electronic mail is not secure, may contain harmful or virulent components or attachments and may not be authentic. Fiorano Software Inc. does not make any representations as to or the contents of this message nor for any damage caused by the use thereof. ------------------------------------------------------------------------------------------------------------------------------------ Fiorano MailServer All incoming and outgoing mails are scanned for Virus http://www.fiorano.com
---------------------------------------------------------------------------------
Fiorano MailServer
All incoming and outgoing mails are scanned for Virus and Spam
http://www.fiorano.com