Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

SOAP Web Services

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2008, 09:00 AM
Newbie
 
Join Date: Feb 2008
Posts: 2
Default SOAP Web Services

Hi, I'm new to developing with basic4ppc.

I'm trying to develop an application that will send XML to a web service (this is an Axis based, so a Java web service) and will accept the response and interpret the XML that is sent back to the handheld.

I've seen a few examples, but not which stream XML to a service.

Has anyone got any experience of this? or any samples of how this could work? if it even can work?

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 02-05-2008, 11:16 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

You should be able to exchnge SOAP messages with with the HTTP library as SOAP is built on the HTTP protocol, but you will have to build and parse the SOAP XML messages yourself.

However I have found that the underlying .NET HTTP code, on which the HTTP library relies, is very picky about the correct protocol. I have just written a remote monitoring app and the HTTP based server I was connecting to sends back badly formatted responses under some situations. Internet Explorer is OK with this server as it seems very tolerant of protocol errors but .NET isn't. As the server code was not accessible to fix the problem at source () I had to use the Network library and implement my own (trivial) version of HTTP on top of that to get it working.
Reply With Quote
  #3 (permalink)  
Old 02-05-2008, 11:33 AM
Newbie
 
Join Date: Feb 2008
Posts: 2
Default

Quote:
Originally Posted by agraham View Post
You should be able to exchnge SOAP messages with with the HTTP library as SOAP is built on the HTTP protocol, but you will have to build and parse the SOAP XML messages yourself.

However I have found that the underlying .NET HTTP code, on which the HTTP library relies, is very picky about the correct protocol. I have just written a remote monitoring app and the HTTP based server I was connecting to sends back badly formatted responses under some situations. Internet Explorer is OK with this server as it seems very tolerant of protocol errors but .NET isn't. As the server code was not accessible to fix the problem at source () I had to use the Network library and implement my own (trivial) version of HTTP on top of that to get it working.
Thanks for the quick response! it's good to know that someone else has got it working- I've certainly found there's generally issues with Microsoft code communicating with Java based web services (so much for global standards).

If you have any code that you could post I would be eternally grateful.

Cheers
Reply With Quote
  #4 (permalink)  
Old 02-05-2008, 11:46 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by seraphax View Post
it's good to know that someone else has got it working
Just to be clear, it's HTTP protocol based communication that I got working, not SOAP. But as SOAP is merely an XML formatted HTTP message I would expect it to work. I don't think I have any code that would help you, my problem was with authentication and I had to implement the basic authentication exchange with a secure server on top of the Network library as the HTTP library didn't like the server's authentication messages.
Reply With Quote
  #5 (permalink)  
Old 02-06-2008, 04:57 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Is it possible to publish this web service URL and description?
Reply With Quote
  #6 (permalink)  
Old 07-04-2008, 07:09 AM
Junior Member
 
Join Date: Jan 2008
Posts: 14
Default

Hi,

I am also interesting to develop the application that can connect a web service via soap.

Is there any example or library for this issue?

Many many thanks.

Kawawong
Reply With Quote
  #7 (permalink)  
Old 07-14-2008, 08:56 PM
Junior Member
 
Join Date: Jan 2008
Posts: 11
Default SOAP Web Services

Hi,
I am looking for help with SOAP method.
Please review the my code.
Any suggestion is welcome !

Thank you, Zdenko

Sub Globals
'Dim buffer(0) As byte
Dim buffer(4096) As byte
Dim len
Dim URL
End Sub
Sub App_Start
url = "http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate"
bit.New1 'bit is a Bitwise object
FileOpen(c1,"ff.xml",cRandom)
bin.New1(c1,true)
len = bin.ReadBytes(buffer(), 4096)
FileClose(c1)

postdate
End Sub
Sub PostDate
Response.New1
'Request.New1("http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate")
Request.New1("http://www.webservicex.net/CurrencyConvertor.asmx")
'request.ContentType = "application/x-www-form-urlencoded"
' request.ContentType = "application/soap+xml"
request.ContentType = "text/xml"
request.ContentLength = len
request.Method = "POST"
Request.TimeOut = 30000 '30 seconds
writer.New1(request.GetStream,false)
writer.WriteBytes2(buffer(),0,len)

response.Value = request.GetResponse
Msgbox(response.GetString)
response.Close

' content of ff.xml file
'------------------------
''<?xml version="1.0" encoding="utf-8"?>
''<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
'' <soap:Body>
'' <ConversionRate xmlns="http://www.webserviceX.NET/">
'' <FromCurrency>EUR</FromCurrency>
'' <ToCurrency>USD</ToCurrency>
'' </ConversionRate>
'' </soap:Body>
''</soap:Envelope>
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP library - SOAP action zdenkot Questions (Windows Mobile) 10 07-04-2009 03:19 PM
Help on SOAP Services sanoy Questions (Windows Mobile) 3 10-31-2008 06:39 AM


All times are GMT. The time now is 06:52 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0