🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.webservices.soap
Article #85

Re: Problem Deserializing Array Of Objects

#85
From: Jean-Marie Babet
Date: Fri, 11 May 2007 00:32
208 lines
6848 bytes
Hello,

Squeezing a few minutes to catch up on the newsgroup.

I imported the WSDL posted with the latest importer and it generated the
following (pasted below). I'm not sure if this matches what you have. If
not, I can email you what I have. Please let me know.

Cheers,

Bruneau.



[[[[[HEADER]]]]]

// ************************************************************************
//
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : test.wsdl
//  >Import : test.wsdl:0
//  >Import : test.wsdl:1
// (5/10/2007 5:26:18 PM - - $Rev: 6632 $)
// ************************************************************************
//

#ifndef   testH
#define   testH

#include <System.hpp>
#include <InvokeRegistry.hpp>
#include <XSBuiltIns.hpp>
#include <SOAPHTTPClient.hpp>

#if !defined(SOAP_REMOTABLE_CLASS)
#define SOAP_REMOTABLE_CLASS __declspec(delphiclass)
#endif
#if !defined(IS_OPTN)
#define IS_OPTN 0x0001
#endif
#if !defined(IS_UNBD)
#define IS_UNBD 0x0002
#endif
#if !defined(IS_NLBL)
#define IS_NLBL 0x0004
#endif


namespace NS_test {

// ************************************************************************
//
// The following types, referred to in the WSDL document are not being
represented
// in this file. They are either aliases[@] of other types represented or
were referred
// to but never[!] declared in the document. The types from the latter
category
// typically map to predefined/known XML or Borland types; however, they
could also
// indicate incorrect WSDL documents that failed to declare or import a
schema type.
// ************************************************************************
//
// !:string          - "http://www.w3.org/2001/XMLSchema"

class SOAP_REMOTABLE_CLASS Pais;



// ************************************************************************
//
// XML       : Pais, global, <complexType>
// Namespace : http://model.siiu.com/jaws
// ************************************************************************
//
class Pais : public TRemotable {
private:
  WideString      Fabrev;
  WideString      Fidpais;
  WideString      Fnombre;
__published:
  __property WideString      abrev = { index=(IS_NLBL), read=Fabrev,
write=Fabrev };
  __property WideString     idpais = { index=(IS_NLBL), read=Fidpais,
write=Fidpais };
  __property WideString     nombre = { index=(IS_NLBL), read=Fnombre,
write=Fnombre };
};


typedef DynamicArray<Pais*>       Array_Of_Pais;  /*
"http://model.siiu.com/jaws"[GblUbnd] */

// ************************************************************************
//
// Namespace : http://facade.siiu.com/jaws
// transport : http://schemas.xmlsoap.org/soap/http
// style     : document
// binding   : PaisFacadeBinding
// service   : PaisFacadeService
// port      : PaisFacadePort
// URL       : http://Contabilidad:8080/SiiuEJBModule/PaisFacade
// ************************************************************************
//
__interface INTERFACE_UUID("{02E77375-C84D-5824-603C-964313FAE390}")
PaisFacade : public IInvokable
{
public:
  virtual void            actualizaPais(const Pais* Pais_1) = 0;
  virtual void            borraPais(const Pais* Pais_1) = 0;
  virtual void            creaPais(const Pais* Pais_1) = 0;
  virtual Pais*           encuentraPais(const WideString String_1) = 0;
  virtual Array_Of_Pais   encuentraPaises() = 0;
};
typedef DelphiInterface<PaisFacade> _di_PaisFacade;

_di_PaisFacade GetPaisFacade(bool useWSDL=false, AnsiString addr="",
THTTPRIO* HTTPRIO=0);


};     // NS_test

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace NS_test;
#endif



#endif // testH


[[[[[SOURCE]]]]]

// ************************************************************************
//
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : test.wsdl
//  >Import : test.wsdl:0
//  >Import : test.wsdl:1
// (5/10/2007 5:26:18 PM - - $Rev: 6632 $)
// ************************************************************************
//

#include <vcl.h>
#pragma hdrstop

#if !defined(testH)
#include "test.h"
#endif



namespace NS_test {

_di_PaisFacade GetPaisFacade(bool useWSDL, AnsiString addr, THTTPRIO*
HTTPRIO)
{
  static const char* defWSDL= "test.wsdl";
  static const char* defURL =
"http://Contabilidad:8080/SiiuEJBModule/PaisFacade";
  static const char* defSvc = "PaisFacadeService";
  static const char* defPrt = "PaisFacadePort";
  if (addr=="")
    addr = useWSDL ? defWSDL : defURL;
  THTTPRIO* rio = HTTPRIO ? HTTPRIO : new THTTPRIO(0);
  if (useWSDL) {
    rio->WSDLLocation = addr;
    rio->Service = defSvc;
    rio->Port = defPrt;
  } else {
    rio->URL = addr;
  }
  _di_PaisFacade service;
  rio->QueryInterface(service);
  if (!service && !HTTPRIO)
    delete rio;
  return service;
}


// ************************************************************************
//
// This routine registers the interfaces and types exposed by the
WebService.
// ************************************************************************
//
static void RegTypes()
{
  /* PaisFacade */
  InvRegistry()->RegisterInterface(__interfaceTypeinfo(PaisFacade),
L"http://facade.siiu.com/jaws", L"");
  InvRegistry()->RegisterDefaultSOAPAction(__interfaceTypeinfo(PaisFacade),
L"");
  InvRegistry()->RegisterInvokeOptions(__interfaceTypeinfo(PaisFacade),
ioDocument);
  /* Pais */
  RemClassRegistry()->RegisterXSClass(__classid(Pais),
L"http://model.siiu.com/jaws", L"Pais");
  /* Array_Of_Pais */
  RemClassRegistry()->RegisterXSInfo(__arrayTypeinfo(Array_Of_Pais),
L"http://model.siiu.com/jaws", L"Array_Of_Pais");
}
#pragma startup RegTypes 32

};     // NS_test
Technical Details
Message-ID: <4643b98c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <463a91ef@newsgroups.borland.com> <463ba1a1$1@newsgroups.borland.com> <463bd3dd@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11096a,d3fae8617f67aeb0
X-Google-Attributes: gid11096a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jean-Marie Babet" <bbabet@borland.com>
Newsgroups: borland.public.cppbuilder.webservices.soap
References: <463a91ef@newsgroups.borland.com> <463ba1a1$1@newsgroups.borland.com> <463bd3dd@newsgroups.borland.com>
Subject: Re: Problem Deserializing Array Of Objects
Date: Thu, 10 May 2007 17:32:13 -0700
Lines: 210
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 10.143.19.52
Message-ID: <4643b98c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178843532 10.143.19.52 (10 May 2007 17:32:12 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail