This is really just a personal learning exersize for me. The actual
web service (and it may not finalize to a web service, I'm just trying
to learn the mechanics) will have a much more sophisticated set of
calculations at the BL. So I'm sorting through some textbooks and
online trying to learn the mechanics of this basic syntax for passing
two varables back to a web service from a .aspx that references that
web service.
I have a start from the client's code-behind:
Protected Sub AreaButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles AreaButton.Click
Dim wsConvert As New com.Widgets.aWebService2
Dim paperArea As Integer
???? = TextBoxPaperSizeA.Text
???? = TextBoxPaperSizeB.Text
lblArea.Text = "Paper area = " & paperArea
End Sub
Then the WSDL referenced:
<wsdl:message name="AreaSoapIn">
<wsdl:part name="parameters" element="tns:Area" />
</wsdl:message>
<wsdl:message name="AreaSoapOut">
<wsdl:part name="parameters" element="tns:AreaResponse" />
</wsdl:message>
And the method found in the .asmx:
<System.Web.Services.WebMethod()> _
Public Function Area(ByVal Weight As Integer, _
ByVal Length As Integer, ByVal Width As Integer) As Integer
Return (Area = (Length * Width))
End Function
On Sep 28, 3:22 am, Cerebrus <[EMAIL PROTECTED]> wrote:
> Me neither ! I also don't see the need to introduce a webservice into
> the equation. Understandably, the OP wants to remove the BL part of
> the calculation from the ASPX code behind. But the more logical way to
> do that would have been in a class library.
>
> On Sep 27, 10:55 pm, CK <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm not entirely sure what your problem is here, you just need to read
> > the values from the text boxes and use the variables when you call the
> > webservice.
>
> > On 26 Sep, 19:23, Brock <[EMAIL PROTECTED]> wrote:
>
> > > I had to repost this again as the subject thread was chabged to
> > > something totally different than my OP. Please provide any feedback on
> > > this problem I'm working on... Thanks:
>
> > > Thanks in advance... I have a client .asmx that I feel is constructed
> > > correctly (anyone know a way to test without wrinting a client?).
> > > What
> > > this service is designed to do is to take two values from the
> > > client's
> > > textboxes (paper size width and length), multiply those two (on the
> > > server side's .asmx) and have the result displayed as the paper's
> > > area
> > > on a client: e.g 20"x26" = 520"^2. I have a much more complicated
> > > progect in reality as far as the math goes so I rally need to keep
> > > the
> > > calculations on the .asmx side rather than the code behind of
> > > the .aspx client. Thus the server .asmx is:
>
> > > <System.Web.Services.WebMethod()> _
> > > Public Function Area(ByVal Weight As Integer, _
> > > ByVal Length As Integer, ByVal Width As Integer) As Integer
> > > Return (Area = (Length * Width))
> > > End Function
>
> > > Then on the client side's .aspx I have:
>
> > > <asp:Button ID="AreaButton" runat="server"
> > > <asp:TextBox ID="TextBoxPaperSizeA" runat="server"
> > > Width="50px"></asp:TextBox>
> > > <asp:TextBox ID="TextBoxPaperSizeB" runat="server"
> > > Width="50px"></asp:TextBox>
> > > <asp:Label ID="lblArea" runat="server" style="font-weight:
> > > 700">Area</asp:Label>
>
> > > With this incomplete code-behind that has me puzzled... any clues?:
>
> > > Protected Sub AreaButton_Click(ByVal sender As Object, ByVal e As
> > > System.EventArgs) _
> > > Handles AreaButton.Click
>
> > > Dim wsConvert As New com.Widget.aWebService2
>
> > > Dim paperArea As Integer
>
> > > Dim ‘??????
>
> > > lblArea.Text = "Paper area = " & _
>
> > > wsConvert.Area(paperArea).ToString ‘??????
> > > End Sub- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
<p><a href="http://feeds.feedburner.com/DotNetDevelopment"><img
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&fg=444444&anim=1"
height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---