users@jax-rpc.java.net

Extracting data from WSDL to use in DII call

From: Holly Schinsky <hschinsky_at_QLINKTECH.COM>
Date: Tue, 05 Mar 2002 06:33:56 -0700

Hello,

Can someone tell me how to extract the information needed to call a service thru DII by only having the WSDL document from a service? My app queries a UDDI repository based on some user entered criteria, then when I find that service (thru JAXR), I get the WSDL document and want to be able to call the service thru DII based on information drawn from the WSDL doc.

For instance, if I have the following WSDL that I received from an inquiry, what do I use to set the Call parameters to (port or service QName for instance) in my code?

<definitions name='net.xmethods.services.stockquote.StockQuote' targetNamespace='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/' xmlns:tns='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/'
xmlns:electric='http://www.themindelectric.com/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' xmlns='http://schemas.xmlsoap.org/wsdl/'>
<message name='getQuoteResponse1'>
<part name='Result' type='xsd:float'/>
</message>
<message name='getQuoteRequest1'>
<part name='symbol'type='xsd:string'/>
</message>
<portType name='net.xmethods.services.stockquote.StockQuotePortType'>
<operation name='getQuote' parameterOrder='symbol'>
<input message='tns:getQuoteRequest1'/>
<output message='tns:getQuoteResponse1'/>
</operation>
</portType>
<binding name='net.xmethods.services.stockquote.StockQuoteBinding' type='tns:net.xmethods.services.stockquote.StockQuotePortType'>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='getQuote'><soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
<input><soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output><soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
</binding>
<service name='net.xmethods.services.stockquote.StockQuoteService'>
<documentation>net.xmethods.services.stockquote.StockQuote web service
</documentation>
<port name='net.xmethods.services.stockquote.StockQuotePort' binding='tns:net.xmethods.services.stockquote.StockQuoteBinding'>
<soap:address location='http://64.39.29.211:9090/soap'/>
</port>
</service>
</definitions>

Are there any code examples that anyone knows of that do this? The only example I have seen is the very simple Hello example in the tutorial. Any help is appreciated...

Thanks,
Holly