Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: GUIDs

$
0
0
Re: GUIDs
Web Service Proxy Generator
Re: GUIDs
05/08/2012
10:50:31 PM
3HX1CYM3A Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None

Please post in the Web Service Proxy Generator section to keep this on target.

.NET GUIDs can't be accessed directly in FoxPro because they are value types. wwDotNetBridge provides a translating mechanism for this as long as you use indirect access to properties and methods using Get/SetProperty() and InvokeMethod(). Guids are returned as an object withe GuidString property that you can read and write and a NewGuid() method to create a new Guid().

http://www.west-wind.com/wsdlgenerator/docs/_2mn1b95k5.htm

Post your code and the signature of the method/objects that you're accessingm, if that does not make sense.


+++ Rick ---



is there an issue getting a GUID returned from a proxy?

every attempt to reference loNugget.token in this code gives a vfp "function argument value, type or count is invalid".


DO servicesproxy THIS.ows = CREATEOBJECT("servicesProxy","V2") loNugget = this.ows.login(misc.uktduser,misc.uktdpass) THIS.token = lonugget.token

************************************************************************ * login **************************************** FUNCTION login(email as String,pwd as String) as utdNugget LOCAL loException as Exception, lvResult as utdNugget THIS.lError = .F. this.cErrorMsg = "" lvResult = .F. TRY lvResult = this.oBridge.InvokeMethod(this.oService, "login", email,pwd) CATCH to loException THIS.GetErrorDetail(loException) ENDTRY RETURN lvResult ENDFUNC * login

<s:element name="login">
<s:complexType>
<s:sequence>
<s:element name="email" type="s:string" maxOccurs="1" minOccurs="0"/>
<s:element name="pwd" type="s:string" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="loginResponse">
<s:complexType>
<s:sequence>
<s:element name="loginResult" type="tns:utdNugget" maxOccurs="1" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="utdNugget">
<s:sequence>
<s:element name="Token" type="s1:guid" maxOccurs="1" minOccurs="1"/>
<s:element name="ExpiresSeconds" type="s:int" maxOccurs="1" minOccurs="1"/>
</s:sequence>
</s:complexType>




Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii

Viewing all articles
Browse latest Browse all 10393

Trending Articles