How to include GUID in a SOAPmessage

G

gunnar

I've declared a variable, ID, in a statement
dim ID as new Guid("12345678-1234-1234-5678-12345678")

Now I will include and send it in a SOAP message but the webservice doesn't
accept the ID converted to a string.
Does anybody know how to include GUID's in a SOAPmessage?
Gunnar
 
Y

Yunus Emre ALPÖZEN [MVP]

Hi,
Just define your variable as string, and try to parse input string into guid
in your web service implementation...

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
Microsoft .NET & Security MVP
 
G

gunnar

Yunus Emre ALPÖZEN said:
Hi,
Just define your variable as string, and try to parse input string into
guid in your web service implementation...

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
Microsoft .NET & Security MVP


Thanks for answering,
Perhaps some missunderstanding.
I wan't to consume a webbservice that requires a GUID for authorization.
The webservice looks like
....
<s:simpleType name="guid">
<s:restriction base="s:string">
<s:pattern
value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
/>
</s:restriction>
</s:simpleType>
....

and the recommended SOAPrequest is

....<AuthID xmlns:s0="http://microsoft.com/wsdl/types/"
xsi:type="s0:guid">guid</AuthID >...I've declared a variable, AuthID, in a
statement
dim AuthID as new Guid("ABCD5678-AB34-AB34-5678-ABCD5678")
and I convert it with the ToString method before I send it in a SOAPmessage.

The webservice answers with the somewhat cynical statement 'Something has
went wrong"

By the way
When I test the content of the GUID with the statement
response.write (AuthID.ToString()) all capital letters are converted to
small letters

Thanks
Gunnar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top