users@jax-rpc.java.net

Re: Same WSDL different environment - help please

From: Norberto Carnelli <norberto.carnelli_at_poste.it>
Date: Mon, 22 Mar 2004 19:53:18 +0100

Jaswinder Kaur ha scritto:
>
>
> >You mean same WSDL description for services resident on 3 different
> locations
>
> yes this is what I want
>
> >I suppose you could do it with 3 different binding (port)
>
> Does not three different bindings mean 3 WSDL ? If not can you please
> tell me how to do.

No, you can have 1 WSDL that contains multiple porttypes

.NET does this by default creating SOAP. HTTP-POST and HTTP-GET
bindings, but you can do it with every ws implementation
because multiple porttype are allowed by WSDL standard.
I've attached the ending of a WSDL file with 3 different porttypes.

You should do this by hand, triplicating all your binding stuff and
then modifying it in order to point to the 3 binding implementations.
I dont know if u can copy only the last part (the one with "address")
or if u have to recopy everything, u must check WSDL specification
and/or do some experiments

PS I've never tried it, just arguing :)



Final lines of a .NET multi-port service:


  <portType name="StockQuoteSoap">
     <operation name="GetQuote">
       <documentation>Get Stock quote for a company symbol</documentation>
       <input message="s0:GetQuoteSoapIn" />
       <output message="s0:GetQuoteSoapOut" />
     </operation>
   </portType>
   <portType name="StockQuoteHttpGet">
     <operation name="GetQuote">
       <documentation>Get Stock quote for a company Symbol</documentation>
       <input message="s0:GetQuoteHttpGetIn" />
       <output message="s0:GetQuoteHttpGetOut" />
     </operation>
   </portType>
   <portType name="StockQuoteHttpPost">
     <operation name="GetQuote">
       <documentation>Get Stock quote for a company Symbol</documentation>
       <input message="s0:GetQuoteHttpPostIn" />
       <output message="s0:GetQuoteHttpPostOut" />
     </operation>
   </portType>
   <binding name="StockQuoteSoap" type="s0:StockQuoteSoap">
     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
     <operation name="GetQuote">
       <soap:operation soapAction="http://www.webserviceX.NET/GetQuote"
style="document" />
       <input>
         <soap:body use="literal" />
       </input>
       <output>
         <soap:body use="literal" />
       </output>
     </operation>
   </binding>
   <binding name="StockQuoteHttpGet" type="s0:StockQuoteHttpGet">
     <http:binding verb="GET" />
     <operation name="GetQuote">
       <http:operation location="/GetQuote" />
       <input>
         <http:urlEncoded />
       </input>
       <output>
         <mime:mimeXml part="Body" />
       </output>
     </operation>
   </binding>
   <binding name="StockQuoteHttpPost" type="s0:StockQuoteHttpPost">
     <http:binding verb="POST" />
     <operation name="GetQuote">
       <http:operation location="/GetQuote" />
       <input>
         <mime:content type="application/x-www-form-urlencoded" />
       </input>
       <output>
         <mime:mimeXml part="Body" />
       </output>
     </operation>
   </binding>
   <service name="StockQuote">
     <port name="StockQuoteSoap" binding="s0:StockQuoteSoap">
       <soap:address
location="http://www.webservicex.net/stockquote.asmx" />
     </port>
     <port name="StockQuoteHttpGet" binding="s0:StockQuoteHttpGet">
       <http:address
location="http://www.webservicex.net/stockquote.asmx" />
     </port>
     <port name="StockQuoteHttpPost" binding="s0:StockQuoteHttpPost">
       <http:address
location="http://www.webservicex.net/stockquote.asmx" />
     </port>
   </service>
</definitions>


-- 
Norberto Carnelli
Personal E-mail: <norberto.carnelli_at_poste.it>
Pc-Action E-mail: <norberto.carnelli_at_xenia.it>
GPG Key ID: 0xBD2BB3E2 (available on keyservers)
"I've eaten from the insane root that imprisons reason"
---Anthrax
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net