Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Framework ignores wsdl schema

$
0
0

Hi everyone,

 

I built a very simple schema and for some reasons the framework ignores the restrictions.

The web service methode has a parameter that I would like to set a max length.

The problem is that I succeed calling the web service and passing a parameter with a length bigger than expected.

 

Here is the schema:

 

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://test.ilg/" targetNamespace="http://test.ilg/">

<wsdl:types>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test.ilg/" version="1.0">

<xs:element name="sayHello" type="tns:sayHello"/>

<xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>

<xs:complexType name="sayHello">

<xs:sequence>

<xs:element name="newarg">

<xs:simpleType>

    <xs:restriction base="xs:string">

       <xs:minLength value="1"/>

       <xs:maxLength value="5"/>

    </xs:restriction>

</xs:simpleType>

</xs:element>

</xs:sequence>

</xs:complexType>

<xs:complexType name="sayHelloResponse">

<xs:sequence>

<xs:element minOccurs="0" name="return" type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:schema>

</wsdl:types>

<wsdl:message name="sayHelloIn">

<wsdl:part element="tns:sayHello" name="parameters"/>

</wsdl:message>

<wsdl:message name="sayHelloOut">

<wsdl:part element="tns:sayHelloResponse" name="sayHelloResponse"/>

</wsdl:message>

<wsdl:portType name="Test">

<wsdl:operation name="sayHello" parameterOrder="parameters">

<wsdl:input message="tns:sayHelloIn"/>

<wsdl:output message="tns:sayHelloOut"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="TestBinding" type="tns:Test">

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="sayHello">

<soap:operation soapAction=""/>

<wsdl:input>

<soap:body parts="parameters" use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="TestService">

<wsdl:port binding="tns:TestBinding" name="TestBeanPort">

<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://server/TestService/Test"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

 

 

 

Thanks a lot.

 

Regards.


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>