473,773 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A Question about using SOAP in REALbasic

Not sure if this is the appropriate place to ask a question about
soap.
If you think you know a better news group to discuss this please
point
me there.
I wrote a UPnP Internet Gateway Device Class in C++ with raw tcp/ip
and udp calls.

I want to now port that code to a high level interpreter that
supplies
SOAP methods.
I need some help 'filling in the blanks' in this high level language.

Here is the C++ method:

//This code sends a message to the gateway to inquire about the
external IP address. It builds up the soap envelope and message then
posts //it and gets the response, parses it to extract the desired
value.

void IGD::getExterna lIPAddress(std: :string & NewExternalIPAd dress) {
tcpclient poster;
std::string htmlpost, xml;
char buffer[2048];

poster.connect( (char *) gatewayIPAddres s.c_str(), gatewayPort);

xml += "<?xml version=\"1.0\" ?>\r\n";
xml += "<s:Envelop e xmlns:s=\"http://schemas.xmlsoap .org/soap/
envelope/\" s:encodingStyle =\"http://schemas.xmlsoap .org/soap/
encoding/
\">\r\n";
xml += " <s:Body>\r\n" ;
xml += " <u:GetExternalI PAddress xmlns:u=
\"urn:schema s-upnp-
org:service:WAN IPConnection:1\ "/>\r\n";
xml += " </s:Body>\r\n";
xml += "</s:Envelope>\r\n ";

htmlpost += "POST /control?WANIPCo nnection HTTP/1.1\r\n";
htmlpost += "HOST: ";
htmlpost += gatewayIPAddres s;
htmlpost += ":";
htmlpost += itoa(gatewayPor t, buffer, 10);
htmlpost += "\r\n";
htmlpost += "CONTENT-LENGTH: ";
htmlpost += itoa(xml.length (), buffer, 10);
htmlpost += "\r\n";
htmlpost += "CONTENT-TYPE: text/xml ; charset=\"utf-8\"\r\n";
htmlpost += "SOAPACTION : \"urn:schema s-upnp-
org:service:WAN IPConnection:1# GetExternalIPAd dress\"\r\n";
htmlpost += "\r\n";
htmlpost += xml;

poster.send(htm lpost.c_str(), htmlpost.length ());
int rc = poster.recv(buf fer, sizeof(buffer)) ;
buffer[rc] = '\0';

HtmlMsg serverResp(buff er);

checkResponse(s erverResp);

std::string xmlText = serverResp.getX ml();

xmlObj xmlO(xmlText);
std::cout << xmlO;
xmlEntry e = xmlO.get("s:Env elope/s:Body/
u:GetExternalIP AddressResponse/NewExternalIPAd dress");
NewExternalIPAd dress = e.getValue();

}

The REALbasic interpreter provides a brief example of a soap call and
I'm trying to use it, but I don't understand the parameters its
asking
for.
Dim sm as SoapMethod
Dim sr as SOAPResult
// create the soap method and set the parameter(s)
sm = New SoapMethod
sm.parameter("U SZip") = "12345"

// set soap method properties
sm.methodNamesp ace = "http://www.webserviceX .NET"
sm.action = "http://www.webserviceX .NET/GetInfoByZIP"
sm.url = "http://www.webserviceX .NET/uszip.asmx"

// execute the method
sr = sm.invoke("GetI nfoByZIP")

// display the Area_Code portion of the result
MsgBox sr.result("Area _Code")

The sm object has these attributes that can be set:
action
connection
inputParams
methodName
methodNamespace
namespaces
paramTypes
timeout
url
wsdl

Sep 14 '07 #1
0 2941

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

Similar topics

0
1702
by: Michiel | last post by:
Hello, I am not sure this is the right place to ask. I tried the ZSI mailing list, but got no response there. My goal is to write some web services with ZSI to be used by a client written in .NET. I'm using ZSI 1.2.7 (this was easy to install on my Debian system). I have no problem with functions with parameters and return values
4
1769
by: jm | last post by:
I understand how an XML formatted SOAP message is used to request items from a web service and how the XML formatted SOAP response is used. I am still missing the big picture, however. When is this used? For example, let's say that I have three systems. An Oracle system, SQL Server 2000 system and a DB2 legacy system.
6
2419
by: Guest | last post by:
Hi, I unerstand that if you choose IIS to host your .Net Remotingcomponents with HTTP channel and SOAP formatter, you get thebuilt-in security and configuraion features of IIS. Also we canexpose it to use for the web services clients. But using HTTPwith SOAP has got the least performance amoung all others (exTCP with Binary etc). The question is what are the advantages of using http with SOAPover http with Binary formatter? What are the...
1
2767
by: m.tang | last post by:
Hi, I'm developing a stand alone program using VB accessing Ms Access database. I use NJStar to key in Chinese characters into the system. But I found that certain characters are not able to write into the db as it hits "Syntax error in string query expression - "¯QÀs°|" when I use sql statement - insert... ¯QÀs°| is the chinese chars. I have done a few testing and found out that the "|" is not invalid in sql statement and also a few chars...
0
2314
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to consume it with a C# application, I get the following runtime error from C#: Cannot assign object of type System.Xml.XmlNode to an object of type ConsoleApplication1.com.hilton.crmdev.SummaryType. Below is the Perl code that generates the hash,...
31
2780
by: Jim Hubbard | last post by:
I am downloading the REALbasic 5.5 demo and was just wondering if anyone else had tried it. I am tired of Microsoft constantly changing things and breaking backward compatibility ON PURPOSE. I'd like to offer my customers the ability to run my apps on Windows, MAC or Linux - and REALbasic claims the ability to do that from one set of source code.
2
1694
by: D H | last post by:
Hi, Hi, I was looking for your opinion on VB.NET - its long-term prospects, etc. Sorry this is vague, but it's not meant to be a troll. It's a pro-VB.NET post actually. I haven't used VB or VB.NET really, but I have used Realbasic (a vb clone), Java, C#, C, and Python. I work in education, and I'd like something that is easy enough for teachers and students to use to develop real, usable applications, not just to learn programming for...
5
10401
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said they need to consume this web service using HTTP. The developer's IDE is Notepad. Yeah, weird I know. How is this done? I guess if I can get it to run ASP, IDE independant, that should make them happy. Any references you can point me to?
0
1890
by: SpreadTooThin | last post by:
This is a capture with ethereal of a SOAP Message to my UPnP Router.. POST /uuid:dynsvc/WANIPConnection:1 HTTP/1.1 HOST: 192.168.1.1:5431 SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection: 1#GetExternalIPAddress" CONTENT-TYPE: text/xml ; charset="utf-8" Content-Length: 274 <?xml version="1.0"?>
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.