PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > PHP/SOAP WDSL Restrictions
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
PHP/SOAP WDSL Restrictions

Réponse
 
LinkBack Outils de la discussion
Vieux 09/05/2008, 11h01   #1
Paul van Brouwershaven
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHP/SOAP WDSL Restrictions

Hi All,

I'm struggling with the WDSL restrictions in PHP/SOAP for a while know. I would like to create some
simple restrictions in my WDSL file.

The script are running both on the same server with PHP Version 5.2.6 with the official soap extension.

On both my client and server there is some error configuration:

error_reporting(E_ALL);

ini_set("soap.wsdl_cache_enabled", "0");
use_soap_error_handler(true);

In my WDSL file there are some restrictions like:

A rule to accept only numbers, PHP/SOAP is translating not numbers to 0. (but I want an error message!)

<xsd:element name="streetNumber" minOccurs="1" maxOccurs="1" type="xsd:int">

Almost the same for this more advanced restriction, you can provide every string. There is no error
message and the whole string is accepted by my server.

<xsd:simpleType name="Email">
<xsd:restriction base="xsd:string">
<xsd:pattern
value="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$">
</xsd:pattern>
</xsd:restriction>
</xsd:simpleType>

I hope there are some people that have some more experience with PHP/SOAP and the use of
restrictions who can me with this!

Best regards,

Paul
  Réponse avec citation
Vieux 09/05/2008, 11h14   #2
Paul van Brouwershaven
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP/SOAP WDSL Restrictions

> I'm struggling with the WDSL restrictions in PHP/SOAP for a while
Sorry, I mean WSDL instead of WDSL.

But of course the problem stays the same :-)
  Réponse avec citation
Vieux 11/05/2008, 20h14   #3
campionedelmonde2006@googlemail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP/SOAP WDSL Restrictions

On May 9, 10:01am, p...@vanbrouwershaven.com (Paul van Brouwershaven)
wrote:
> Hi All,
>
> I'm struggling with the WDSL restrictions in PHP/SOAP for a while know. I would like to create some
> simple restrictions in my WDSL file.
>
> The script are running both on the same server with PHP Version 5.2.6 withthe official soap extension.
>
> On both my client and server there is some error configuration:
>
> error_reporting(E_ALL);
>
> ini_set("soap.wsdl_cache_enabled", "0");
> use_soap_error_handler(true);
>
> In my WDSL file there are some restrictions like:
>
> A rule to accept only numbers, PHP/SOAP is translating not numbers to 0. (but I want an error message!)
>
> <xsd:element name="streetNumber" minOccurs="1" maxOccurs="1" type="xsd:int">
>
> Almost the same for this more advanced restriction, you can provide every string. There is no error
> message and the whole string is accepted by my server.
>
> <xsd:simpleType name="Email">
> <xsd:restriction base="xsd:string">
> <xsd:pattern
> value="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$">
> </xsd:pattern>
> </xsd:restriction>
> </xsd:simpleType>
>
> I hope there are some people that have some more experience with PHP/SOAP and the use of
> restrictions who can me with this!
>
> Best regards,
>
> Paul


In my experience of PHP/SOAP developement this is very complex to
achieve. To get around this I had to build a function which took all
the data and compared it against a database of all accepted values,
and then return error message saying what was sent and what were they
accepted values for this field.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 20h39.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09146 seconds with 11 queries