3

I have a WSDL URL: http://www.persiansms.info/webservice/smsService.php?wsdl

when I try to generate interface with Delphi WSDL Importer, Delphi generates this warning:

  // ************************************************************************ //
  // 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 Embarcadero types; however, they could also
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:int             - "http://www.w3.org/2001/XMLSchema"[]
  // !:ArrayOf_xsd_long - "http://www.w3.org/2001/XMLSchema"[]
  // !:string          - "http://www.w3.org/2001/XMLSchema"[]
  // !:array           - "http://www.w3.org/2001/XMLSchema"[]

so, array of what?? the WSDL document never mentioned what type it has, for example:

<part name="note" type="xsd:array"/>

I am confused, is it a bug in delphi? or is the WSDL document incomplete? A C# program works well with it, but I don't have the source code.

what should I do then? Is it possible to find out what that is?

mjn
  • 36,362
  • 28
  • 176
  • 378
You-See
  • 81
  • 2
  • 7
  • Looks like you got your answer below. The reason I asked which version of Delphi is that five or six years ago I found that code generated by D7's WSDL importer on a particular site was buggy. I got confirmation of the bugs were specific to D7, and some help from someone responsible for the code at Embarcadero at that time, but I have no record of what the problem was or who I worked with. If you encounter problems, although I know it would be a pain, you may need to see if you can use a more modern version of Delphi for some part of this, perhaps in a DLL? Sorry I can't be of any more help. – RobertFrank Dec 31 '12 at 21:25

3 Answers3

1

we can fix that problem with this type should be replace by "Array;" :

T2dArray = array of array of WideString;

maybe it can help others. i am testing that, still it works!

You-See
  • 81
  • 2
  • 7
0

My old BDS2006 (german) adds a comment to the generated code

// ************************************************************************ //
// Die folgenden Typen, auf die im WSDL-Dokument Bezug genommen wird, sind in dieser Datei
// nicht repräsentiert. Sie sind entweder Aliase(@) anderer repräsentierter Typen oder auf sie wurde Bezug genommen,
// aber in diesem Dokument nicht deklariert (!). Die Typen aus letzterer Kategorie
// sind normalerweise mit vordefinierten/bekannten XML- oder Borland-Typen verbunden; sie könnten aber auch ein Anzeichen
// für ein falsches WSDL-Dokument sein, das einen Schema-Typ nicht deklariert oder importiert..
// ************************************************************************ //
// !:string          - "http://www.w3.org/2001/XMLSchema"
// !:array           - "http://www.w3.org/2001/XMLSchema"
// !:int             - "http://www.w3.org/2001/XMLSchema"
// !:ArrayOf_xsd_long - "http://www.w3.org/2001/XMLSchema"

It means: The following types which are being referenced in the WSDL document are not represented (declared?) in it. They are either aliases (@) of other types included but are not(!) declared in this document. The types of the latter category are usually connected with predefined/known XML- or Borland types but can also be an indication for an invalid WSDL-document which does not declare or import a schema-type.

Sorry for the exotic translation.

alzaimar
  • 4,572
  • 1
  • 16
  • 30
0

The problem is due to the WSDL RPC encoding and Delphi doesn't support it (not even XE3) as illustrated in the wsdl extract below:

<binding name="sms_webserviceBinding" type="tns:sms_webservicePort">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="send_sms_array">

It does work with a C# client because RPC is supported as can be seen below:

public interface sms_webservicePort {

    [System.ServiceModel.OperationContractAttribute(Action="urn:sms_webservice#sms_webservice#send_sms_array", ReplyAction="*")]
    [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
    [return: System.ServiceModel.MessageParameterAttribute(Name="send_sms_array")]
    string send_sms_array(string username, string password, string sender_number, string receiver_number, string note, string ersal_flash, string onlysend, int date);

And in Java using NetBeans 7.x one gets the more explicit message:

Selected wsdl is rpc encoded. You must select JAX-RPC Client.

Jack G.
  • 3,681
  • 4
  • 20
  • 24