SOAP Web Services

Discussion in 'Questions (Windows Mobile)' started by seraphax, Feb 5, 2008.

  1. seraphax

    seraphax New Member

    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.
  2. agraham

    agraham Expert Licensed User

    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.
  3. seraphax

    seraphax New Member

    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.

  4. agraham

    agraham Expert Licensed User

    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.
  5. Erel

    Erel Administrator Staff Member Licensed User

    Is it possible to publish this web service URL and description?
  6. kawawong

    kawawong Member Licensed User


    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.

  7. zdenkot

    zdenkot Member Licensed User

    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 = ""
    bit.New1 'bit is a Bitwise object
    len = bin.ReadBytes(buffer(), 4096)

    End Sub
    Sub PostDate
    '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

    response.Value = request.GetResponse

    ' content of ff.xml file
    ''<?xml version="1.0" encoding="utf-8"?>
    ''<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
    '' <soap:Body>
    '' <ConversionRate xmlns="http://www.webserviceX.NET/">
    '' <FromCurrency>EUR</FromCurrency>
    '' <ToCurrency>USD</ToCurrency>
    '' </ConversionRate>
    '' </soap:Body>
    End Sub
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice