RE: WSIF and complex type

<[email protected]> Wed, 5 Oct 2005 17:48:52 +0200
Newsgroups gmane.comp.apache.webservices.wsif.user
Message-ID <[email protected]>
You said that you haven't done the solution 1. But, how do you proceed?

 

So, I think that I'm going to take the solution 1, but not sure yet...do you have any suggestions (because, I don't want to code the solution 1, and after realize that is useless).

 

Thanks Luca for you reply.

 

Delphine.

 

________________________________

De : Luca Baldi [mailto:[email protected]] 
Envoyé : mercredi 5 octobre 2005 17:41
À : [email protected]
Objet : 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;

*	Read in the WSDL descriptor
*	Get the SOAP binding and list all the operations associated with the appropriate PortType
*	Pick an operation
*	Build input according to the WSDL descriptor
*	Create the request SOAPMessage and invoke the web service
*	Process the response SOAPMessage that comes back ( if you're lucky, with no errors !! :-)). 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.