Results 1 to 5 of 5

Thread: general help with web services

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    general help with web services

    how do I add the "type" in the xml VS Web Services output

    from
    <phone>0000000000</phone>

    to
    <Phone Type="FAX" Number="0000000000" />

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: general help with web services

    I am not familiar with it, but from what I understand, it uses XSL for translation.

    If so, after your <PHONE> tag, but before you enter data or close the tag, try this:

    <xsl:attribute name="Type" value="FAX" />

    I could be out in left field, but thought I would throw it out there if it is indeed based on XSL.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: general help with web services

    How would I attach it too the <phone element then? If I was writing out xml from code this wouldn't really be an issue but since I'm relying on Visual STudio to create the xml using <webMethod I'm not really finding how to modify the elements and attributes.

  4. #4
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: general help with web services

    Ok, Im not sure. It was a shot in the dark, but sometimes a shot in the dark is better than a complete absence of response.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    16

    Re: general help with web services

    thanks for the try. I did find that .net will make custom elements automatically if you use class objects for all of the data. Now I just need to figure out how to add attributes to them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width