RE: SPAM-MED: RE: [BizTalker] Biztalk Std - Using the SOAP Adapter to call web services


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Mick Badran
    • Subject: RE: SPAM-MED: RE: [BizTalker] Biztalk Std - Using the SOAP Adapter to call web services
    • Date: Wed, 09 Jan 2008 11:03:04 -0800

    Hi Patrice - always interesting.
    
    As Bill mentioned - be great to know what version of BTS you're using. BTS04 doesn't support WSDL array types, BTS06 does :-)
    
    >From your problem/question - it looks like you need to make a call to a *stateful* WS Service.
    1 call to 'login', 1 call the Get Records using some of the returned data.
    
    In a .NET client, the 'state' is usually maintained via the Connection in use, or some header/cookie value that the client can pass over for a limited time (e.g. 2mins).
    
    BizTalk by default operates in a highly concurrent environment by default, so some options for you off the top of my head
    1. Try using a *Scope* shape with 'synchronised' set to TRUE within your Orchestration - make sure you put both your Sends in there (as well as recs). I haven't tried this across calls within the same WS....so it's a little uncharted.
    
    2. Create a .NET class that the SOAP Adapter can call (depends on the version of BTS you're using 06+). On the advanced page of the physical adapter (viewable from BTS Admin console for e.g.) add the class there - this is the class the SOAP adapter will use to make its call. From memory - the class takes an XML document in and produces what ever it needs (XML Document/XLangMessage) back.
    
    3. Create a .NET WS/WCF service that wraps this 'complex stateful' WS and call it from BTS
    
    Food for thought
    
    Mick Badran (MVP - BizTalk) | mb: +61 404842833 | im:mickb@xxxxxxxxxxxxxxxxxxxxx
    Breeze Training | Training + Integration Specialist | Microsoft Readiness Instructor
    blogs:http://blogs.breezetraining.com.au/mickb
    ________________________________________
    From: biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx [biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Bill Chesnut [lists@xxxxxxxxxxxxx]
    Sent: Wednesday, 9 January 2008 11:37 PM
    To: BizTalker@xxxxxxxxxxxxxxxxxxxxxx
    Subject: SPAM-MED: RE: [BizTalker] Biztalk Std - Using the SOAP Adapter to call web services
    
    Patrice,
    
    What version of BizTalk are we talking about 2004, 2006, 2006 R2?
    
    Any way you can attach the WSDL file, just interested in seeing what the object they send back are.
    
    But off the top of my head I don't think there is a way to use the BizTalk SOAP adapter to do what you want.
    
    Bill Chesnut
    BizTalk Server MVP
    Melbourne, Australia
    
    -----Original Message-----
    From: biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx [mailto:biztalkerlist@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of pparuit@xxxxxxxxxxxxxx
    Sent: Wednesday, 9 January 2008 10:05 PM
    To: Biztalker@xxxxxxxxxxxxxxxxxxxxxx
    Cc: pparuit@xxxxxxxxxxxxxxxxx
    Subject: [BizTalker] Biztalk Std - Using the SOAP Adapter to call web services
    
    Hi,
    
    I have the WSDL file and the proxy classes to make a Web Service call to retrieve an array of objects. To retrieve rows two calls are required, one to retrieve a cursor object the next a call to retrieve an -array- of custom objects. See sample implementation below when not using Biztalk.
    
    .
    .
           Dim records() As apex.sObject
            Dim qr As apex.QueryResult = Nothing
    .
    .       [WebProxy binding code here]
    .
    
            qr = WebProxybinding.query("select id, Name, AccountId from Contact")
    
            records = qr.records
    
            Console.WriteLine(" -- Contacts -- ")
    
            'we can loop through the returned records
            For i As Integer = 0 To records.GetUpperBound(0)
                'Because we asked for accounts we will convert
                'the SObject for each record into an Contact object
                Dim contact As apex.Contact = CType(records(i), apex.Contact)
    
                'Now we can access any of the fields we had in the query
                'select clause directly from the account variable
                Console.Write((i + 1).ToString() + ". ")
                Console.Write(Contact.Id + ", ")
                Console.Write(Contact.Name + ", ")
                Console.WriteLine(Contact.AccountId)
            Next
    
    What I'd like to do is use the SOAP Adapter on a Send port to call the service, I understand that a SOAP call can be made with a single param without too much fuss where the rows are returned in single Service call. But this interface requires
    two calls, one to get a cursor object and another to get an array of custom objects.
    
    Using the abovementioned interface is it possible to get the rows and load them into a single message based on the object schemas (which have been pre-provided)? I do recall reading at one time that arrays were not supported when using the SOAP Adapter.
    
    If not, is there an alternative means using Biztalk? Samples?
    
    Here's hoping.
    
    Regards
    Patrice
    
    
    to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
    
    
    
    
    
    
    to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
    
    
    to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
    
    
    
    
    



    (Click here for more information on the biztalkers mailling list)