473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Soap Envelope not what expected.

I am trying to create a proxy and soap from a sample file and it won't
create multiple dimensional arrays for some reason. I am getting the same
results if "Line" is not a Multidimensional array. Why is "Line" not there?

I have the following Class that I compile and put into my Bin directory as:

vbc /t:library NewsItem.vb
copy NewsItem.dll bin

*************************************
Namespace myComponents

Public Class NewsItem
Public Headline As String
Public Posted As Date
Public URL As String
Public Line As String ()()
End Class

End Namespace
******************************************

I then have an .asmx file that uses this class:

************************************************** ****
<%@ WebService Class="BetterNewsService" %>

Imports System
Imports System.Web.Services
Imports myComponents

<WebService( Namespace:="http://yourdomain.com/webservices" )> _
Public Class BetterNewsService : Inherits WebService

<WebMethod( CacheDuration:=30 )> Public Function GetNews() As NewsItem()
Dim arrNews( 2 ) As NewsItem

arrNews( 0 ) = New NewsItem
arrNews( 0 ).Headline = "Visit superexpert.com for ASP.NET News!"
arrNews( 0 ).Posted = #12/12/2002#
arrNews( 0 ).URL = "http://www.superexpert.com"

arrNews( 1 ) = New NewsItem
arrNews( 1 ).Headline = "Visit ASPWorkshops for ASP.NET Training!"
arrNews( 1 ).Posted = #2/1/2002#
arrNews( 1 ).URL = "http://www.AspWorkshops.com"

arrNews( 2 ) = New NewsItem
arrNews( 2 ).Headline = "Visit superexpertControls.com for ASP.NET
Controls!"
arrNews( 2 ).Posted = #2/14/2002#
arrNews( 2 ).URL = "http://www.superexpertControls.com"

Return arrNews
End Function

End Class
************************************************** ****
This compiles fine as:

wsdl /l:vb http://localhost/hello/BetterNewsService.asmx?WSDL

The soap envelop is:
************************************************** *****
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetNewsResponse xmlns="http://yourdomain.com/webservices">
<GetNewsResult>
<NewsItem>
<Headline>string</Headline>
<Posted>dateTime</Posted>
<URL>string</URL>
</NewsItem>
<NewsItem>
<Headline>string</Headline>
<Posted>dateTime</Posted>
<URL>string</URL>
</NewsItem>
</GetNewsResult>
</GetNewsResponse>
</soap:Body>
</soap:Envelope>
************************************************** *******

The HTTP Post is:
************************************************** *********
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfNewsItem xmlns="http://yourdomain.com/webservices">
<NewsItem>
<Headline>string</Headline>
<Posted>dateTime</Posted>
<URL>string</URL>
</NewsItem>
<NewsItem>
<Headline>string</Headline>
<Posted>dateTime</Posted>
<URL>string</URL>
</NewsItem>
</ArrayOfNewsItem>
************************************************** **********

Now if I added into the asmx file something like:

arrNews( 0 ).Line(1)(1) = "a test"

I get an error saying that there is no Line in the Class?????

What happened to it?

Thanks,

Tom


Mar 29 '06 #1
0 1214

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cantor | last post by:
Hello everyone :) I am writing some dotNET code to "consume" a web service written in PHP. So far I have been getting some error messages and PHP seems to place HTML text in front of the XML...
0
by: Doug Farrell | last post by:
Hi everyone, I'm trying to build a program to interface to a SOAP/XML interface provided by one of our vendors. This interface is built with MS SOAP Toolkit 3.0, so I'm guessig they are running...
7
by: Eric Osman | last post by:
If my question sounds ill-formed, please cut me some slack as I'm just getting started with this part of the code. We're trying to do an axis soap interface, that is, talk to a site that already...
0
by: Hans Kesting | last post by:
Hi, I'm trying to create a client for some webservice. BUT I have only limited information: * no WSDL available ("expected Q1-06") (it seems to be written in Java) * I don't have access (yet)...
0
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
3
by: Joshua Beall | last post by:
Hi All, I've got the following PHP code: $service = new SoapClient("http://www.webservicex.net/length.asmx? wsdl"); $result = $service->ChangeLengthUnit(10,"Inches","Centimeters");...
2
by: monsalvo | last post by:
What's so wrong with my code? This line is part of a VBScript soap client part of a DTS wich is functional in a 90 percent. strText = .responseXML.selectSingleNode("//" login "loginReturn") ...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.