How to include GUID in a SOAPmessage

Discussion in 'ASP .Net Web Services' started by gunnar, Jan 30, 2006.

  1. gunnar

    gunnar Guest

    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
    gunnar, Jan 30, 2006
    #1
    1. Advertising

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

    "gunnar" <> wrote in message
    news:r8lDf.154857$...
    > 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
    >
    >
    Yunus Emre ALPÖZEN [MVP], Jan 30, 2006
    #2
    1. Advertising

  3. gunnar

    gunnar Guest

    "Yunus Emre ALPÖZEN [MVP]" <yemre> skrev i meddelandet
    news:...
    > 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
    >
    > "gunnar" <> wrote in message
    > news:r8lDf.154857$...
    >> 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



    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
    gunnar, Feb 1, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. iksrazal
    Replies:
    0
    Views:
    1,366
    iksrazal
    Nov 4, 2003
  2. Qingchun Guo
    Replies:
    1
    Views:
    2,770
    Esmond Pitt
    Feb 29, 2004
  3. Luke Webber
    Replies:
    0
    Views:
    867
    Luke Webber
    Oct 13, 2005
  4. MORALBAROMETER
    Replies:
    0
    Views:
    347
    MORALBAROMETER
    Mar 2, 2007
  5. andrewzzz

    SOAPMessage to Message Conversion

    andrewzzz, Nov 14, 2008, in forum: Java
    Replies:
    0
    Views:
    312
    andrewzzz
    Nov 14, 2008
Loading...

Share This Page