Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Re: passing parameters to soap method?? (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: Subject: Re: macoslib additions
Next thread: Re: Opening file without extension in Lion


Re: passing parameters to soap method??   -   jim meyer

Re: passing parameters to soap method??
Date: 03.08.11 14:50 (Wed, 3 Aug 2011 09:50:28 -0400)
From: jim meyer
Matt86....

RB's SOAP classes do not support complex types..... but you can easily still get it to work with a plain HTTP socket....

Something like:

yourhttpSocket.setPostContent(yourXMLRequestString, "text/xml")
responseString = hsock.post(theurl, atimeoutInterger)

Jim

On Aug 3, 2011, at 9:30 AM, <email address removed> wrote:

> Message: 16
> Date: Wed, 3 Aug 2011 10:52:31 +0200
> From: Daniele Murabito <<email address removed>>
> Subject: passing parameters to soap method??
> To: <<email address removed>>
> Message-ID: <<email address removed>>
> Content-Type: text/plain; charset="windows-1256"
>
> Hi guys,
> I have a Soap complex type like this:
>
> <xsd:complexType name="loginCredentials">
> <xsd:all>
> <xsd:element name="user" type="xsd:string"/>
> <xsd:element name="pwd" type="xsd:string"/>
> <xsd:element name="ID" type="xsd:string"/>
> </xsd:all>
> </xsd:complexType>
> <message name="doLoginRequest">
> <part name="parameters" type="tns:loginCredentials"/>
> </message>
> <message name="doLoginResponse">
> <part name="return" type="xsd:string"/>
> </message>
> In my RB project i wrtite this:
>
> Dim sm As SOAPMethod
> Dim sr As SOAPResult
>
> sm=new SOAPMethod
>
> Dim param as New Dictionary
> param.Value("user")="usernamevalue"
> param.Value("pwd")="passwordvalue"
> param.Value("ID")="IDValue"
>
> sm.Parameter("parameters") = param
>
> sm.methodNamespace="mynamespace"
> sm.action="http://parth/action/doLogin"
> sm.url ="myurl"
> sr=sm.invoke("doLogin")
>
> dim xdoc as XmlDocument
> xdoc=sr.document
>
> if(sr<>nil) then
> TextArea1.text = xdoc.ToString
> end if
>
> Exception e
> MsgBox e.Message
>
> I receive a fault error, because some parameters were not passed correctly. How I wrong?
>
> Thanks
>
> Matt86

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>