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

echo string array function.

Expand Messages
  • Calin Medianu
    Hello, With JWSDP I wrote a function that echoes a string array. I ran ... echoStringarray = { endpoint = http://disco:8080/wsTest/coffee , soapaction =
    Message 1 of 1 , May 27, 2003
    • 0 Attachment
      Hello,

      With JWSDP I wrote a function that echoes a string array. I ran
      stubmaker and it created this:

      -------------------------
      echoStringarray => {
      endpoint => 'http://disco:8080/wsTest/coffee',
      soapaction => '',
      uri => 'http://com.domainpeople/wsdl/CoffeeService',
      parameters => [
      SOAP::Data->new(name => 'arrayOfString_1', type
      => 'ns2:ArrayOfstring', attr => {}),
      ],
      }
      --------------------------
      I am calling it so:

      $SOAP::Constants::DEFAULT_XML_SCHEMA
      = 'http://www.w3.org/2001/XMLSchema';

      echoStringarray(["sss","sssssss","dsadsadsa"]);

      and it encodes to this:
      -----------------
      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-
      ENV:Body><namesp1:echoStringarray
      xmlns:namesp1="http://com.domainpeople/wsdl/CoffeeService"><arrayOfStr
      ing_1 xsi:type="ns2:ArrayOfstring" SOAP-ENC:arrayType="xsd:string
      [3]"><item xsi:type="xsd:string">sss</item><item
      xsi:type="xsd:string">sssssss</item><item
      xsi:type="xsd:string">dsadsadsa</item></arrayOfString_1></namesp1:echo
      Stringarray></SOAP-ENV:Body></SOAP-ENV:Envelope>
      -----------------

      THE PROBLEM is that ns2 is not defined anywhere as
      http://com.domainpeople/types/CoffeeService like it should be, so I
      get the following fault:

      -----------------

      <?xml version="1.0" encoding="UTF-8"?>
      <env:Envelope xmlns: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:enc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns0="http://com.domainpeople/wsdl/CoffeeService"
      xmlns:ns1="http://com.domainpeople/types/CoffeeService"
      xmlns:ns2="http://java.sun.com/jax-rpc-ri/internal"
      env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Bod
      y><env:Fault><faultcode>env:Server</faultcode><faultstring>Internal
      Server Error (unexpected element type: expected=
      {http://com.domainpeople/types/CoffeeService}ArrayOfstring,
      actual=ArrayOfstring)
      </faultstring></env:Fault></env:Body></env:Envelope>


      Any help would be appreciated.
    Your message has been successfully submitted and would be delivered to recipients shortly.