Hi<br><br>I am have a web service written in Java which is working fine when used from SOAPUI.<br><br>I am trying to write a client using Lazarus and WST as I need a client for Windows and OSX and it would be nice if could get it to work with Linux also (I use Suse).<br>
<br>I have managed to get a "Hello World" service working but now am trying something a little more adventurous.<br><br>The problem is that the proxy generated by WST does not make sense to me:<br><br><div style="margin-left:40px">
{<br>This unit has been produced by ws_helper.<br> Input unit name : "hello".<br> This unit name : "hello_proxy".<br> Date : "09/23/12 12:47:48 PM".<br>}<br><br>Unit hello_proxy;<br>
{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}<br>Interface<br><br>Uses SysUtils, Classes, TypInfo, base_service_intf, service_intf, hello,<br> http_cxf_apache_org_aegisTypes, http_example_org;<br><br>Type<br><br>Implementation<br>
uses wst_resources_imp, metadata_repository;<br><br>initialization<br> {$i hello.wst}<br><br> {$IF DECLARED(Register_hello_ServiceMetadata)}<br> Register_hello_ServiceMetadata();<br> {$IFEND}<br>End. <br></div><br><br>
The wdsl I have is generated by CXF and works fine when imported into SOAPUI.<br><br>My WSDL ia at the end of this email.<br><br>The documentation for WST and my previous "Hello World" service leads me to think I should have some code in the proxy to set things like the ServicePortType etc.<br>
<br>I imported it using the latest WST from the repository with the flowing options:<br><ul><li>add generated files to project<br></li><li>Interface file</li><li>Parse all types</li><li>Proxy file</li></ul><p>I am using Lazarus 1.0 with FPC 2.6.0 on OSX.</p>
<br>If I save the Lazarus application before using WST it reports errors reading files but if I create a new project and run the WST import before saving no errors are reported and I can then save every thing fine.<br><br>
<?xml version="1.0" encoding="UTF-8"?><br><wsdl:definitions name="HelloWorld" targetNamespace="<a href="http://example.org/">http://example.org/</a>" xmlns:ns1="<a href="http://schemas.xmlsoap.org/soap/http">http://schemas.xmlsoap.org/soap/http</a>" xmlns:soap="<a href="http://schemas.xmlsoap.org/wsdl/soap/">http://schemas.xmlsoap.org/wsdl/soap/</a>" xmlns:tns="<a href="http://example.org/">http://example.org/</a>" xmlns:wsdl="<a href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"><br>
<wsdl:types><br><xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="<a href="http://example.org">http://example.org</a>" xmlns:ns0="<a href="http://cxf.apache.org/aegisTypes">http://cxf.apache.org/aegisTypes</a>" xmlns:tns="<a href="http://example.org">http://example.org</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"><br>
<xsd:import namespace="<a href="http://cxf.apache.org/aegisTypes">http://cxf.apache.org/aegisTypes</a>"/><br><xsd:complexType name="User"><br><xsd:sequence><br><xsd:element minOccurs="0" name="email" nillable="true" type="xsd:string"/><br>
<xsd:element minOccurs="0" name="enabled" type="ns0:char"/><br><xsd:element minOccurs="0" name="firstname" nillable="true" type="xsd:string"/><br>
<xsd:element minOccurs="0" name="id" type="xsd:long"/><br><xsd:element minOccurs="0" name="password" nillable="true" type="xsd:string"/><br>
<xsd:element minOccurs="0" name="surname" nillable="true" type="xsd:string"/><br><xsd:element minOccurs="0" name="username" nillable="true" type="xsd:string"/><br>
</xsd:sequence><br></xsd:complexType><br></xsd:schema><br><xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="<a href="http://cxf.apache.org/aegisTypes">http://cxf.apache.org/aegisTypes</a>" xmlns:aegisTypes="<a href="http://cxf.apache.org/aegisTypes">http://cxf.apache.org/aegisTypes</a>" xmlns:xs="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"><br>
<xs:simpleType name="char"><br><xs:restriction base="xs:short"><br><xs:minInclusive value="0"/><br></xs:restriction><br></xs:simpleType><br></xs:schema><br>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="<a href="http://example.org/">http://example.org/</a>" xmlns:ns0="<a href="http://example.org">http://example.org</a>" xmlns:tns="<a href="http://example.org/">http://example.org/</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"><br>
<xsd:import namespace="<a href="http://example.org">http://example.org</a>"/><br><xsd:element name="getUser" type="tns:getUser"/><br><xsd:complexType name="getUser"><br>
<xsd:sequence><br><xsd:element minOccurs="0" name="arg0" nillable="true" type="xsd:string"/><br></xsd:sequence><br></xsd:complexType><br><xsd:element name="getUserResponse" type="tns:getUserResponse"/><br>
<xsd:complexType name="getUserResponse"><br><xsd:sequence><br><xsd:element minOccurs="0" name="return" type="ns0:User"/><br></xsd:sequence><br></xsd:complexType><br>
<xsd:element name="hello" type="tns:hello"/><br><xsd:complexType name="hello"><br><xsd:sequence><br><xsd:element minOccurs="0" name="arg0" nillable="true" type="xsd:string"/><br>
</xsd:sequence><br></xsd:complexType><br><xsd:element name="helloResponse" type="tns:helloResponse"/><br><xsd:complexType name="helloResponse"><br><xsd:sequence><br>
<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string"/><br></xsd:sequence><br></xsd:complexType><br></xsd:schema><br> </wsdl:types><br>
<wsdl:message name="getUserResponse"><br> <wsdl:part element="tns:getUserResponse" name="parameters"><br> </wsdl:part><br> </wsdl:message><br> <wsdl:message name="hello"><br>
<wsdl:part element="tns:hello" name="parameters"><br> </wsdl:part><br> </wsdl:message><br> <wsdl:message name="getUser"><br> <wsdl:part element="tns:getUser" name="parameters"><br>
</wsdl:part><br> </wsdl:message><br> <wsdl:message name="helloResponse"><br> <wsdl:part element="tns:helloResponse" name="parameters"><br> </wsdl:part><br>
</wsdl:message><br> <wsdl:portType name="HelloWorldPortType"><br> <wsdl:operation name="getUser"><br> <wsdl:input message="tns:getUser" name="getUser"><br>
</wsdl:input><br> <wsdl:output message="tns:getUserResponse" name="getUserResponse"><br> </wsdl:output><br> </wsdl:operation><br> <wsdl:operation name="hello"><br>
<wsdl:input message="tns:hello" name="hello"><br> </wsdl:input><br> <wsdl:output message="tns:helloResponse" name="helloResponse"><br> </wsdl:output><br>
</wsdl:operation><br> </wsdl:portType><br> <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorldPortType"><br> <soap:binding style="document" transport="<a href="http://schemas.xmlsoap.org/soap/http">http://schemas.xmlsoap.org/soap/http</a>"/><br>
<wsdl:operation name="getUser"><br> <soap:operation soapAction="" style="document"/><br> <wsdl:input name="getUser"><br> <soap:body use="literal"/><br>
</wsdl:input><br> <wsdl:output name="getUserResponse"><br> <soap:body use="literal"/><br> </wsdl:output><br> </wsdl:operation><br> <wsdl:operation name="hello"><br>
<soap:operation soapAction="" style="document"/><br> <wsdl:input name="hello"><br> <soap:body use="literal"/><br> </wsdl:input><br> <wsdl:output name="helloResponse"><br>
<soap:body use="literal"/><br> </wsdl:output><br> </wsdl:operation><br> </wsdl:binding><br> <wsdl:service name="HelloWorld"><br> <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldPort"><br>
<soap:address location="<a href="http://localhost:63081/hello">http://localhost:63081/hello</a>"/><br> </wsdl:port><br> </wsdl:service><br></wsdl:definitions><br><br><br>