2

I have a SOAP server with nuSoap (PHP) and I'm trying import/include the xsd but the validators WSDL shows the next error:

Src-resolve: Cannot Resolve The Name 'OTA_PayloadStdAttributes' To A(n) 'attribute Group' Component.

<?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="http://otatest.goldcar.es/OpenTravel_2015B_XML" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:elementFormDefault="qualified" xmlns:version="2.000" xmlns:id="OTA2015B" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://otatest.goldcar.es/OpenTravel_2015B_XML">
<types>
<xsd:schema elementFormDefault="qualified" version="2.000" id="OTA2015B" targetNamespace="http://otatest.goldcar.es/OpenTravel_2015B_XML"
>

 <xsd:import schemaLocation="http://otatest.goldcar.es/OpenTravel_2015B_XML/OTA_CommonTypes.xsd" />
 <xsd:import schemaLocation="http://otatest.goldcar.es/OpenTravel_2015B_XML/OTA_VehicleCommonTypes.xsd" />

   <!-- <xsd:include namespace="http://otatest.goldcar.es/OpenTravel_2015B_XML" schemaLocation="http://otatest.goldcar.es/OpenTravel_2015B_XML/OTA_VehResNotifRQ.xsd"/>
   <xsd:include namespace="http://otatest.goldcar.es/OpenTravel_2015B_XML" schemaLocation="http://otatest.goldcar.es/OpenTravel_2015B_XML/OTA_VehResNotifRS.xsd"/> -->

</xsd:schema>
</types>
<message name="OTA_VehResNotifRQ">
  <part name="POS" type="xsd:string" />
  <part name="Reservations" type="xsd:string" /></message>
<message name="OTA_VehResNotifRS">
  <part name="Return" type="xsd:string" /></message>
<portType name="GoldcarPortType">
  <operation name="OTA_VehResNotifRQ">
    <documentation>This message will push reservation details to a trading partner. The information pushed may establish this reservation initially in a trading partner's database and/or update the information that currently exists.</documentation>
    <input message="tns:OTA_VehResNotifRQ"/>
    <output message="tns:OTA_VehResNotifRS"/>
  </operation>
</portType>
<binding name="GoldcarBinding" type="tns:GoldcarPortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="OTA_VehResNotifRQ">
    <soap:operation soapAction="http://otatest.goldcar.es/#OTA_VehResNotifRQ" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://otatest.goldcar.es/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://otatest.goldcar.es/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
</binding>
<service name="Goldcar">
  <port name="GoldcarPort" binding="tns:GoldcarBinding">
    <soap:address location="http://localhost/ota2sarg2/nuevo_server.php"/>
  </port>
</service>
</definitions>

The XSD on is OTA_PayloadStdAttributes http://otatest.goldcar.es/OpenTravel_2015B_XML/OTA_VehResNotifRQ.xsd

The validator than shows the errors http://freeformatter.com/xml-validator-xsd.html

Edit

Add all WSDL, XSD and URL of Validator

Jordi Salom
  • 361
  • 2
  • 5
  • 14

1 Answers1

1

OTA_PayloadStdAttributes appears nowhere in the XSDs in your WSDL; it must be in one of the imported XSDs, which you've not shown.

  1. Find the XSD that references the OTA_PayloadStdAttributes attribute group.
  2. Determine if the definition of the OTA_PayloadStdAttributes attribute group is in the XSD where it is referenced, directly or indirectly.
  3. If not, add the missing definition either directly or indirectly (via xsd:include or xsd:import -- what's the difference?).
  4. If so, check that the namespaces of the reference and its definition match.

That's about as specific as we can be given that you've not posted a MCVE.

Community
  • 1
  • 1
kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • I've been testing but I still find the solution. I added the actual code if you can help find the solution. – Jordi Salom Apr 25 '16 at 14:33
  • As I mentioned in comments to your question, you should create a [mcve] rather than ask those who would help to wade through so much superfluous material. You are also obliged to create a question that will stand on its own for future readers, not be dependent upon external links that may break. – kjhughes Apr 25 '16 at 15:21