By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,523 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,523 IT Pros & Developers. It's quick & easy.

Working with XML WDDX Packets using VB.Net

P: n/a
I am building a web based system using ASP.NET and VB.NET
which has to interact with a web service which uses XML
WDDX packets.

I have been given the XML Packet Specification by the Web
Service Provider but can't work out the best way to
interact with the WDDX packets.

Basically the way the Web Service works is that you send
a WDDX formatted Request packet to the given URL, their
service carries out search on their databases ( Electoral
registers and telephone directories) and then returns
either an Error packet or a Return packet with the search
results. The return packet stores the return data in WDDX
recordsets.

It seems that if I was using cold fusion then it would be
relatively easy as they have included WDDX technology
within their new release. I am using ASP.NET with Visual
Studio and I am confused regarding the best way to
interact with the WDDX Technology.

What I need to be able to do is

a) place variables values into the Request Packet ( does
the packet structure have to be a template like a xslt
style sheet?
b) send the request packet to the Web Service
c) extract the information from the Return Packets WDDX
recordsets and place them into my own variable /
parameters

Here are the structures of the Packets:

REQUEST PACKET:

Each request packet must take this general form:

<wddxPacket version='1.0'>
<header></header>
<data>
<struct>
<var name='VARIABLE'>
<string>VALUE</string>
</var>
<var name='VARIABLE2'>
<string>VALUE2</string>
</var>
....
<var name='VARIABLEX'>
<string>VALUEX</string>
</var>
</struct>
</data>
</wddxPacket>

And should be posted to:
http://corporate.192.com/xml/index.cfm

Variable names and values as follows.

All search packets must contain these variables:

USERNAME - As specified by your Corporate.192 account
manager.
PASSWORD - As above.

As well as either:

TYPE - The type of search you are trying to carry out.

RETURN PACKET

<wddxPacket version='1.0'>
<header></header>
<data>
<struct>
<var name='BT'>
<recordset rowCount='0'
fieldNames='FORENAME,SURNAME,NAME,COMPANY,SUB,BUSD ESC,SUBB
UILD,BUILDING,DOORNO,STREET,VILLAGE,POSTTOWN,COUNT Y,POSTCO
DE,TELEPHONE,LINE_TYPE,TARIFF'>
<field name='FORENAME'></field>
<field name='SURNAME'></field>
<field name='NAME'></field>
<field name='COMPANY'></field>
<field name='SUB'></field>
<field name='BUSDESC'></field>
<field name='SUBBUILD'></field>
<field name='BUILDING'></field>
<field name='DOORNO'></field>
<field name='STREET'></field>
<field name='VILLAGE'></field>
<field name='POSTTOWN'></field>
<field name='COUNTY'></field>
<field name='POSTCODE'></field>
<field name='TELEPHONE'></field>
<field name='LINE_TYPE'></field>
<field name='TARIFF'></field>
</recordset>
</var>
<var name='BU'>
<recordset rowCount='0'
fieldNames='COMPANY,LOB,SIC,HOUSENAME,DOORNO,STREE T,VILLAG
E,TOWN,COUNTY,POSTCODE,TELEPHONE,FAX'>
<field name='COMPANY'></field>
<field name='LOB'></field>
<field name='SIC'></field>
<field name='HOUSENAME'></field>
<field name='DOORNO'></field>
<field name='STREET'></field>
<field name='VILLAGE'></field>
<field name='TOWN'></field>
<field name='COUNTY'></field>
<field name='POSTCODE'></field>
<field name='TELEPHONE'></field>
<field name='FAX'></field>
</recordset>
</var>
<var name='ER'>
<recordset rowCount='0'
fieldNames='FORENAME,SURNAME,INIT,SUBBUILD,BUILDNA ME,DOORN
O,STREET,VILLAGE,TOWN,COUNTY,POSTCODE,TELEPHONE'>
<field name='FORENAME'></field>
<field name='SURNAME'></field>
<field name='INIT'></field>
<field name='SUBBUILD'></field>
<field name='BUILDNAME'></field>
<field name='DOORNO'></field>
<field name='STREET'></field>
<field name='VILLAGE'></field>
<field name='TOWN'></field>
<field name='COUNTY'></field>
<field name='POSTCODE'></field>
<field name='TELEPHONE'></field>
</recordset>
</var>
</struct>
</data>
</wddxPacket>

With return data stored in WDDX recordsets.
ERROR Packets

<wddxPacket version='1.0'>
<header></header>
<data>
<struct>
<var name='CODE'>
<string></string>
</var>
<var name='DATETIME'>
<dateTime>2001-9-
12T9:46:26+1:0</dateTime>
</var>
<var name='MESSAGE'>
<string></string>
</var>
</struct>
</data>
</wddxPacket>

CODES:

100 - Unspecified error - see "message" in error packet
for details
101 - Invalid username/password
102 - No search credits left
103 - Account expired
110 - You do not have access to this feature
120 - Not enough search parameters supplied
121 - Not enough search parameters supplied to carry out
BT search
122 - Locality specified in where (for who what where
search) is not recognized
130 - Grid ref not supplied (maps)
131 - Postcode not supplied (maps)
132 - Maps at this scale available in London only
133 - Grid ref not found for postcode supplied
140 - You did not supply customclient variable (for
custom pages)
141 - You did not specify search type in packet
150 - Xml packet not supplied to index page
151 - Error in xml packet

Please note that there will not be an error packet when
no results are found. There will simply be a normal
return packet with row count of zero.

Any help or guidance with this would be extremely helpful.

Thanks

Fraz

Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.