SpringBoot integrated LOMBOK

2022-12-31   ES  

http://www.blogjava.net/nobody_am/articles/7577.html

1.Service file code:


Imports
 System.Web.Services


<
System.Web.Services.WebService(

Namespace := http://tempuri.org/VSService/Service1)> _
Public Class Service1
    
Inherits System.Web.Services.WebService

#Region 
 Web Services Designer Generated Code “

    Public Sub New()
        
MyBase.New()

        
This call is required by the Web Services Designer.
        InitializeComponent()

        
Add your own initialization code after the InitializeComponent() call

    
End Sub


    
Required by the Web Services Designer
    Private components As System.ComponentModel.IContainer

    
NOTE: The following procedure is required by the Web Services Designer
    It can be modified using the Web Services Designer.  
    Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        components 
= New System.ComponentModel.Container()
    
End Sub


    
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        
CODEGEN: This procedure is required by the Web Services Designer
        Do not modify it using the code editor.
        If disposing Then
            
If Not (components Is NothingThen
                components.Dispose()
            
End If
        
End If
        
MyBase.Dispose(disposing)
    
End Sub


#
End Region

    
 WEB SERVICE EXAMPLE
     The HelloWorld() example service returns the string Hello World.
     To build, uncomment the following lines then save and build the project.
     To test this web service, ensure that the .asmx file is the start page
     and press F5.
    
    <WebMethod()> _
    Public Function HelloWorld() As String
       Return “Hello World”
  End Function

  
<WebMethod()> Public Function add(ByVal a As IntegerByVal b As IntegerAs String
    add 
= CStr(a + b)
  
End Function

End Class

2. Asp.net call, add web references.


Dim
 s 
As
 
String

 

Dim
 t 
As
 
New
 mingservice.Service1
 ResultAdd.Text 

=
 t.add(
CInt
(Param1.Text), 
CInt
(Param2.Text))

3. VB6 call, install soaptoolkit20.exe. Add References: C:/Program Files/CommonFiles/MSSoap/Binaries/MSSOAP1.dll.


Dim
 sc 
As
 
New
 MSSOAPLib.SoapClient
sc.mssoapinit 


http://192.168.0.8/VSService/Service1.asmx?WSDL”


Text3.Text 
=
 sc.Add(
CInt
(Text1.Text), 
CInt
(Text2.Text))

4.ASP call, install soaptoolkit20.exe. Add References: C:/Program Files/Common Files/MSSOAP/BINARIES/MSSOAP1.dll.



<%


Dim t1,t2,t3,SSO
t1 
= Request.Form(text1)
t2 
= Request.Form(text2)
SET  SSO = Server.CreateObject(MSSOAP.SoapClient)  
SSO.ClientProperty(
ServerHTTPRequest)  =  True  
Call  SSO.mssoapinit(http://192.168.0.8/VSService/Service1.asmx?WSDL)  
t3
=SSO.add(CInt(t1),CInt(t2))  

%>


<
form 
action
=”http.asp”
 METHOD
=”POST”
>

  

<
div 
align
=”center”
 
>

  

<
input 
type
=”text”
 name
=”text1″
 value
=”0″
>

  

<
input 
type
=”text”
 name
=”text2″
 value
=”0″
>

  

<
input 
type
=”text”
 name
=”text3″
 value
=”<%=t3%>”
>

  

</
div
>


<
br
>

 

<
div 
align
=”center”
 
><
input 
type
=”submit”
 name
=”Submit”
 value
=”Ìá½»”
></
div
>


</
form
>

5. ASP HTTP request:



<%


Dim t1,t2,t3
t1 
= Request.Form(text1)
t2 
= Request.Form(text2)
url 
= http://192.168.0.8/VSService/Service1.asmx/add”
SoapRequest=a=&t1&&b=&t2&
Set xmlhttp = server.CreateObject(Msxml2.XMLHTTP)
xmlhttp.Open 
POST,url,false
xmlhttp.setRequestHeader 
Content-Typeapplication/x-www-form-urlencoded”
xmlhttp.setRequestHeader HOST,192.168.0.8″
xmlhttp.setRequestHeader Content-Length,LEN(SoapRequest)
xmlhttp.Send(SoapRequest) 
If xmlhttp.Status = 200 Then
 
Set xmlDOC = server.CreateObject(MSXML.DOMDocument)
 xmlDOC.load(xmlhttp.responseXML) 
 t3
=xmlDOC.childNodes(1).Text
 
Set xmlDOC = nothing
Else
 Response.Write xmlhttp.Status
&&nbsp;”
 Response.Write xmlhttp.StatusText
End if
Set xmlhttp = Nothing

%>


<
form 
action
=”http.asp”
 METHOD
=”POST”
>

  

<
div 
align
=”center”
 
>

  

<
input 
type
=”text”
 name
=”text1″
 value
=”0″
>

  

<
input 
type
=”text”
 name
=”text2″
 value
=”0″
>

  

<
input 
type
=”text”
 name
=”text3″
 value
=”<%=t3%>”
>

  

</
div
>


<
br
>

 

<
div 
align
=”center”
 
><
input 
type
=”submit”
 name
=”Submit”
 value
= “Submit”
></
div
>


</
form
>

source

Related Posts

SETOOLKIT cloning website to get user information

JENKINS Gradle plug -in configuration

ROS-Kinetic Machine Speaking SDKLSG

android okhttp get 请求带参数

SpringBoot integrated LOMBOK

Random Posts

nginx is forward to the agent HTTP and HTTPS, and use the LUA script to repost the non -80, 443 port

DirectX Early Volume

Email letter head information analysis

java web implementation file package download function (reprinted) Gabriel

linux C ——Shell programming basic entry ELEANOR