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

Office XP toolkit doesn't support arrays of structs?

Expand Messages
  • Marco Tillemans
    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
    Message 1 of 1 , May 19, 2003

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

      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

      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
    Your message has been successfully submitted and would be delivered to recipients shortly.