BizTalk Server Orchestration - Transforming a message for input to a web service request

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > August 2004 > Transforming a message for input to a web service request





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Transforming a message for input to a web service request
BenW

2004-07-13, 8:47 pm

The prototype objective is to receive a flat file or and XML document, disassemble it and call a web service, passing in some of the data received.

I have managed to construct a port for the file arriving, created a web service, referenced it in the BizTalk project. I see there have been two Multi Part Message Types created; one for the request and one the result.

I presumably want to transform the receive message disassembled from file input port to a send message to the web service.

How do I do this? I have Transform shape and can set the input message but cannot seem to select a send message. I did try creating a new message in the orchestration view and assigning it a type of the ...web service_request but this did not appear in
the Transform Shape configuration box. I have had a look at the ConsumingWebService example in the SDK and this looks correct. But there must be a stage I'm missing.




--
BenW MCAD

Christof [MVP]

2004-07-13, 8:47 pm

To split an incoming message you need a schema that defines an envelope.
There's a sample in the SDK that shows you how to do this.

Best regards,
Christof

--
Christof [Microsoft BizTalk Server MVP]

"BenW" <BenW@discussions.microsoft.com> wrote in message
news:34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com...
> The prototype objective is to receive a flat file or and XML document,

disassemble it and call a web service, passing in some of the data received.
>
> I have managed to construct a port for the file arriving, created a web

service, referenced it in the BizTalk project. I see there have been two
Multi Part Message Types created; one for the request and one the result.
>
> I presumably want to transform the receive message disassembled from file

input port to a send message to the web service.
>
> How do I do this? I have Transform shape and can set the input message

but cannot seem to select a send message. I did try creating a new message
in the orchestration view and assigning it a type of the ...web
service_request but this did not appear in the Transform Shape configuration
box. I have had a look at the ConsumingWebService example in the SDK and
this looks correct. But there must be a stage I'm missing.
>
>
>
>
> --
> BenW MCAD
>



BenW

2004-07-13, 8:47 pm

Christof thanks. However this does answer my question. As I say I have mamaged to split the file. It is Tranfroming the message to the input of the web service that I am having difficulty with. See below.

--
BenW MCAD


"Christof [MVP]" wrote:

> To split an incoming message you need a schema that defines an envelope.
> There's a sample in the SDK that shows you how to do this.
>
> Best regards,
> Christof
>
> --
> Christof [Microsoft BizTalk Server MVP]
>
> "BenW" <BenW@discussions.microsoft.com> wrote in message
> news:34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com...
> disassemble it and call a web service, passing in some of the data received.
> service, referenced it in the BizTalk project. I see there have been two
> Multi Part Message Types created; one for the request and one the result.
> input port to a send message to the web service.
> but cannot seem to select a send message. I did try creating a new message
> in the orchestration view and assigning it a type of the ...web
> service_request but this did not appear in the Transform Shape configuration
> box. I have had a look at the ConsumingWebService example in the SDK and
> this looks correct. But there must be a stage I'm missing.
>
>
>

mangi

2004-07-14, 7:13 am

If your web service accepts an xml.xmldocument as input.
Use the message assign shape to convert the flatfile message to system.xml.xmldocument and assign the outgoing document message part to the xml document.

Hope that helps...




quote:
Originally posted by BenW
Christof thanks. However this does answer my question. As I say I have mamaged to split the file. It is Tranfroming the message to the input of the web service that I am having difficulty with. See below.

--
BenW MCAD


"Christof [MVP]" wrote:

> To split an incoming message you need a schema that defines an envelope.
> There's a sample in the SDK that shows you how to do this.
>
> Best regards,
> Christof
>
> --
> Christof [Microsoft BizTalk Server MVP]
>
> "BenW" <BenW@discussions.microsoft.com> wrote in message
> news:34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com...
> disassemble it and call a web service, passing in some of the data received.
> service, referenced it in the BizTalk project. I see there have been two
> Multi Part Message Types created; one for the request and one the result.
> input port to a send message to the web service.
> but cannot seem to select a send message. I did try creating a new message
> in the orchestration view and assigning it a type of the ...web
> service_request but this did not appear in the Transform Shape configuration
> box. I have had a look at the ConsumingWebService example in the SDK and
> this looks correct. But there must be a stage I'm missing.
>
>
>

BeerBoy

2004-07-14, 5:50 pm

I too have got this problem and have spent all day trying to figure it out
!! You're right Ben in that the SDK samples look fine - how did they manage
to get the webservice messages in the destination !?!?!?!?



