im using Delphi 10.3.2 Enterprise Edition.
I used Importer WSDL from Delphi and i get an error:
enter image description here
The WSDL is: http://181.176.170.150:555//ConsultaRUCDNI.svc?wsdl
enter image description here
Thanks for all help
Americo
The declaration
procedure Set_foto(Index : Integer; const ATArray<System.Byte>: TArray<System.Byte>);
is wrong. The correct one is:
procedure Set_foto(Index : Integer; const ATArray: TArray<System.Byte>);
And by the way, TArray<System.Byte> is TBytes so you can write this as well:
procedure Set_foto(Index : Integer; const ATArray: TBytes);
Related
I wrote a Java Service that I call like this in M2DOC my template :
{m:for pc | self.eAllContents(pa::PhysicalComponent)->select(p|p.name.equalsIgnoreCase('the parameter')).eAllContents(pa::PhysicalComponent)}
{m:pc.ServerTable()}
{m:endfor}
because I don't know how to get "the parameter" in my java Service.
In fact I would like to call my Java service like this :
{m:for pc | self.eAllContents(pa::PhysicalComponent)}
{m:pc.ServerTable()}
{m:endfor}
and get all PhysicalComponent with name 'the parameter' in the Java Service and not in the template.
Can someone help me please ?
Thanks
When you write a Java service for M2Doc/AQL (the query language used by M2Doc) the Java method should have at least one parameter but you can add more. You Java method should look like this:
public SomeReturnType serverTable(PhysicalComponent component, String parameter) {
...
}
you can then call it like this in your template :
{m:pc.serverTable('the parameter')}
I am using the MSXML 6.0 parser for XSL transformation and want to fetch <xsl:message terminate="no"> debug messages. From what I found on the net this seems to be possible in .NET.
Is there a way to get the message output when using the COM interface (C++ or Delphi example code would be great)?
Update:
This is the code I use to do the XSL transformation (pretty straight forward):
uses ActiveX, {...} MSXML2_TLB;
function TransformMsXmlDocument( XmlDoc, XslDoc: iXmlDomDocument2 ) : UnicodeString;
var
XslDoc2 : iXmlDomDocument;
XslTemplate : iXslTemplate;
XslProcessor : iXslProcessor;
begin
XslDoc2 := CoFreeThreadedDomDocument60.Create();
XslDoc2.Async := FALSE;
XslDoc2.Load(XslDoc);
XslTemplate := CoXslTemplate60.Create();
XslTemplate.Stylesheet := XslDoc2;
XslProcessor := XslTemplate.CreateProcessor();
XslProcessor.Input := XmlDoc;
XslProcessor.Transform();
result := XslProcessor.Output;
end;
I doubt you can do this with MS XML 6.0.
Like you, I generated the MSXML2_Tlb.Pas import file and tested with code v. similar to yours. The first problem is that the OnReadyStateChange and OnDataAvailable events of the Delphi wrapper components TDomDocument60 and
TFreeThreadedDomDocument60 are never called.
So, then I wrote a OleVariant wrapper for an event sink which connects at run-time to the DomDocument60 via its ConnectionPointContainer interface to get an IConnectionPoint and calling .Advise() on that. I found that this event sink is called, four times, as the XML document loads, each time with a DispID of -609, which is the DispID of onreadystatechange (of XMLDOMDocumentEvents). But a) the Params (PDispParams ) passed to my wrapper's Invoke are empty, and b) its Invoke is not called for ondataavailable nor anything else, in particular ontransformnode (whose DispID I don't know).
So it seems to me firstly that the events of the objects in MSXML2_Tlb aren't working properly and secondly that there is no obvious way of catching the ontransformnode event of the XML document being transformed.
Fwiw, the VB example on the page you linked,
https://msdn.microsoft.com/en-us/library/system.xml.xsl.xsltmessageencounteredeventargs%28v=vs.110%29.aspx
seems to imply that there's a way of getting at XsltMessageEncounteredEventArgs from VB, but I'm not familiar enough with importing the Net libraries into a Delphi project to know what I would need to import to be able to access it. If someone could tell me that, I'd be happy to have a go.
I have implemented a service in C++ using gSoap. I have created it from a multiple existing WSDL files.
And now I need to give a definition to every virtual method of the service.
Let's take a look at one generated method declaration in the file soapMyServiceService.h:
///
/// Service operations (you should define these):
/// Note: compile with -DWITH_PURE_VIRTUAL for pure virtual methods
///
/// Web service operation 'Initialize' (returns error code or SOAP_OK)
virtual int Initialize(_ns5__Initialize *ns5__Initialize, _ns5__InitializeResponse *ns5__InitializeResponse);
Actually, I was expecting to get :
virtial string Initialize(int var_a , int var_b , string var_c);
But now, I need to implement it what I got generated and return the SOAP code :
int MyService::Initialize(_ns5__Initialize *ns5__Initialize, _ns5__InitializeResponse *ns5__InitializeResponse)
{
// HOW can I get here the received values for that I can able to implement my logic?
return SOAP_OK;
}
How can I get the received values ( the values sent by the client for var_a, var_b, and var_c) and then set for him the returned for the string and in the same time return the error code...
How do you normally implement the logic of the services?
Thank you.
In your service method implementation MyService::Initialize(_ns5__Initialize *ns5__Initialize, _ns5__InitializeResponse *ns5__InitializeResponse)
the last argument is the response argument all the rest are input argument, here you have only one input parameter that is of type _ns5__Initialize which probably wud be a structure, if you access its member, you will get all the input parameters of the request.
In my SOAP webservice, i am referencing a dll[.Net Project] ,which contains all the methods in the webservice. I changed data type of one of the method in my dll project ,rebuild it and refrenced the dll in webservice. But still,its pointing to the old dll reference and throwing errors like below,
System.MissingMethodException: Method not found: 'System.Collections.Generic.List`1<COS.IPEDS.Business.School> COS.IPEDS.Business.School.GetSchoolsByCipAndZipCodeByLevel(System.String, Int32, System.String, System.String, System.String ByRef)'.
at ShortTermTraining.findInstitutions.GetInstitutionsProgramsByCipCodeLevelZip(String zipCode, Int32 radius, String cipCode, String awardLevel, String ErrorMsg)
Is there any other place,should I check ?
Thanks,
Vanitha
I need to be able to receive a array (preferably a two dim array) in one of my functions in my webservice. I've tried looking on the internet, but could not find a example piece of code.
Using arrays is fine and normal, but do not have an idea how to make my webservice access them as part of the function parameters. It only needs to be oneway as I will return a string as the function results.
Any help would be appreciated.
Thank you
There's a demo called EchoService, I think it's in the D2007 (and higher) demo directory. It has about a dozen methods, from simple strings to TDateTime, arrays, and structures. Here is the cut-down, showing just the string array handling. I found it on my system here:
C:\Users\Public\Documents\RAD Studio\7.0\Demos\DelphiWin32\VCLWin32\WebServices\EchoService
EchoService_CGI.dpr
IEchoService = interface(IInvokable)
['{EE714217-1763-4EFF-93D7-85C6D5E8180C}']
function echoStringArray(const value: ArrayofString): ArrayofString; stdcall;
end;
TEchoService = class(TInvokableClass, IEchoService)
public
function echoStringArray(const value: ArrayofString): ArrayofString; stdcall;
end;
function TEchoService.echoStringArray(const value: ArrayofString): ArrayofString;
begin
Result := value;
end;