Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    NuSoap e Complextype non rilevati

    Sto creando un web service con PHP e nusoap (PHP5.3)
    Tutto bene, fin quando non cerco di importare il web service in Visual Studio (2008), al contrario di altri webservices i tipi complessi che ho specificato non compaiono come classi all'interno di BS e quindi non posso utilizzarli, anche se sono presenti nell'XML della pagina:

    codice:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <definitions xmlns:SOAP-ENV="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/" xmlns:tns="MyPersonalTraineService" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="MyPersonalTraineService">
    <types>
    <xsd:schema targetNamespace="MyPersonalTraineService"
    >
     <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
     <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
     <xsd:complexType name="ciboesempio">
      <xsd:all>
       <xsd:element name="nome" type="xsd:string"/>
       <xsd:element name="calorie" type="xsd:int"/>
       <xsd:element name="proteine" type="xsd:int"/>
       <xsd:element name="carboidrati" type="xsd:int"/>
      </xsd:all>
     </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="testRequest">
      <part name="id" type="xsd:int" /></message>
    <message name="testResponse">
      <part name="num" type="xsd:int" /></message>
    <portType name="MyPersonalTrainerPortType">
      <operation name="test">
        <input message="tns:testRequest"/>
        <output message="tns:testResponse"/>
    
      </operation>
    </portType>
    <binding name="MyPersonalTrainerBinding" type="tns:MyPersonalTrainerPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="test">
        <soap:operation soapAction="http://127.0.0.1/api/service.php/test" style="rpc"/>
        <input><soap:body use="encoded" namespace="MyPersonalTraineService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
        <output><soap:body use="encoded" namespace="MyPersonalTraineService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
      </operation>
    </binding>
    
    <service name="MyPersonalTrainer">
      <port name="MyPersonalTrainerPort" binding="tns:MyPersonalTrainerBinding">
        <soap:address location="http://127.0.0.1/api/service.php"/>
      </port>
    </service>
    </definitions>
    Non noto differenze sostanziali tra l'XML generato dal mio server e quello prelevato da altre fonti, ma comunque non riesco ad usare i miei complextype

  2. #2
    Bump?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.