none
BizTalk sending message to Webservice without maps

    Question

  • Hi,

    I am new to Biztalk. I got a requirement as below.

    Requirement is below:-

    1. Source: Oracle (table). I created a generated schema  in BizTalk.
    2. Target: Webservice which receives "object array"(Table of source records from Biztalk) as an input.
    3. Source and Target systems have same structure. Hence no mapping should be implemented. Logic should be in pipelines or orchestration.

    Need info on below two topics:

    1. How to incorporate the logic in pipeline or orchestration to map data from source schema to target WS schema.

    Regards,

    Vinod

    • Edited by vinod959 Sunday, December 08, 2013 8:38 AM
    Sunday, December 08, 2013 8:21 AM

Answers

  • Sorry, I say this with about 99.8% certainty that what you're asking is not possible.  To continue, the .02% possibility is only if somehow the Web Service was written to directly accept the OracleDB adapter output as represented by the oracleDBBinding schema.

    It doesn't matter that the source and destination are logically the same (field names, types, etc).  The OracleDB output and the Web Service are represented by two different schemas in BizTalk.  That's just how it works.

    So, you will need to transform the OracleDB message type (xsd) to the Web Service message type (xsd).  There is no way around this.

    This is what BizTalk Maps are for.  If you do make the effort to keep the source and target the 'same' the Map would be very simple, direct one-to-one links.  Yes, it's possible to do it other ways but they would all be substantively more difficult, bug prone and with a less desirable performance profile.

    I will also offer this.  The ban on Maps is completely arbitrary and counter-productive (trust us).  As a BizTalk Developer, I would simply not accept a project with this requirement.

    Sunday, December 08, 2013 2:40 PM

All replies

  • What do you mean when you say "same structure"? If you mean that there will be no change in values that come from Oracle and go to Web Service. In that case you require a one to one mapping. (I'm assuming that both are different schemas as one is generated from Oracle and another from Web Service). If this is the case then you would require only map and no Orchestration or Custom pipeline. 

    Deploy this map to an application. In that application, create receive port that receives the values from Oracle DB. Configure the above  map in this receive port. Create a send port (which subscribes to this receive port) that will send the values to the web service.

    Kunal G

    Sunday, December 08, 2013 10:52 AM
  • Hi Kunal.

    Thanks for your reply.

    Same structure means number of Input fields and all the individual fields(names and datatypes) are same and one-to-one map for destination.

    The requirement for me is not to use Mapping and I should implement this logic in Orchestration or Pipeline.

    Please let me know.

    Regards,

    Vinod

    Sunday, December 08, 2013 12:38 PM
  • You can change namespaces in an orchestration or a pipeline
    Whether it's a rellay good idea is another discussion

    Eg: Biztalk Custom Pipeline Component: To Change RootNode and NameSpace

    rgds /Peter

    Sunday, December 08, 2013 12:52 PM
  • Hi Vinod,

    Lemvigh pointed to component which will change the NameSpace, but I am wondering is that enough.(Can you share the schemas - source and destination)

    One Question out of curiosity : Why map shouldn't be used?

    As you said source and destination is same from all perspective, then why not have a map as suggested by Kunal.




    Sunday, December 08, 2013 1:13 PM
  • any reasons, why you don't want to use map? Using map in this case will save you time and complexity. As these are auto generated schemas, I doubt it would be as simple as changing RootNode and NameSpace. Could you post your schemas, it would help in better analysis.

    Kunal G

    Sunday, December 08, 2013 1:29 PM
  • Thanks guys for all your help so far. We should not be supposed to use Map in Biztalk as per the architecture Proposed. Maps are not supposed as per the architecture to design as source and target field structure are same.Hence i need to implement logic in a pipeline or orchestration.

    I cannot share full xml due to confidentiality reasons:-

    Below are the sample source and target schema like the one am using:

    Source(Oracle DB table Schema):

    Source Schema namespace: Microsoft.LobServices.OracleDB/2007/03/SYSTEM/Table/Sch

    Source Schema looks like below:-

    SourceRoot(Root node) -> SourceArray(Unbounded)-> ELEMENT_1,ELEMENT_2,ELEMENT_3

    All ELEMENT_1,ELEMENT_2,ELEMENT_3 have max occurs=1,min occurs=0

    Target(Webservice Schema) :

    Target namespace: tempuri.org

    Target Schema looks like below:-

    TargetRoot(Root node) -> TargetArray(Unbounded)-> ELEMENT_1,ELEMENT_2,ELEMENT_3

    All ELEMENT_1,ELEMENT_2,ELEMENT_3 have max occurs=1,min occurs=0

    Hence the requirement is like i need to pass a object array to a webservice(Target) in Biztalk.

    Sunday, December 08, 2013 2:06 PM
  • Thanks guys for all your help so far. We should not be supposed to use Map in Biztalk as per the architecture Proposed. Maps are not supposed as per the architecture to design as source and target field structure are same.Hence i need to implement logic in a pipeline or orchestration.

    I cannot share full xml due to confidentiality reasons:-

    Below are the sample source and target schema like the one am using:

    Source(Oracle DB table Schema):

    Source Schema namespace: Microsoft.LobServices.OracleDB/2007/03/SYSTEM/Table/Sch

    Source Schema looks like below:-

    SourceRoot(Root node) -> SourceArray(Unbounded)-> ELEMENT_1,ELEMENT_2,ELEMENT_3

    All ELEMENT_1,ELEMENT_2,ELEMENT_3 have max occurs=1,min occurs=0

    Target(Webservice Schema) :

    Target namespace: tempuri.org

    Target Schema looks like below:-

    TargetRoot(Root node) -> TargetArray(Unbounded)-> ELEMENT_1,ELEMENT_2,ELEMENT_3

    All ELEMENT_1,ELEMENT_2,ELEMENT_3 have max occurs=1,min occurs=0

    Hence the requirement is like i need to pass a object array to a webservice(Target) in Biztalk.

    Sunday, December 08, 2013 2:07 PM
  • Sorry, I say this with about 99.8% certainty that what you're asking is not possible.  To continue, the .02% possibility is only if somehow the Web Service was written to directly accept the OracleDB adapter output as represented by the oracleDBBinding schema.

    It doesn't matter that the source and destination are logically the same (field names, types, etc).  The OracleDB output and the Web Service are represented by two different schemas in BizTalk.  That's just how it works.

    So, you will need to transform the OracleDB message type (xsd) to the Web Service message type (xsd).  There is no way around this.

    This is what BizTalk Maps are for.  If you do make the effort to keep the source and target the 'same' the Map would be very simple, direct one-to-one links.  Yes, it's possible to do it other ways but they would all be substantively more difficult, bug prone and with a less desirable performance profile.

    I will also offer this.  The ban on Maps is completely arbitrary and counter-productive (trust us).  As a BizTalk Developer, I would simply not accept a project with this requirement.

    Sunday, December 08, 2013 2:40 PM
  • You can't go from A to B without a transformation of a kind

    Whether this is done in a .net component, a pipeline or ochestration, or a map (xslt) does not make a difference on the result

    BizTalk is all about xml transformation if your project has other requirements you would probably be better off using other server software

    / Peter

    Sunday, December 08, 2013 2:52 PM