You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Vishal Shah <sh...@yahoo.com> on 2003/05/22 17:24:06 UTC

SOAP request validation using "types" defined in WSDL

Hi,
 
Has anyone tried or implemented a solution that would validate incoming request using schema types defined in a WSDL doc ?

For e.g. Let's assume following method is exposed as a service and takes in a "partNumber" as an input string. Its simple type is defined with restriction. 
public org.w3c.dom.Element getPartDetails(String partNumber);

Would proxy or server-side skeleton make sure that partNumber string can be of max 20 char and it can have one of two values specified ?

<simpleType name="PartNumber">
  <restriction base="string">
       <maxLength value="20"/>
       <enumeration value= "AAA-A" />
       <enumeration value = "BBB-BB"/>
  </restriction>
</simpleType>

Pl also let me know the alternative avenues to validate incoming request when its type is of type Element (org.w3c.dom.Element) ?

Thanks
VS


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Re: SOAP request validation using "types" defined in WSDL

Posted by Vishal Shah <sh...@yahoo.com>.
Can you share the code snippet ? 

Anne Thomas Manes <an...@manes.net> wrote:You can only do schema validation when using literal encoding. 
----- Original Message ----- 
From: Vishal Shah 
To: soap-user@ws.apache.org 
Sent: Thursday, May 22, 2003 11:24 AM
Subject: SOAP request validation using "types" defined in WSDL


Hi,
 
Has anyone tried or implemented a solution that would validate incoming request using schema types defined in a WSDL doc ?

For e.g. Let's assume following method is exposed as a service and takes in a "partNumber" as an input string. Its simple type is defined with restriction. 
public org.w3c.dom.Element getPartDetails(String partNumber);

Would proxy or server-side skeleton make sure that partNumber string can be of max 20 char and it can have one of two values specified ?

<simpleType name="PartNumber">
  <restriction base="string">
       <maxLength value="20"/>
       <enumeration value= "AAA-A" />
       <enumeration value = "BBB-BB"/>
  </restriction>
</simpleType>

Pl also let me know the alternative avenues to validate incoming request when its type is of type Element (org.w3c.dom.Element) ?

Thanks
VS


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Re: SOAP request validation using "types" defined in WSDL

Posted by Anne Thomas Manes <an...@manes.net>.
You can only do schema validation when using literal encoding. 
  ----- Original Message ----- 
  From: Vishal Shah 
  To: soap-user@ws.apache.org 
  Sent: Thursday, May 22, 2003 11:24 AM
  Subject: SOAP request validation using "types" defined in WSDL


  Hi,

  Has anyone tried or implemented a solution that would validate incoming request using schema types defined in a WSDL doc ?

  For e.g. Let's assume following method is exposed as a service and takes in a "partNumber" as an input string. Its simple type is defined with restriction. 
  public org.w3c.dom.Element getPartDetails(String partNumber);

  Would proxy or server-side skeleton make sure that partNumber string can be of max 20 char and it can have one of two values specified ?
  <simpleType name="PartNumber">
    <restriction base="string">
         <maxLength value="20"/>
         <enumeration value= "AAA-A" />
         <enumeration value = "BBB-BB"/>
    </restriction>
  </simpleType>

  Pl also let me know the alternative avenues to validate incoming request when its type is of type Element (org.w3c.dom.Element) ?

  Thanks
  VS



------------------------------------------------------------------------------
  Do you Yahoo!?
  The New Yahoo! Search - Faster. Easier. Bingo.