Ciao a Tutti,
ho un problema che mi sta facendo sbattere la testa![]()
da alcuni giorni con axis2 anche perchè non lo conosco bene.
Cmq ho pubblicato un web service che restituisce un complex type con tre campi descritto dal seguente wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://ws/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://rmi.java/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://io.java/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://ws/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://ws/">
<wsdl:documentation>VerificaNumerazioni</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax21="http://rmi.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
<xs:complexType name="RemoteException">
<xs:complexContent>
<xs:extension base="ns1:IOException">
<xs:sequence>
<xs:element minOccurs="0" name="cause" nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="detail" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ax22="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://io.java/xsd">
<xs:complexType name="IOException">
<xs:complexContent>
<xs:extension base="ns2:Exception">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ns="http://ws/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws/xsd">
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="RemoteException">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="RemoteException" nillable="true" type="ns0:RemoteException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="WS_Richiesta_Verifica">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="tipoComunicazione" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="codiceOrdine" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tipoProcesso" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tipoAtterraggio" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="idLinea" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="codiceRisorsa" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="data_Check" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="WS_Richiesta_VerificaResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="WS_Richiesta_VerificaRequest">
<wsdlart name="parameters" element="ns2:WS_Richiesta_Verifica"/>
</wsdl:message>
<wsdl:message name="WS_Richiesta_VerificaResponse">
<wsdlart name="parameters" element="ns2:WS_Richiesta_VerificaResponse"/>
</wsdl:message>
<wsdl:message name="RemoteException">
<wsdlart name="parameters" element="ns2:RemoteException"/>
</wsdl:message>
<wsdlortType name="VerificaNumerazioniPortType">
<wsdlperation name="WS_Richiesta_Verifica">
<wsdl:input message="axis2:WS_Richiesta_VerificaRequest" wsaw:Action="urn:WS_Richiesta_Verifica"/>
<wsdlutput message="axis2:WS_Richiesta_VerificaResponse" wsaw:Action="urn:WS_Richiesta_VerificaResponse"/>
<wsdl:fault message="axis2:RemoteException" name="RemoteException" wsaw:Action="urn:WS_Richiesta_VerificaRemoteExcept ion"/>
</wsdlperation>
</wsdlortType>
<wsdl:binding name="VerificaNumerazioniSOAP11Binding" type="axis2:VerificaNumerazioniPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdlperation name="WS_Richiesta_Verifica">
<soapperation soapAction="urn:WS_Richiesta_Verifica" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
<wsdl:fault name="RemoteException">
<soap:fault use="literal" name="RemoteException"/>
</wsdl:fault>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="VerificaNumerazioniSOAP12Binding" type="axis2:VerificaNumerazioniPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdlperation name="WS_Richiesta_Verifica">
<soap12peration soapAction="urn:WS_Richiesta_Verifica" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap12:body use="literal"/>
</wsdlutput>
<wsdl:fault name="RemoteException">
<soap12:fault use="literal" name="RemoteException"/>
</wsdl:fault>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="VerificaNumerazioniHttpBinding" type="axis2:VerificaNumerazioniPortType">
<http:binding verb="POST"/>
<wsdlperation name="WS_Richiesta_Verifica">
<httpperation location="VerificaNumerazioni/WS_Richiesta_Verifica"/>
<wsdl:input>
<mime:content type="text/xml" part="WS_Richiesta_Verifica"/>
</wsdl:input>
<wsdlutput>
<mime:content type="text/xml" part="WS_Richiesta_Verifica"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="VerificaNumerazioni">
<wsdlort name="VerificaNumerazioniSOAP11port_http" binding="axis2:VerificaNumerazioniSOAP11Binding">
<soap:address location="http://localhost:8080/axis2/services/VerificaNumerazioni"/>
</wsdlort>
<wsdlort name="VerificaNumerazioniSOAP12port_http" binding="axis2:VerificaNumerazioniSOAP12Binding">
<soap12:address location="http://localhost:8080/axis2/services/VerificaNumerazioni"/>
</wsdlort>
<wsdlort name="VerificaNumerazioniHttpport" binding="axis2:VerificaNumerazioniHttpBinding">
<http:address location="http://localhost:8080/axis2/services/VerificaNumerazioni"/>
</wsdlort>
</wsdl:service>
</wsdl:definitions>
Di seguito riporto anche il services.xml:
<?xml version="1.0" encoding="UTF-8"?>
<serviceGroup>
<service name="VerificaNumerazioni" scope="application">
<description>VerificaNumerazioni service</description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMes sageReceiver"/>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageRe ceiver"/>
</messageReceivers>
<parameter name="ServiceClass">ws.VerificaNumerazioni</parameter>
</service>
</serviceGroup>
Quando lo invoco con questa request:
<soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Body>
<m:WS_Richiesta_Verifica xmlns:m="http://ws/xsd">
<m:tipoComunicazione>RV</m:tipoComunicazione>
<m:codiceOrdine>20090416151427/0392111201</m:codiceOrdine>
<m:tipoProcesso>T</m:tipoProcesso>
<m:tipoAtterraggio>N</m:tipoAtterraggio>
<m:idLinea>0392111201</m:idLinea>
<m:codiceRisorsa></m:codiceRisorsa>
<m:dataCheck>20090416</m:dataCheck>
</m:WS_Richiesta_Verifica>
</soapenv:Body>
il servizio mi risponde senza inviarmi i campi della Struttura ma solamente il tipo restituito di seguito la response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:WS_Richiesta_VerificaResponse xmlns:ns="http://ws/xsd">
<ns:return type="utility.struct.StructResult"/>
</ns:WS_Richiesta_VerificaResponse>
</soapenv:Body>
</soapenv:Envelope>
c'è qualcuno che può darmi una mano è davvero urgente.
Grazie in anticipo.