views:

248

answers:

3

Hi guys,

I have an working orchestration in place to process X12 messages. Now I need to expose the orchestration as a webservice (ASMX) that accepts a text input (the X12 message) and returns the text response (the X12 response). If I try to use the wizard, the generated webservice will expose the inner XML representation of the X12 request and not the its original plain text representation.

In short, I want to be able to connect to a webservice (ASMX and not a WCF service), send a X12 request (plain text) and get the appropriate response (also plain text).

I've seen examples of this using WCF, but none with a simple webservice. Can you give me a hand with this?

Thanks!

+1  A: 

One possible solution would be to create a SOAP handler to convert the plain text to the xml representation (so BizTalk can read it) and back again. While I haven't tried this myself, it might work. You would need to create a handler for the request and one for the response to intercept the string and convert it to the xml schema and back again. You can also look at using a generic XML document instead of a string, that might be easiest. Check out this post:

http://blogs.msdn.com/richardbpi/archive/2006/11/10/exposing-biztalk-web-services-that-accept-generic-content.aspx

-Bryan

Bryan Corazza
Baryan, wher in NYC are you? I have a BizTalk project, contact me at saif dot(.) intj at(@) gmail.com
Saif Khan
+1  A: 

While I haven't tried, I have a feeling you will not be able to do that without some degree of custom coding in the pipeline.

When you publish the web service using the wizard, BizTalk takes the schemas involved and uses them as the types for the web service, this makes sense in almost all cases, but not in yours.

However , as far as I know, there is no good way to take and EDI message over SOAP; you could create your web service to accept a string message and have the client "know" that it needs to be X12, but there's no way to describe that in the WSDL.

If you would do that, however, you will get the X12 message into the pipeline, wrapped in a element (or somehting like that, depending on how you've modified your web service), before you get to the disassembler and to the orchestration you will have to have some code to strip that out, but that should be relatively easy to write.

Yossi Dahan
A: 

I would also Translate my x12 260 file to SOAP Webservice . what are the best way... iam converting to XML & sending to SOAP... but here a problem is i get only 3 xml's which has only Transaction Details inside that file.... where are my Header & Trailers gone :(

Anyone faced such issue