XML Wrapper?

Discussion in 'ASP .Net Web Services' started by JeffP@Work, Oct 2, 2006.

  1. JeffP@Work

    JeffP@Work Guest

    I am very confused so please understand that this question may not be well
    formed.

    I need to work with a WS that requires a wrapper, nesting of the XML,
    perhaps this is not a good phrase, but I'm not sure where to begin.

    ---------------------------------------------------
    ** Any articles or links, books are appreciated **
    ---------------------------------------------------

    My only WS experience is using a WS similar to a DLL or .vb file in my web
    project.

    Now I have to connect to someone else's WS and I've been given alot of XML
    structures.

    I had assumed that when .Net connected to a WDSL any calls to the named WS
    were sent as XML and that I didn't need to form XML, other than to make my
    call with the proper sequence, type and value for any variables for the
    webmethod.

    In the past I think that my XML have been implemented similar to.....

    The following pseudo code snipit I get, although I may not state it 100%
    correctly here...
    .... from w/in my webapp
    ----------------------------------------------
    ..... assuming a Ref to the WS has been made...
    Prvt Sub NewReq(CaseNo as String, Date as String, Other Values... as )

    ..... validation and getting of any other req. values to pass in...

    If NewRequest.Send(CaseNo as String, Date as String, Other Values... as ) =
    "Submitted" Then
    .... do something...
    End If

    End Sub

    .... which sends XML similar to....
    ----------------------------------------------
    <NewRequest Send>
    <CaseNo/>
    <Date/>
    <Other Values..../>
    </NewRequest Send>
    ------------------------------------------------

    ****** Here's the new stuff that is confusuing for me....

    Now I have to pass similar that is like a wrapper with an outside auth
    handled at my client and a request obejct that passes in the NewRequest.
    ------------------------------------------------
    <OutSide XML>
    <Auth>
    <MyValidated UserID/>
    <Auth/>
    <Request>
    <Request Date>
    <Request Type>
    </Request>
    <Inside XML New Request>
    <CaseNo/>
    <Date/>
    <Other Values..../>
    </Inside XML New Request>
    <OutSide XML>

    And it gets better, I also have to receive back a <Response and process
    that..... which I might think is handled w/in my "NewReq" noted above.

    Any direction would be appreciated.....


    JeffP.....
    JeffP@Work, Oct 2, 2006
    #1
    1. Advertising

  2. JeffP@Work

    JeffP@Work Guest

    Jeff,

    In contrast to calling a function or a dll you may wish to consider as if
    you were about to write a document using DOM, but instead of writing a
    phyical XML document you'll be passing the resulting XML as a string into
    the an outer method.

    So, you will be calling the method that you called <OutSide XML similar to
    your familar call to a function or dll most likley as....

    NewRequest(Auth as object, Request as object) as string

    Where Request contains your DOM XML string returning some Response as string
    of XML

    <NewRequest XML>
    <Auth/>
    <Request>
    <XML String/>
    </Request>
    </NewRequest XML>

    HTH

    JeffP....

    "JeffP@Work" <jpgmt_at_sbcglobal_dot_net> wrote in message
    news:...
    >I am very confused so please understand that this question may not be well
    >formed.
    >
    > I need to work with a WS that requires a wrapper, nesting of the XML,
    > perhaps this is not a good phrase, but I'm not sure where to begin.
    >
    > ---------------------------------------------------
    > ** Any articles or links, books are appreciated **
    > ---------------------------------------------------
    >
    > My only WS experience is using a WS similar to a DLL or .vb file in my web
    > project.
    >
    > Now I have to connect to someone else's WS and I've been given alot of XML
    > structures.
    >
    > I had assumed that when .Net connected to a WDSL any calls to the named WS
    > were sent as XML and that I didn't need to form XML, other than to make my
    > call with the proper sequence, type and value for any variables for the
    > webmethod.
    >
    > In the past I think that my XML have been implemented similar to.....
    >
    > The following pseudo code snipit I get, although I may not state it 100%
    > correctly here...
    > ... from w/in my webapp
    > ----------------------------------------------
    > .... assuming a Ref to the WS has been made...
    > Prvt Sub NewReq(CaseNo as String, Date as String, Other Values... as )
    >
    > .... validation and getting of any other req. values to pass in...
    >
    > If NewRequest.Send(CaseNo as String, Date as String, Other Values... as )
    > = "Submitted" Then
    > ... do something...
    > End If
    >
    > End Sub
    >
    > ... which sends XML similar to....
    > ----------------------------------------------
    > <NewRequest Send>
    > <CaseNo/>
    > <Date/>
    > <Other Values..../>
    > </NewRequest Send>
    > ------------------------------------------------
    >
    > ****** Here's the new stuff that is confusuing for me....
    >
    > Now I have to pass similar that is like a wrapper with an outside auth
    > handled at my client and a request obejct that passes in the NewRequest.
    > ------------------------------------------------
    > <OutSide XML>
    > <Auth>
    > <MyValidated UserID/>
    > <Auth/>
    > <Request>
    > <Request Date>
    > <Request Type>
    > </Request>
    > <Inside XML New Request>
    > <CaseNo/>
    > <Date/>
    > <Other Values..../>
    > </Inside XML New Request>
    > <OutSide XML>
    >
    > And it gets better, I also have to receive back a <Response and process
    > that..... which I might think is handled w/in my "NewReq" noted above.
    >
    > Any direction would be appreciated.....
    >
    >
    > JeffP.....
    >
    JeffP@Work, Oct 3, 2006
    #2
    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. Brendan Duffy
    Replies:
    0
    Views:
    4,237
    Brendan Duffy
    Jul 25, 2003
  2. Nilsson Mats

    Wrapper on magic line?

    Nilsson Mats, Dec 9, 2003, in forum: Perl
    Replies:
    0
    Views:
    613
    Nilsson Mats
    Dec 9, 2003
  3. Showjumper
    Replies:
    2
    Views:
    452
    Showjumper
    Jul 4, 2003
  4. Hazzard
    Replies:
    3
    Views:
    236
    Yan-Hong Huang[MSFT]
    Jul 31, 2003
  5. Erik Wasser
    Replies:
    5
    Views:
    445
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page