"BenW" <BenW@discussions.microsoft.com> wrote in message
news:4FF8B572-C160-4D9A-BDC6-C46241A818CC@microsoft.com...
> Christof thanks. However this does answer my question. As I say I have

mamaged to split the file. It is Tranfroming the message to the input of
the web service that I am having difficulty with. See below.[vbcol=seagreen]
>
> --
> BenW MCAD
>
>
> "Christof [MVP]" wrote:
>
received.[vbcol=seagreen]
web[vbcol=seagreen]
two[vbcol=seagreen]
result.[vbcol=seagreen]
file[vbcol=seagreen]
message[vbcol=seagreen]
message[vbcol=seagreen]
configuration[vbcol=seagreen]
and[vbcol=seagreen]


Matt Milner

2004-07-14, 8:47 pm

Make sure when trying to map that you are using schema/complex type based
web services, otherwise you can't map, you have to use a message assignment
shape and set properties on a message of the type of your request.

Matt


"BeerBoy" <jmacaulay@framfab.co.uk> wrote in message
news:uZ5quzbaEHA.2576@TK2MSFTNGP10.phx.gbl...
> I too have got this problem and have spent all day trying to figure it out
> !! You're right Ben in that the SDK samples look fine - how did they

manage
> to get the webservice messages in the destination !?!?!?!?
>
>
>
> "BenW" <BenW@discussions.microsoft.com> wrote in message
> news:4FF8B572-C160-4D9A-BDC6-C46241A818CC@microsoft.com...
> mamaged to split the file. It is Tranfroming the message to the input of
> the web service that I am having difficulty with. See below.
envelope.[vbcol=seagreen]
document,[vbcol=seagreen]
> received.
> web
> two
> result.
> file
> message
> message
> configuration
> and
>
>



BeerBoy

2004-07-15, 7:47 am

My web service is :

[WebMethod]

public XmlDocument UploadRecords(XmlDocument Message)

{

return Message;

}



I assume this is what you mean when you say the webservice must use complex
types ?


BeerBoy

2004-07-15, 7:47 am

Fixed it !!!!

OK - now I understand - you need to define a class in the webservice and
then biztalk will create a schema for this class and allow to to map to/from
it.


:-)



"BeerBoy" <jmacaulay@framfab.co.uk> wrote in message
news:%23VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl...
> My web service is :
>
> [WebMethod]
>
> public XmlDocument UploadRecords(XmlDocument Message)
>
> {
>
> return Message;
>
> }
>
>
>
> I assume this is what you mean when you say the webservice must use

complex
> types ?
>
>



Vikas Nahata [MSFT]

2004-07-19, 5:52 pm

yes that is correct. Biztalk basically uses the same mechanism as xsd.exe
to convert the complex type to a schema.
if you run xsd.exe on XMLDocument no schemas will be generated for it. Same
is the case if the webservice parameter types are simple types (like
String, int)
--------------------
| >>From: "BeerBoy" <jmacaulay@framfab.co.uk>
| >>References: <34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com>
<#GM6HzRaEHA.2408@tk2msftngp13.phx.gbl>
<4FF8B572-C160-4D9A-BDC6-C46241A818CC@microsoft.com>
<uZ5quzbaEHA.2576@TK2MSFTNGP10.phx.gbl>
<OooHu#gaEHA.3524@TK2MSFTNGP12.phx.gbl>
<#VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl>
| >>Subject: Re: Transforming a message for input to a web service request
| >>Date: Thu, 15 Jul 2004 11:29:59 +0100
| >>Lines: 34
| >>X-Priority: 3
| >>X-MSMail-Priority: Normal
| >>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| >>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| >>Message-ID: <euzevalaEHA.1248@TK2MSFTNGP11.phx.gbl>
| >>Newsgroups: microsoft.public.biztalk.orchestration
| >>NNTP-Posting-Host: 213-161-66-85.has.no.reverse 213.161.66.85
| >>Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
| >>Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:7088
| >>X-Tomcat-NG: microsoft.public.biztalk.orchestration
| >>
| >>Fixed it !!!!
| >>
| >>OK - now I understand - you need to define a class in the webservice and
| >>then biztalk will create a schema for this class and allow to to map
to/from
| >>it.
| >>
| >>
| >>:-)
| >>
| >>
| >>
| >>"BeerBoy" <jmacaulay@framfab.co.uk> wrote in message
| >>news:%23VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl...
| >>> My web service is :
| >>>
| >>> [WebMethod]
| >>>
| >>> public XmlDocument UploadRecords(XmlDocument Message)
| >>>
| >>> {
| >>>
| >>> return Message;
| >>>
| >>> }
| >>>
| >>>
| >>>
| >>> I assume this is what you mean when you say the webservice must use
| >>complex
| >>> types ?
| >>>
| >>>
| >>
| >>
| >>

