PDA

View Full Version : SOAP SAXException QName


zool
04-07-2006, 07:42 AM
Hello all !

I have a problem with my Web Service application.

My Web Service is on a PHP server and it work fine whith a PHP client but not with an OpenLaszlo client ...

I use this WSDL file :

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Test"
targetNamespace="urn:Test"
xmlns:typens="urn:Test"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>
<xsd:schema wmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:Test">
<xsd:complexType name="AdresseResult">
<xsd:all>
<xsd:element name="resultAdresse" type="typens:ArrayOfString" />
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ArrayOfstring">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="string[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
</types>

<message name="test3Request">
<part name="arg" type="xsd:string"/>
</message>
<message name="test3Response">
<part name="return" type="typens:AdresseResult"/>
</message>

<portType name="TestPort">
<operation name="test3">
<input message="typens:test3Request"/>
<output message="typens:test3Response"/>
</operation>
</portType>

<binding name="TestBinding" type="typens:TestPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="test3">
<soap:operation soapAction="urn:TestAction"/>
<input>
<soap:body use="encoded" namespace="urn:Test"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:Test"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>

<service name="TestService">
<port name="TestPort" binding="typens:TestBinding">
<soap:address location="http://localhost/server2.php"/>
</port>
</service>

</definitions>



And my OpenLaszlo application is :

<canvas debug="true">
<debug x="0" y="230" width="340" height="300" />

<dataset name="adresseDset" />

<soap name="test" wsdl="http://localhost/server2.php?wsdl">
<method event="onload">
Debug.write ('Soap Test Client Service loaded');
</method>

<method event="ontimeout" args="error">
Debug.write ('timeout : ', error);
</method>

<remotecall funcname="test3" dataobject="adresseDset">
<param value = "${Id.text}" />
<method event="onerror" args="error">
Debug.write ('Error : ', error);
</method>
<method event="ondata" args="data">
Debug.write (data);
</method>
</remotecall>

</soap>

<window title="Test Soap" x="5" width="350" height="230">
<view x="5" y="5">
<edittext id="Id" />
<button text="Submit" x="120"
onclick="Debug.write ('Submit ...');
test.test3.invoke ()" />
</view>
</window>

</canvas>


When I execute this application the debugger write :

test load error: data source error for soap://soap: SAXException: Element or attribute do not match QName production: QName::=(NCName':')?NCName

Someone has an idea why this code doesn't work ?

Regards