Simon Fell > Its just code
Saturday, December 28, 2002
Rss Validator
I patched my copy of PocketSOAP to workout the chunked problem below, so I could finish the sample. I ran the WSDL through the RC1 tool [a local copy of the WSDL with a couple of fixes in], then added the DOMElement serializer class, which is just a class with
Implements ISoapSerializer Private Sub ISoapSerializer_Serialize(Val As Variant, _ ByVal ctx As PocketSOAP.ISerializerContext, _ ByVal dest As PocketSOAP.ISerializerOutput) Dim n As MSXML2.IXMLDOMElement Set n = Val dest.WriteTextNoEncoding n.xml End SubTweaked the generated configuration code by removing the code it generated for the request class, and added a line to register the new serializer
m_sf.Serializer "{2933BF86-7B36-11D2-B20E-00C04F983E60}", "", "", "Rss.s_DOMElement"and finally tweaked the generated method stub, so that it was a bit smarter, you can pass a DOM, or a fileName/URL and it'll load it for you. That wraps up the proxy object. The calling app is then straightfoward enough
Private Sub Command1_Click() Dim v As New Rss.Validator Dim vr As Rss.Response Set vr = v.Validate(tFile.Text) Dim i As Long List1.Clear On Error GoTo emptyArray For i = LBound(vr.Message) To UBound(vr.Message) printMsg vr.Message()(i), i Next Exit Sub emptyArray: List1.AddItem "No Errors !" End SubWhen the chunked encoding issue is resolved one way or the other, I'll post all the code to the samples site.
Chunked encoding Almost have the RSS Validator sample done, I'm generating a valid request (the required DOM Serializer class weights in at 3 lines of VB), but the response uses chunked encoding which shouldn't be a problem, PocketSOAP can handle that, but the server doesn't appear to be following the HTTP spec, in particular i get
Transfer-Encoding: chunkedWhat you can't see is that the chunk length (dd in this case) is followed by a space character before the CRLF bytes. (the hex viewer in YATT is a wonderful thing!). Looking at the spec for chunked encoding and the relevant BNF, I see nothing that says that white space is valid in that position. Did I miss something, or is this broken ?
Content-Type: text/xml
dd
<?xml version ....
Rss Validator Sam Ruby asks if the WSDL wizard can handle the SOAP interface to the RSS validator. The short answer is no. The problem is this
<xsd:complexType name="Request">
<xsd:sequence>
<xsd:any namespace="##other"/>
</xsd:sequence>
</xsd:complexType>
There's no built in support for xsd:any at this point, largely because there is no single COM based DOM implementation available for all the platforms PocketSOAP supports. Does that mean you can't use PocketSOAP with the RSS validator, no, it just means its slightly more work. I'll put together a sample for it.
MSNAmp Seems to be a day for shipping code, I updated MSNAmp so that you can configure how it builds your display name. Look at the MSNAmp preference panel in Winamp for details.
WSDL Finally wrapped up RC1 of the WSDL Wizard. It supports doc/lit and rpc/encoded, SOAP headers, enumerations, complex types and import [most of the stuff that auto-gen'd WSDL uses, but not everything in XSD]
TcpTrace As Tomas asked nicely, I just posted v0.7.3 of TcpTrace. Keep those suggestions rolling in!.
TcpTrace Just posted v0.7.2 which adds the option to fix up linefeeds from non-windows platforms so that they display properly. Thanks to Eric Promislow for the suggestion.