This posting is provided "AS IS" with no warranties, and confers no rights.

EBusiness Server Team

Brett

2004-08-18, 7:50 am

Is it possible to have the web service accept an xmldocument that conforms to
an existing (biztalk) schema? I need to pass my web service an entire
message from biztalk as is and then receive another message back...using a
class to define the schema only allows me to send bits and parts of it.
Thanks,
Brett

"Vikas Nahata [MSFT]" wrote:

> yes that is correct. Biztalk basically uses the same mechanism as xsd.exe
> to convert the complex type to a schema.
> if you run xsd.exe on XMLDocument no schemas will be generated for it. Same
> is the case if the webservice parameter types are simple types (like
> String, int)
> --------------------
> | >>From: "BeerBoy" <jmacaulay@framfab.co.uk>
> | >>References: <34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com>
> <#GM6HzRaEHA.2408@tk2msftngp13.phx.gbl>
> <4FF8B572-C160-4D9A-BDC6-C46241A818CC@microsoft.com>
> <uZ5quzbaEHA.2576@TK2MSFTNGP10.phx.gbl>
> <OooHu#gaEHA.3524@TK2MSFTNGP12.phx.gbl>
> <#VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl>
> | >>Subject: Re: Transforming a message for input to a web service request
> | >>Date: Thu, 15 Jul 2004 11:29:59 +0100
> | >>Lines: 34
> | >>X-Priority: 3
> | >>X-MSMail-Priority: Normal
> | >>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
> | >>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
> | >>Message-ID: <euzevalaEHA.1248@TK2MSFTNGP11.phx.gbl>
> | >>Newsgroups: microsoft.public.biztalk.orchestration
> | >>NNTP-Posting-Host: 213-161-66-85.has.no.reverse 213.161.66.85
> | >>Path:
> cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
> .phx.gbl
> | >>Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:7088
> | >>X-Tomcat-NG: microsoft.public.biztalk.orchestration
> | >>
> | >>Fixed it !!!!
> | >>
> | >>OK - now I understand - you need to define a class in the webservice and
> | >>then biztalk will create a schema for this class and allow to to map
> to/from
> | >>it.
> | >>
> | >>
> | >>:-)
> | >>
> | >>
> | >>
> | >>"BeerBoy" <jmacaulay@framfab.co.uk> wrote in message
> | >>news:%23VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl...
> | >>> My web service is :
> | >>>
> | >>> [WebMethod]
> | >>>
> | >>> public XmlDocument UploadRecords(XmlDocument Message)
> | >>>
> | >>> {
> | >>>
> | >>> return Message;
> | >>>
> | >>> }
> | >>>
> | >>>
> | >>>
> | >>> I assume this is what you mean when you say the webservice must use
> | >>complex
> | >>> types ?
> | >>>
> | >>>
> | >>
> | >>
> | >>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> EBusiness Server Team
>
>

Vikas Nahata [MSFT]

2004-08-23, 5:50 pm

Yes, you can declare the webservice to receive XMLDocument and then assign
send any valid XML Data. If you declare the output type as XMLDocument then
you can also receive any valid XML Data.
--------------------
| >>Thread-Topic: Transforming a message for input to a web service request
| >>thread-index: AcSFJsQ9s/ImCV02Qw+Cpovj4Xjudg==
| >>X-WBNR-Posting-Host: 63.240.154.235
| >>From: "=?Utf-8?B?QnJldHQ=?=" <Brett@discussions.microsoft.com>
| >>References: <34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com>
<#GM6HzRaEHA.2408@tk2msftngp13.phx.gbl>
<4FF8B572-C160-4D9A-BDC6-C46241A818CC@microsoft.com>
<uZ5quzbaEHA.2576@TK2MSFTNGP10.phx.gbl>
<OooHu#gaEHA.3524@TK2MSFTNGP12.phx.gbl>
<#VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl>
<euzevalaEHA.1248@TK2MSFTNGP11.phx.gbl>
<$hA5nndbEHA.2924@cpmsftngxa06.phx.gbl>
| >>Subject: Re: Transforming a message for input to a web service request
| >>Date: Wed, 18 Aug 2004 06:25:02 -0700
| >>Lines: 80
| >>Message-ID: <D184598B-201A-40D0-AE19-46DF4C6A866A@microsoft.com>
| >>MIME-Version: 1.0
| >>Content-Type: text/plain;
| >> charset="Utf-8"
| >>Content-Transfer-Encoding: 7bit
| >>X-Newsreader: Microsoft CDO for Windows 2000
| >>Content-Class: urn:content-classes:message
| >>Importance: normal
| >>Priority: normal
| >>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| >>Newsgroups: microsoft.public.biztalk.orchestration
| >>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| >>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| >>Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:7731
| >>X-Tomcat-NG: microsoft.public.biztalk.orchestration
| >>
| >>Is it possible to have the web service accept an xmldocument that
conforms to
| >>an existing (biztalk) schema? I need to pass my web service an entire
| >>message from biztalk as is and then receive another message
back...using a
| >>class to define the schema only allows me to send bits and parts of it.

