Newsgroup: it.comp.java
Titolo: come utilizzare ws di .net?

Salve, vorrei poter invocare nella mia pagina JSP, i web methods esposti
da una piattaforma .NET mediante file wsdl.
Come devo procedere? 
Grazie anticipatamente
Segue file DotNETClass.asmx
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/
"
xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/
"
xmlns:s="
http://www.w3.org/2001/XMLSchema
"
xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/
"
xmlns:tns="
http://localhost/Java2DotNET
"
xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/
"
xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/
"
targetNamespace="
http://localhost/Java2DotNET
"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/
">
  <wsdl:types>
    <s:schema elementFormDefault="qualified"
targetNamespace="
http://localhost/Java2DotNET
">
      <s:element name="CiaoGiuseppe">
        <s:complexType />
      </s:element>
      <s:element name="CiaoGiuseppeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1"
name="CiaoGiuseppeResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Nome">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="Nome"
type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="NomeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="NomeResult"
type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Anni">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="anni"
type="s:int" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AnniResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="AnniResult"
type="s:int" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DataDiNascita">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="datan"
type="s:dateTime" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DataDiNascitaResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1"
name="DataDiNascitaResult" type="s:dateTime" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="CiaoGiuseppeSoapIn">
    <wsdl:part name="parameters" element="tns:CiaoGiuseppe" />
  </wsdl:message>
  <wsdl:message name="CiaoGiuseppeSoapOut">
    <wsdl:part name="parameters" element="tns:CiaoGiuseppeResponse" />
  </wsdl:message>
  <wsdl:message name="NomeSoapIn">
    <wsdl:part name="parameters" element="tns:Nome" />
  </wsdl:message>
  <wsdl:message name="NomeSoapOut">
    <wsdl:part name="parameters" element="tns:NomeResponse" />
  </wsdl:message>
  <wsdl:message name="AnniSoapIn">
    <wsdl:part name="parameters" element="tns:Anni" />
  </wsdl:message>
  <wsdl:message name="AnniSoapOut">
    <wsdl:part name="parameters" element="tns:AnniResponse" />
  </wsdl:message>
  <wsdl:message name="DataDiNascitaSoapIn">
    <wsdl:part name="parameters" element="tns:DataDiNascita" />
  </wsdl:message>
  <wsdl:message name="DataDiNascitaSoapOut">
    <wsdl:part name="parameters" element="tns:DataDiNascitaResponse" />
  </wsdl:message>
  <wsdl:portType name="DotNETClassSoap">
    <wsdl:operation name="CiaoGiuseppe">
      <wsdl:input message="tns:CiaoGiuseppeSoapIn" />
      <wsdl:output message="tns:CiaoGiuseppeSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Nome">
      <wsdl:input message="tns:NomeSoapIn" />
      <wsdl:output message="tns:NomeSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Anni">
      <wsdl:input message="tns:AnniSoapIn" />
      <wsdl:output message="tns:AnniSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="DataDiNascita">
      <wsdl:input message="tns:DataDiNascitaSoapIn" />
      <wsdl:output message="tns:DataDiNascitaSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="DotNETClassSoap" type="tns:DotNETClassSoap">
    <soap:binding transport="
http://schemas.xmlsoap.org/soap/http
"
style="document" />
    <wsdl:operation name="CiaoGiuseppe">
      <soap:operation
soapAction="
http://localhost/Java2DotNET/CiaoGiuseppe
" style="document"
/>
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Nome">
      <soap:operation soapAction="
http://localhost/Java2DotNET/Nome
"
style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Anni">
      <soap:operation soapAction="
http://localhost/Java2DotNET/Anni
"
style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DataDiNascita">
      <soap:operation
soapAction="
http://localhost/Java2DotNET/DataDiNascita
" style="document"
/>
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="DotNETClass">
    <wsdl:port name="DotNETClassSoap" binding="tns:DotNETClassSoap">
      <soap:address
location="
http://149.132.6.55/Java2DotNET/DotNETClass.asmx
" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
-- 
Posted via Mailgate.ORG Server - 
http://www.Mailgate.ORG

 da una piattaforma .NET mediante file wsdl.
Per prima cosa devi scaricarti il progetto Axis dal sito di Apache.
Axis mette a disposizione uno strumento wsdl2java che dato in input il
file wsdl genera una serie di classi che permettono di interrogare
il webservices (una interfaccia, uno stub, un service ed un service
locator, ed eventualmente anche lo skeleton).
Una volta che hai a disposizione queste classi basta semplicemete
scrivere un programma che interroga il ws :
// Invocazione Locator del servizio 
Test_Locator_Generato_Locator tl = new Test_Locator_Generato_Locator();
// Creazione dell'istanza dello stub dal locator
Test_Soap_Generato_Soap soap = tl.getTest_Soap_Generato_Soap();
// Invocazione metodo
String mess= soap.metodoDaInvocare("parametro1","parametro2");


 wrote in message
news:6936fbb49c4c1200444...@mygate.mailgate.org
Se non vuoi sbatterti ad insstallare Axis prova a 
fare una ricerca su google di
"Web services dynamic invocation".
E' cmq un approccio molto più restrittivo rispetto
alla soluzione offerta da Axis.


Grazie! Spero di riuscire, fino ad ora avevo cominciato a leggere
qualcosa JWS di o'reilly, ma confesso che mi ero un pò perso.
Proverò, come dici.
Ciao
gs
