<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Tried that get the following:<br>
<img src="cid:part1.01050506.07040302@gravytrain.co.uk" alt=""><br>
<div class="moz-cite-prefix">On 06/08/12 11:21,
<a class="moz-txt-link-abbreviated" href="mailto:michael.vancanneyt@wisa.be">michael.vancanneyt@wisa.be</a> wrote:<br>
</div>
<blockquote
cite="mid:alpine.DEB.2.00.1208061221180.25121@fsb.wals.be"
type="cite">
<br>
Hi,
<br>
<br>
In the generated hello.pas, try changing 'literal' to 'document'
in the
<br>
following calls:
<br>
<br>
mm.SetOperationCustomData(
<br>
sUNIT_NAME,
<br>
'HelloWorldPortType',
<br>
'hello',
<br>
'FORMAT_Input_EncodingStyle',
<br>
'literal'
<br>
);
<br>
mm.SetOperationCustomData(
<br>
sUNIT_NAME,
<br>
'HelloWorldPortType',
<br>
'hello',
<br>
'FORMAT_OutputEncodingStyle',
<br>
'literal'
<br>
);
<br>
<br>
Michael.
<br>
<br>
On Mon, 6 Aug 2012, Ian Godman wrote:
<br>
<br>
<blockquote type="cite">Hi
<br>
<br>
I have been having an issue with a "Hello World" web service.
<br>
<br>
The first issue was Lazarus throwing an error when processing
the
<br>
response. This was chased down to chunking. Having disabled the
<br>
chunking on the web-service no error is thrown. The trouble is
now there
<br>
are no results either!
<br>
<br>
I have generated the Lazarus code using the Web Service Toolkit
and
<br>
importing the WDSL (attached).
<br>
<br>
My code that makes use of the generated classes is:
<br>
<br>
<br>
program webservice;
<br>
<br>
{$mode objfpc}{$H+}
<br>
<br>
uses
<br>
{$IFDEF UNIX}{$IFDEF UseCThreads}
<br>
cthreads,
<br>
{$ENDIF}{$ENDIF}
<br>
Classes,
<br>
{ you can add units after this }
<br>
hello, hello_proxy, soap_formatter, logger_extension,
<br>
fpc_http_protocol;
<br>
<br>
{$R *.res}
<br>
var
<br>
service : HelloWorldPortType;
<br>
serviceText : hello_Type ;
<br>
responce : helloResponse ;
<br>
begin
<br>
FPC_RegisterHTTP_Transport();
<br>
Register_hello_ServiceMetadata();
<br>
WriteLn('Web Services Toolkit');
<br>
WriteLn();
<br>
service := wst_CreateInstance_HelloWorldPortType();
<br>
serviceText:= hello_Type.create();
<br>
serviceText.arg0:='fred_test';
<br>
<br>
WriteLn( 'making service request' );
<br>
responce:=service.hello(serviceText);
<br>
if (responce=nil) then
<br>
WriteLn( 'have NO service responce' )
<br>
else
<br>
WriteLn( 'have service responce' );
<br>
end.
<br>
<br>
<br>
The web service is written in Java and has a single string
parameter
<br>
which is returned appended to the text "Hello ".
<br>
<br>
Example retuned (taken using SOAPUI)
<br>
<br>
<soap:Envelope
xmlns:soap=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/envelope/">"http://schemas.xmlsoap.org/soap/envelope/"</a>>
<br>
<soap:Body>
<br>
<ns1:helloResponse xmlns:ns1=<a class="moz-txt-link-rfc2396E" href="http://example.org/">"http://example.org/"</a>>
<br>
<ns1:return>Hello George</ns1:return>
<br>
</ns1:helloResponse>
<br>
</soap:Body>
<br>
</soap:Envelope>
<br>
<br>
With the chunking enabled I get an error referring to an
unexpected
<br>
character before the '<' which suggests to me that the
response is being
<br>
processed. But when the chunking is removed I no longer get the
error
<br>
and the response is null.
<br>
<br>
Any ideas ?
<br>
<br>
I dont want to have to use C !
<br>
<br>
<br>
<br>
</blockquote>
<br>
--
<br>
_______________________________________________
<br>
Lazarus mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>