none
Send EDI Via Web Services/WCF Services and receive xml response RRS feed

Answers

  • Try experimenting with the BizTalk Adapter settings and specifying an XPath into your message body.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    • Marked as answer by R.Zi Tuesday, March 26, 2013 8:16 PM
    Tuesday, March 26, 2013 2:34 PM
  • Hi David,

    Thanks for your tips and thanks for your always help. Finally I find the reasons for the errors and fix the issue. That's because the BizTalk published WCF service automatically creates the hidden <part></part> xml element note to wrap the string contents I send to it in the request message and the response message. So inside the message panel of WCF-BasicHttp Transport Properties as you point out, I need change the request Body Path and response Body Path as attached picture. For request, use BodyPath to get the string contents in the <part> element, for response, add the <part> note outside the message body. Then the problems are solved.

    Thanks for your help, and thanks for your nice. I appreciate.

    R.ZI

    • Marked as answer by R.Zi Tuesday, March 26, 2013 8:16 PM
    Tuesday, March 26, 2013 8:16 PM

All replies

  • Hi,

    Can you try using a flat file disasssembler instead.

    Thursday, March 21, 2013 5:17 AM
  • since you are exposing wcf so you can only use XMLReceive pipeline .

    after message received in orchestration , you can retrieve string and then can call EDIReceive pipeline inside orchestration

    Regards

    Mohit

    Thursday, March 21, 2013 9:09 AM
  • Hi BizTalk-learner,

    Thanks for your reply. I have already achieved using default EDIReceive pipeline in SOAPUI. Now my issue is how to achieve this in client code? The following is my code, I keep getting the empty string as response. I can send request successfully. The test file is 25KB EDI file. I have already configured the app.config and web.config. The response is EDI xml file. So I think probably response xml file need be serialized first. But how can I achieve that in following C# code. Any ideas?

    ServiceClient client = new Serviceclient(basicHttp-twoway);
    EDIIn = "something";
    object msg = EDIIn;
    client.EDItransform(ref msg);
    string EDIout = (string)msg;
    console.writeLine(EDIout);

    console.readLine();

    Thanks

    R.Zi

    Friday, March 22, 2013 1:35 PM
  • Hi Mohit,

    Thanks for your reply. As I know, BizTalk does not support to use EDI dissassemble in orchestration. And I have already achieved using default EDIReceive pipeline in SOAPUI. Now my issue is how to achieve this in client code? The following is my code, I keep getting the empty string as response. I can send request successfully. The test file is 25KB EDI file. I have already configured the app.config and web.config. The response is EDI xml file. So I think probably response xml file need be serialized first. But how can I achieve that in following C# code. Any ideas?

    ServiceClient client = new Serviceclient(basicHttp-twoway);
    EDIIn = "something";
    object msg = EDIIn;
    client.EDItransform(ref msg);
    string EDIout = (string)msg;
    console.writeLine(EDIout);

    console.readLine();

    Thanks

    R.Zi

    Friday, March 22, 2013 1:40 PM
  • Try experimenting with the BizTalk Adapter settings and specifying an XPath into your message body.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    • Marked as answer by R.Zi Tuesday, March 26, 2013 8:16 PM
    Tuesday, March 26, 2013 2:34 PM
  • Hi David,

    Thanks for your tips and thanks for your always help. Finally I find the reasons for the errors and fix the issue. That's because the BizTalk published WCF service automatically creates the hidden <part></part> xml element note to wrap the string contents I send to it in the request message and the response message. So inside the message panel of WCF-BasicHttp Transport Properties as you point out, I need change the request Body Path and response Body Path as attached picture. For request, use BodyPath to get the string contents in the <part> element, for response, add the <part> note outside the message body. Then the problems are solved.

    Thanks for your help, and thanks for your nice. I appreciate.

    R.ZI

    • Marked as answer by R.Zi Tuesday, March 26, 2013 8:16 PM
    Tuesday, March 26, 2013 8:16 PM