Code: Alles auswählen.
Imports System
Imports System.Net
Module Module2
Sub Main(ByVal args As String())
Dim URL As String = "http://<Server>/sap/bc/soap/rfc?sap-client=999"
Dim cred As ICredentials = New NetworkCredential(<user>, <Passwort>)
Dim svc As New WebReference1.STFC_CONNECTIONService()
Dim requtext As String, resptext As String, echotext As String
svc.Url = URL
svc.Credentials = cred
requtext = "hello world"
echotext = svc.STFC_CONNECTION(requtext, resptext)
System.Console.WriteLine("ECHO: " + echotext)
System.Console.WriteLine("RESP: " + resptext)
System.Console.Read()
End Sub
End Module
Code: Alles auswählen.
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="urn:sap-com:document:sap:rfc:functions" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="urn:sap-com:document:sap:rfc:functions" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema targetNamespace="urn:sap-com:document:sap:rfc:functions">
<s:element name="STFC_CONNECTION">
<s:complexType>
<s:all>
<s:element name="REQUTEXT">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="255" />
</s:restriction>
</s:simpleType>
</s:element>
</s:all>
</s:complexType>
</s:element>
<s:element name="STFC_CONNECTION.Response">
<s:complexType>
<s:all>
<s:element name="ECHOTEXT">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="255" />
</s:restriction>
</s:simpleType>
</s:element>
<s:element name="RESPTEXT">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="255" />
</s:restriction>
</s:simpleType>
</s:element>
</s:all>
</s:complexType>
</s:element>
</s:schema>
</types>
<message name="STFC_CONNECTIONInput">
<part name="parameters" element="s0:STFC_CONNECTION" />
</message>
<message name="STFC_CONNECTIONOutput">
<part name="parameters" element="s0:STFC_CONNECTION.Response" />
</message>
<portType name="STFC_CONNECTIONPortType">
<operation name="STFC_CONNECTION">
<input message="s0:STFC_CONNECTIONInput" />
<output message="s0:STFC_CONNECTIONOutput" />
</operation>
</portType>
<binding name="STFC_CONNECTIONBinding" type="s0:STFC_CONNECTIONPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="STFC_CONNECTION">
<soap:operation soapAction="http://www.sap.com/STFC_CONNECTION" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="STFC_CONNECTIONService">
<documentation>SAP Service STFC_CONNECTION via SOAP</documentation>
<port name="STFC_CONNECTIONPortType" binding="s0:STFC_CONNECTIONBinding">
<soap:address location="http://<server>/sap/bc/soap/rfc" />
</port>
</service>
</definitions>