|
Nathan,
I agree that doing the database joins from entity framework is the correct way to go. Now, the biggest problem is the stored procedures not only do table joins but also access several database views. The relational design of these databases is crazy. I have a team that are writing all of the database stored procedures but what I can't find is an example of a SQL stored procedure doing the actual database joins for the entity framework model. Also, how would the additional views play into this? I do see how it is done directly in Entity Framework but if someone has an example of the the SQL stored procedure entity join syntax that would be very helpful.
modified 15-May-16 16:58pm.
|
|
|
|
|
You're looking at it incorrectly.
When you handle objects in Entity Framework, the underlying SQL is abstracted and, frankly, immaterial. You can treat a table, SP, or view in exactly the same manner, they're mapped out in the .edmx file. Since you're clearly using Database first, you'll want a look at Entity Framework Relationships - EF Designer[^]. In Entity Framework there aren't really "Joins" (since that's more of a database concept) there are "Associations" (as a more OOP concept) that are defined in your application, and parsed into joins by Entity Framework when querying the data source.
What this allows you to do is ignore the relational structure of the database and implement your own within the confines of your application. It doesn't change the database itself, just how your application looks at it. The best part is that it doesn't lean on the database to provide those details; ie the implementation of a store procedure has no impact on the functionality of Entity Framework.
For my money, it's generally best to use tables as a data source, but that's not always possible. In my mind it gives the purest look at the current state of the data and avoids some of the "gotchas" that can creep up when calling code (functions or SPs) rather than the data itself, or the holes that are often created by views. As a final caveat, tables are the only clean way to write transactions to the database. You can use Functions or Stored Procedures for that, but the implementation and business rules are dependent on the DBA, and I'm not a giant fan of handing off application critical items to a third party; at least in a data-driven, enterprise system. If those are your only options, though, you can work with them seamlessly.
Regardless of the underlying method used to derive the data, it is consumed in exactly the same way in an application context. You will have a collection of entities, defined as classes in your application, mapped to the database by your .edmx file, and instantiated as called by Entity Framework.
So the short answer (that I meandered greatly from) is that it doesn't matter what a Stored Procedures looks like or how it is invoked, as long as it exposes the data that you need in your application, to include the data that you need to form concrete Associations.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Nathan,
I think I understand and was making things more complicated then they are. Because the stored procedure uses a main database to pull back the data then I only need to map to that one database an not worry about the other databases or views that the stored procedure it pulls from. I am sorry for all of the posts back and forth I have causes but now I have learned something I did not know before. Thank you very much!
|
|
|
|
|
I am new @ asp.net ,please answer my problem..
How to use Datarelation to Create Menu in c# asp.net?
|
|
|
|
|
There is no reason to have to use a DataRelation. Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
actually, I have to create menu dynamically using data of two tables... pls guide ....
|
|
|
|
|
It all depends on what kind of menu you want. I'd suggest finding an example online and then implementing it. There are tons of different ways of doing it.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
just explain few types to create menu using dataRelation...thanx in advance
|
|
|
|
|
I am taking input from the keyboard of Emp Date,Expiry Date. Here I am trying to calculate number of days between insurance date and Expiry date.and I am trying to display the value in a text box named as "days left".and also trying to save the data in the table and it should bind to MVC grid Simultaneously.
we are using 'Java script' to achieve the above Task by using "DayDiff()" function.but we are not get it what we are expecting.Please suggest me the best way of approach to achieve the task.
thank you.......
modified 13-May-16 2:03am.
|
|
|
|
|
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.
Everything you wanted to know about SQL injection (but were afraid to ask) | Troy Hunt[^]
How can I explain SQL injection without technical jargon? | Information Security Stack Exchange[^]
Query Parameterization Cheat Sheet | OWASP[^]
Also, you should never connect to your database as sa ; that's an administrator account which could be used to totally destroy your server, or even your network. Your application should connect as a specific user which has only the permissions required by your application.
And if that's your real sa password that you've just posted to a public forum, you should change it immediately. And this time, pick something secure!
Rather than hard-coding your connection string every time you open a connection, store it in the <connectionStrings> section of your web.config file. That way, when you need to change it, you only have to do it in one place.
Your SqlConnection and SqlCommand objects should be wrapped in using blocks to ensure that their resources are always cleaned up:
using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["connectionString"].ConnectionString))
{
...
}
It's generally considered a good idea to move data-access code out of your controller and into a separate "repository" class. That makes it much easier to test the data-access code without having to hit the controller, and to test your controller without touching the database.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Explore JQuery and Ajax.
Also follow the rules that Richard has given to make sure that whatever you do it has to adhere to best practices.
|
|
|
|
|
Has anyone tried to use the Metro-UI-CSS framework with ASP.NET 5.0 in Visual Studio Community 2015?
If so, were you successful? What parts of Metro-UI did you use? Did they work straight out of the box or did you have to add extra code to make them work?
My own experience, which was a very simple test, did not work. I was testing the "slide" capability of a tile where the text changes by sliding down when the cursor is placed within the tile. The initial condition displayed my text at the chosen font size. When the cursor was placed over the tile, the text slid down displaying the new text at my chosen font size, but it also displayed the text at the default font size over the top, thus making it unreadable.
In addition, the footer section, which should be displayed underneath the body section, was placed within the body section of the page; something I have never experienced before.
|
|
|
|
|
Isn't this effectively the same question you asked back in March[^]?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yes it is, to some extent. I have now tried Metro-UI-CSS and found it to be buggy. I am now asking if anyone else has tried it and were they successful or not.
It seems to me that something fundamental is wrong if the classic footer section is placed inside the body section.
|
|
|
|
|
i'm using dropdownlist statically for gender field its not showing me proper data when im trying to update pls help..
Database doesn't contain any special Gender DB table..
Controller code for Edit:
public ActionResult Edit(int id = 0)
{
EmployeeCrud emp = new EmployeeCrud();
var empval = emp.FindById(id);
var empentity = new EmployeeEntity();
if (empval != null)
{
empentity.EmpID = empval.EmpID;
empentity.FirstName = empval.FirstName;
empentity.LastName = empval.LastName;
empentity.ContactNo = empval.ContactNo;
empentity.EmailID = empval.EmailID;
empentity.Address = empval.Address;
empentity.Dob = empval.dob;
empentity.Gender = empval.gender;
empentity.DeptName = empval.DeptName;
empentity.DeptID = empval.DeptID;
empentity.Desination = empval.desination;
empentity.Joining = empval.joining;
empentity.Salary = empval.salary;
}
ViewBag.DeptID = new SelectList(db.Depts, "DeptID", "DeptName", empentity.DeptID);
return View(empentity);
}
[HttpPost]
public ActionResult Edit(EmployeeEntity employee)
{
if (ModelState.IsValid)
{
EmployeeCrud emp = new EmployeeCrud();
var empval = emp.UpdateEmp(employee.EmpID,employee.FirstName,employee.LastName,employee.ContactNo,employee.EmailID,employee.Address,employee.Dob,employee.Gender,employee.DeptID,employee.Desination,employee.Joining,employee.Salary);
db.SaveChanges();
return RedirectToAction("Index");
}
ViewBag.DeptID = new SelectList(db.Depts, "DeptID", "DeptName", employee.DeptID);
return View(employee);
}
Create View Code:
@model MvcEmpCrud3.Models.EmployeeEntity
@{
ViewBag.Title = "Create";
}
Create
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<legend>Employee</legend>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.FirstName, new { placeholder = "Enter First Name here"})
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.FirstName)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.LastName)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.LastName, new { placeholder = "Enter Last Name here"})
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.LastName)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.ContactNo)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.ContactNo, new { placeholder = "Enter Contact No here"})
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.ContactNo)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.EmailID)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.EmailID, new { placeholder = "Enter EmailId here" } )
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.EmailID)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Address)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextAreaFor(model => model.Address, new { style = "width: 300px; height: 70px;", placeholder = "Enter title here" })
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Address)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Dob)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.Dob)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Dob)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Gender)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.DropDownList("Gender", new List<SelectListItem>{
new SelectListItem{ Text="Male", Value="Male"},
new SelectListItem{ Text="Female", Value="Female"}
},"Select Gender")
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Gender)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.DeptID, "Dept")
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.DropDownList("DeptID",@ViewBag.DeptID as SelectList,"Select Department")
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.DeptID)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Desination)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.Desination, new { <a href="http://www.codeproject.com/Members/placeholder">@placeholder</a> = "Enter Designation here"})
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Desination)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Joining)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.Joining)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Joining)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Salary)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.Salary, new { <a href="http://www.codeproject.com/Members/placeholder">@placeholder</a> = "Enter Salary here"})
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Salary)
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
}
@Html.ActionLink("Back to List", "Index")
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
<a href="http://www.codeproject.com/Members/scripts">@Scripts</a>.Render("~/bundles/jqueryui")
<a href="http://www.codeproject.com/Members/Styles">@Styles</a>.Render("~/Content/themes/base/css")
<"script type="text/javascript">
$(document).ready(function () {
$("#Dob").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd/mm/yy'
});
$("#Joining").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd/mm/yy'
});
});
</script>
}
Edit View Code:
@model MvcEmpCrud3.Models.EmployeeEntity
@{
ViewBag.Title = "Edit";
}
Edit
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<legend>Employee</legend>
<a href="http://www.codeproject.com/Members/html">@Html</a>.HiddenFor(model => model.EmpID)
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.FirstName)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.FirstName)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.LastName)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.LastName)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.LastName)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.ContactNo)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.ContactNo)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.ContactNo)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.EmailID)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.EmailID)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.EmailID)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Address)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.Address)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Address)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Dob)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.Dob)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Dob)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Gender)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.DropDownListFor(model => model.Gender, new List<SelectListItem> {new SelectListItem{Text="Male",Value="Male"},new SelectListItem{Text="Female",Value="Female"} })
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Gender)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.DeptID, "Dept")
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.DropDownList("DeptID", String.Empty)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.DeptID)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Desination)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.Desination)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Desination)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Joining)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.TextBoxFor(model => model.Joining)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Joining)
</div>
<div class="editor-label">
<a href="http://www.codeproject.com/Members/html">@Html</a>.LabelFor(model => model.Salary)
</div>
<div class="editor-field">
<a href="http://www.codeproject.com/Members/html">@Html</a>.EditorFor(model => model.Salary)
<a href="http://www.codeproject.com/Members/html">@Html</a>.ValidationMessageFor(model => model.Salary)
</div>
<p>
<input type="submit" value="Save" />
</p>
</fieldset>
}
@Html.ActionLink("Back to List", "Index")
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
<a href="http://www.codeproject.com/Members/scripts">@Scripts</a>.Render("~/bundles/jqueryui")
<a href="http://www.codeproject.com/Members/Styles">@Styles</a>.Render("~/Content/themes/base/css")
<"script type="text/javascript">
$(document).ready(function () {
$("#Dob").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "dd-mm-yy"
});
$("#Joining").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "dd-mm-yy"
});
});
</script>
}
|
|
|
|
|
You just dumped a ton of code. You need to narrow it down to specific code and then ask a specific question.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
All I could see that you are using the same SelectList for Gender dropdown. What is your error? Unless you specify exactly what issue you are facing we cannot help you.
Are you expecting the dropdown showing the correct gender by default while Edit view in the page?
|
|
|
|
|
im expecting what is the data(male or Female) on edit field that should be come on dropdown list..
|
|
|
|
|
I would suggest you implement the same logic as you have done for Dept dropdown. GEnerate the select list in the action and set the selected gender in the select list before sending to View.
|
|
|
|
|
Hi to Everyone
What I want to do is read from a database a list of already entered data which has a date as part of the record, I am fine with that, then using the standard ASP controls + free AJAX controls or other free controls where there is no caveat to their use.
Display in a calendar control or the like a standard month style layout but with all the previously used/ selected days highlighted in some way so the user knows what dates have been previously used.
So with the current date being 09/May/2015 (UK Time) if data had been previously entered against
(02/05/2016), (05/05/2016), (08/05/2016)
Those days would be highlighted in the calendar control or similar
I could of course provide a side list of previously used dates in a separate control but where is the challenge in that.
I am not a seasoned ASP person my background is desktop development in VB3, VB5, VB6 VB.Net and C# and T-SQL so I know a thing or two about programming just not the ASP controls or what they can accomplish.
Thanks to all who reads this
|
|
|
|
|
Most calendars support what you are trying to do. What calendar control are you using? JQuery , that sort ?
|
|
|
|
|
Good day
We have a asp.net website high traffic website. When a user registers we store the ip address i that user,when the login we store all ip addreses he used and we have a blocking module which blocks a username and all the ip's associated with that username. So that those who want to create other accounts from same location will be blocked. This morning we had few incidents where we needed to block the fake user. Can anyone scrutinise my approach and there is anything to my approach that i can add to make it rock solid i would appreciate. We also have a mobile app which also does the same in terms of Imei and it blocks the phones which is easy.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
You can ask Chris how hard it is to block the same user, based on data from some previously banned account...
As you may already know IP banning has it disadvantages, but to be honest, there is no really reliable method to block new users based on old data...
No IP address, no email, no user-name and nothing other will for sure connect one account to an other, so always will miss someone bad, why probably block someone innocent...
So with all the sorrow - there is no 'rock solid' solution, but bad and worst only...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Unfortunately it is very hard to identify the users using IP addresses because for some ISPs all customers might have similar IP address. The only way of doing this is installing small programs in the browser and getting their MAC address which is unique for all users but which is not possible without user permission.
|
|
|
|
|
I'm trying to use gSOAP with C++ to pass a std::list of a simple structure using the soapstd2 compiler to generate the relevant WSDL for a legacy application that I'm trying to offer as a web service.
Heres the gSOAP header that I have defined in the legacy C++ app:
#import "stl.h"
class ns__arpaTarget
{
public:
int nTgtNo;
std::string name;
double dRange;
double dBearing;
ns__arpaTarget();
~ns__arpaTarget();
};
class ns__arpaList
{
public:
std::list <ns__arpaTarget> arpa_lst;
};
int ns__getArpaList( ns__arpaList* lst );
I'm compiling this within Visual Studio 2008, with the following pre build event to generate the WSDL:
W:\gSOAP\gsoap-2.8\gsoap\bin\win32\soapcpp2 -I W:\gSOAP\gsoap-2.8\gsoap\import -t W:\gSOAP\gsoap-2.8\gsoap\WS\typemap.dat -j -s gSOAPArpaWebService.h
This is all building fine at the server end (I have an implementation of the function which builds and runs and supplies a list of my simple structure) - it's also generating the WSDL which looks like this:
="1.0"="UTF-8"
<definitions name="Arpa"
targetNamespace="http://localhost:5801/arpa.wsdl"
xmlns:tns="http://localhost:5801/arpa.wsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://localhost:5801/arpa.wsdl"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:HTTP="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="http://localhost:5801/arpa.wsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://localhost:5801/arpa.wsdl"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="arpaTarget">
<sequence>
<element name="nTgtNo" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="dRange" type="xsd:double" minOccurs="1" maxOccurs="1"/>
<element name="dBearing" type="xsd:double" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
<element name="getArpaList">
<complexType>
<sequence>
</sequence>
</complexType>
</element>
<element name="arpaList">
<complexType>
<sequence>
<element name="arpa-lst" type="ns:arpaTarget" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="getArpaList">
<part name="Body" element="ns:getArpaList"/>
</message>
<message name="arpaList">
<part name="Body" element="ns:arpaList"/>
</message>
<portType name="ArpaPortType">
<operation name="getArpaList">
<documentation>Service definition of function ns__getArpaList</documentation>
<input message="tns:getArpaList"/>
<output message="tns:arpaList"/>
</operation>
</portType>
<binding name="Arpa" type="tns:ArpaPortType">
<SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getArpaList">
<SOAP:operation soapAction=""/>
<input>
<SOAP:body parts="Body" use="literal"/>
</input>
<output>
<SOAP:body parts="Body" use="literal"/>
</output>
</operation>
</binding>
<service name="Arpa">
<documentation>service described at http://localhost:5801/ArpaService</documentation>
<port name="Arpa" binding="tns:Arpa">
<SOAP:address location="http://localhost:5801/arpaserver.cgi"/>
</port>
</service>
</definitions>
At the client end I'm referencing the generated gSOAP WSDL and successfully importing the service via an ASP.NET web application - but when I try to use the service function of the imported service to retrieve the list of ns__arpaTarget types the service only offers the following function signature that I don't understand or know how to use (perhaps this is my problem?):
Radar_Services_Web_Client.ArpaSrv.arpaTarget[] ArpaPortTypeClient.getArpaList( Radar_Services_Web_Client.ArpaSrv.getArpaList getArpaList1 )
Note: I have tried this without a list and I am able to get a single structure out from the service into the client call successfully. I've also tried a list of pointers to ns__arpaTarget - as the gSOAP documentation tells me this is a safer way of doing so but the same problem occurs (i.e. I get the same strange signature to use in the client).
Any help would be greatly appreciated. Many thanks, Gary.
|
|
|
|
|