| >>Thanks,
| >>Brett
| >>
| >>"Vikas Nahata [MSFT]" wrote:
| >>
| >>> yes that is correct. Biztalk basically uses the same mechanism as
xsd.exe
| >>> to convert the complex type to a schema.
| >>> if you run xsd.exe on XMLDocument no schemas will be generated for
it. Same
| >>> is the case if the webservice parameter types are simple types (like
| >>> String, int)
| >>> --------------------
| >>> | >>From: "BeerBoy" <jmacaulay@framfab.co.uk>
| >>> | >>References: <34A93006-DABC-4881-8D92-B6A8A6E6E284@microsoft.com>
| >>> <#GM6HzRaEHA.2408@tk2msftngp13.phx.gbl>
| >>> <4FF8B572-C160-4D9A-BDC6-C46241A818CC@microsoft.com>
| >>> <uZ5quzbaEHA.2576@TK2MSFTNGP10.phx.gbl>
| >>> <OooHu#gaEHA.3524@TK2MSFTNGP12.phx.gbl>
| >>> <#VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl>
| >>> | >>Subject: Re: Transforming a message for input to a web service
request
| >>> | >>Date: Thu, 15 Jul 2004 11:29:59 +0100
| >>> | >>Lines: 34
| >>> | >>X-Priority: 3
| >>> | >>X-MSMail-Priority: Normal
| >>> | >>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| >>> | >>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| >>> | >>Message-ID: <euzevalaEHA.1248@TK2MSFTNGP11.phx.gbl>
| >>> | >>Newsgroups: microsoft.public.biztalk.orchestration
| >>> | >>NNTP-Posting-Host: 213-161-66-85.has.no.reverse 213.161.66.85
| >>> | >>Path:
| >>>
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
| >>> .phx.gbl
| >>> | >>Xref: cpmsftngxa06.phx.gbl
microsoft.public.biztalk.orchestration:7088
| >>> | >>X-Tomcat-NG: microsoft.public.biztalk.orchestration
| >>> | >>
| >>> | >>Fixed it !!!!
| >>> | >>
| >>> | >>OK - now I understand - you need to define a class in the
webservice and
| >>> | >>then biztalk will create a schema for this class and allow to to
map
| >>> to/from
| >>> | >>it.
| >>> | >>
| >>> | >>
| >>> | >>:-)
| >>> | >>
| >>> | >>
| >>> | >>
| >>> | >>"BeerBoy" <jmacaulay@framfab.co.uk> wrote in message
| >>> | >>news:%23VyQI9kaEHA.2260@TK2MSFTNGP10.phx.gbl...
| >>> | >>> My web service is :
| >>> | >>>
| >>> | >>> [WebMethod]
| >>> | >>>
| >>> | >>> public XmlDocument UploadRecords(XmlDocument Message)
| >>> | >>>
| >>> | >>> {
| >>> | >>>
| >>> | >>> return Message;
| >>> | >>>
| >>> | >>> }
| >>> | >>>
| >>> | >>>
| >>> | >>>
| >>> | >>> I assume this is what you mean when you say the webservice must
use
| >>> | >>complex
| >>> | >>> types ?
| >>> | >>>
| >>> | >>>
| >>> | >>
| >>> | >>
| >>> | >>
| >>>
| >>> This posting is provided "AS IS" with no warranties, and confers no
rights.
| >>>
| >>> EBusiness Server Team
| >>>
| >>>
| >>

This posting is provided "AS IS" with no warranties, and confers no rights.

EBusiness Server Team

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com