Loading ...
Sorry, an error occurred while loading the content.

9174Office XP toolkit doesn't support arrays of structs?

Expand Messages
  • Marco Tillemans
    May 19, 2003
    • 0 Attachment
      Hello,

      I'm trying to connect a Nusoap apllication with Word using the office XP
      toolkit. I can send arrays and structs from my nusoap server to word,
      but with arrays which contain structs I get an error message. I've made
      a small test function in php with nusoap which only returns the input.

      This is the generated WSDL

      <?xml version="1.0" ?>
      - <#> <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:si="*http://soapinterop.org/xsd*"
      xmlns:tns="*http://pentagon/zandbak/marco/*"xmlns:soap="*http://schemas.xmlsoap.org/wsdl/soap/*"xmlns:wsdl="*http://schemas.xmlsoap.org/wsdl/*"
      xmlns="*http://schemas.xmlsoap.org/wsdl/*"
      targetNamespace="*http://pentagon/zandbak/marco/*">
      - <#> <types>
      - <#> <xsd:schema xmlns="*http://www.w3.org/2001/XMLSchema*"
      targetNamespace="*http://pentagon/zandbak/marco/*">
      - <#> <xsd:complexType name="*ArrayOfstring*">
      - <#> <xsd:complexContent>
      - <#> <xsd:restriction base="*SOAP-ENC:Array*">
      <attribute ref="*SOAP-ENC:arrayType*" wsdl:arrayType="*string[]*" />
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>
      - <#> <xsd:complexType name="*Structcontentitem*">
      - <#> <xsd:all>
      <element name="*sys_name*" type="*string*" />
      <element name="*sys_page*" type="*string*" />
      <element name="*sys_template*" type="*string*" />
      <element name="*table*" type="*string*" />
      </xsd:all>
      </xsd:complexType>
      - <#> <xsd:complexType name="*ArrayOfStructcontentitem*">
      - <#> <xsd:complexContent>
      - <#> <xsd:restriction base="*SOAP-ENC:Array*">
      <attribute ref="*SOAP-ENC:arrayType*"
      wsdl:arrayType="*tns:Structcontentitem*" />
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>
      </xsd:schema>
      </types>
      - <#> <message name="*echoStructArrayRequest*">
      <part name="*inputStructArray*" type="*tns:ArrayOfStructcontentitem*" />
      </message>
      - <#> <message name="*echoStructArrayResponse*">
      <part name="*return*" type="*tns:ArrayOfStructcontentitem*" />
      </message>
      - <#> <portType name="*PlatformPortType*">
      - <#> <operation name="*echoStructArray*">
      <input message="*tns:echoStructArrayRequest*" />
      <output message="*tns:echoStructArrayResponse*" />
      </operation>
      </portType>
      - <#> <binding name="*PlatformBinding*" type="*tns:PlatformPortType*">
      <soap:binding style="*rpc*"
      transport="*http://schemas.xmlsoap.org/soap/http*" />
      - <#> <operation name="*echoStructArray*">
      <soap:operation soapAction="*http://pentagon/zandbak/marco/test.php*"
      style="*rpc*" />
      - <#> <input>
      <soap:body use="*encoded*" namespace="*http://pentagon/zandbak/marco/*"
      encodingStyle="*http://schemas.xmlsoap.org/soap/encoding/*" />
      </input>
      - <#> <output>
      <soap:body use="*encoded*" namespace="*http://pentagon/zandbak/marco/*"
      encodingStyle="*http://schemas.xmlsoap.org/soap/encoding/*" />
      </output>
      </operation>
      </binding>
      - <#> <service name="*Platform*">
      - <#> <port name="*PlatformPort*" binding="*tns:PlatformBinding*">
      <soap:address location="*http://pentagon/zandbak/marco/test.php*" />
      </port>
      </service>
      </definitions>

      The code used in word's visual basic..

      Sub Platformtest()

      Dim test As New clsws_Platform
      Dim x(2) As New struct_Structcontentitem
      Dim y As Variant

      x(0).sys_name = "aa"
      x(1).sys_name = "bb"
      y = test.wsm_echoStructArray(x)

      MsgBox ("platform output " _
      & vbCrLf & y(0).sys_name & " " & y(1).sys_name)
      End Sub

      i get the error message SoapMapper:SAving SoapMapper inputStructArray
      failed

      It seems that the soapmapper can't store the output in var y, but a
      variant can be any type (i also tried to give y the same declaration as
      x, but that gave the same error)

      I hope someone here can help,

      thanks in advance,

      Marco Janssen