Hi Mike,
How are you doing on this issue, does the things mentioned in my last reply
helps a little?
If there're anything else we can help, please feel free to post here.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
X-Tomcat-ID: 53221011
References: <40************ *************** *******@microso ft.com>
<88************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001 _4EBBA602"
Content-Transfer-Encoding: 7bit
From:
st*****@online. microsoft.com (Steven Cheng[MSFT])
Organization: Microsoft
Date: Fri, 28 Oct 2005 03:03:05 GMT
Subject: RE: Validate messages
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Message-ID: <Ef************ **@TK2MSFTNGXA0 1.phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Lines: 222
Path: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :8397
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Hi Mike,
The .NET framework's xml webservice (asp.net) framework doesn't provide
buildin message validation by XSD... For customized Schema validation
through the XSD, we can utilize the SoapExtension in the ASP.NET webservice
framework. SoapExtension allow us to perform pre/post processing on
request/respone SOAP message stream. Also, we can define multiple
soapExtensions so as to chain them. Here is a msdn article mentioned using
SoapExtension to do Schema validation on ASP.NET webservice's SOAP message:
#Extend the ASP.NET WebMethod Framework by Adding XML Schema Validation
http://msdn.microsoft.com/msdnmag/is...tion/default.a
spx
Also, some additional tech article and reference on SOAPExtension:
# Using SOAP Extensions in ASP.NET
http://msdn.microsoft.com/msdnmag/is...n/default.aspx
#Altering the SOAP Message Using SOAP Extensions
http://msdn.microsoft.com/library/en...ringSOAPMessag
eUsingSOAPExten sions.asp?frame =true
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
Thread-Topic: Validate messages
thread-index: AcXa7JF9Y74BLei NRSSh4yojEX+1uQ ==
X-WBNR-Posting-Host: 165.176.240.10
From: "=?Utf-8?B?TWlrZSBMb2d hbg==?=" <Mi*******@comm unity.nospam>
References: <40************ *************** *******@microso ft.com>
Subject: RE: Validate messages
Date: Thu, 27 Oct 2005 04:50:03 -0700
Lines: 40
Message-ID: <88************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
microsoft.publi c.dotnet.framew ork.webservices :8383
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Well I just noticed that "WSDL.exe" doesn't generate a type with
"maxLength"
and "minLength" in the client proxy or server side stub. WSDL.exe
generates
a field instead of a property. I know that .Net 2.0 has an option for
generating properties instead of fields.
Also those attributes do not validate the message. In my XSD, I defined a
"complexTyp e" that a child element that was restricted on minLength and
maxLength. On the client, I was able to send that "complexTyp e" with more
than 50 characters, and it went through fine.
Thanks.
--
Mike Logan
"Mike Logan" wrote:
How do I validate messages? If my schema has a simpleType with facets
like "minExclusi ve" and "maxLength" will the .Net framework validate the
message before running the web service? This is what one of my server stubs look
like.
<System.Web.Ser vices.WebMethod Attribute(), _
System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://me.com/xml
/wsdl/AppSec/getApplicationL ist", RequestElementN ame:="getApplic ationListReques t",
RequestNamespac e:="http://me.com/xml/xsd/AppSec1.xsd",
ResponseNamespa ce:="http://me.com/xml/xsd/AppSec1.xsd",
Use:=System.Web .Services.Descr iption.SoapBind ingUse.Literal,
ParameterStyle: =System.Web.Ser vices.Protocols .SoapParameterS tyle.Wrapped)>
_ Public MustOverride Function getApplicationL ist() As
<System.Xml.Ser ialization.XmlE lementAttribute ("apps")> application()
I would assume with all those "attributes " some sort of validation should
occur? FYI: I generate my server stubs using WSDL.exe, from a WSDL,
that was created with SOA Editor.
Thanks, Mike L.
--
Mike Logan