locked
Maybe a namespace problem? Data is ignored RRS feed

  • Question

  • I have an incoming SOAP message, when it arrives it seems all of the data is stripped out or ignored - I dump it straight to a file location and all I get are the opening and closing schema tags, with the interior gone.

    The message that is coming in looks like this:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="<soap:Body">http://www.w3.org/2001/XMLSchema-instance"><soap:Body>
    <PaymentExportRequest xmlns="urn:Ariba:Buyer:vrealm_599" variant="vrealm_599" partition="prealm_599">
    <Payment_PaymentHeaderExport_Item>

    etc.

    So I should be seeing all the data from within PaymentExportRequest

    My schema root element looks like this:

    <xs:schema xmlns:typens="urn:Ariba:Buyer:vrealm_599" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" elementFormDefault="unqualified" targetNamespace="urn:Ariba:Buyer:vrealm_599" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    - <xs:element name="PaymentExportRequest">

    etc.

    I'm expecting the Soap envelope to get stripped off and everything within PaymentExportRequest to get processed, but it seems to ignore/strip off the interior. 

    Do I have something wrong about how the namespaces are set up in the schema?


    Down there somewhere, its just ones and zeros.

    Tuesday, February 21, 2012 7:32 PM

Answers

  • Qualified attribute will not change parsing of whole message but only part of it. So it is irrelevant.

    I'd suggest to use WCF logging to get the real message.

    Second I'd create the File receive location and test to consume this message with this RL.

    Double check the schema. Redeploy it to make sure you use the right schema.


    Leonid Ganeline [BizTalk MVP] BizTalkien: Advanced Questions: have fun - test your knowledge

    Tuesday, February 21, 2012 9:37 PM
    Moderator
  • If you recently changed the schema, try republishing it to your web service using the "BizTalk Web Services Publishing Wizard".

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

    Wednesday, February 22, 2012 3:25 PM

All replies

  • Hi,

    Few things could be the reason IMO,

    Which pipeline you are using at your receive?

    How does this SOAP message is defined in the WSDL of your BizTalk service? Could you also have any option to capture the request before it hits the BizTalk receive? I would suggest you to use fiddler to capture or any other tool .

    For more information about the impact if namespaces on BizTalk schemas i would suggest you to have a look at this article by Richard.

    HTH,Thanks, Naushad (MCC/MCTS) http://alamnaushad.wordpress.com |@naushadalam

    If this is helpful or answers your question - please mark accordingly! Please "Vote As Helpful" if this was useful while resolving your question!

    Tuesday, February 21, 2012 7:45 PM
    Moderator
  • Additional information:  When I use the schema to validate the instance of my incoming message, I get a most curious error:

    The element 'PaymentExportRequest' in namespace 'urn:Ariba:Buyer:vrealm_599' has invalid child element 'Payment_PaymentHeaderExport_Item' in namespace 'urn:Ariba:Buyer:vrealm_599'. List of possible elements expected: 'Payment_PaymentSplitAccountingExport_Item, Payment_PaymentBankExport_Item, Payment_PaymentHeaderExport_Item, Payment_PaymentDetailExport_Item'.

    Note that my input instance has all four of these in it. But for some reason, the validator is choking on Payment_PaymentHeaderExport_Item even though it is spelled exactly the same in the instance doc and the schema.


    Down there somewhere, its just ones and zeros.

    Tuesday, February 21, 2012 7:53 PM
  • Hi

    It seems like the message is not confirming to the schema? whcih pipeline you are using at receive side? Also seems like schema is expecting the elements in order?

    HTH,Thanks, Naushad (MCC/MCTS) http://alamnaushad.wordpress.com |@naushadalam

    If this is helpful or answers your question - please mark accordingly! Please "Vote As Helpful" if this was useful while resolving your question!


    Tuesday, February 21, 2012 7:55 PM
    Moderator
  • Thanks for the reply.

    The pipeline is XMLReceive.  The sample I am using was sent to me by the partner that is sending data, so its representative of what they will be sending me. Fiddler is I think not going to help because the traffic is https (although I don't know Fiddler that well, maybe there is a way to get it to decode that).

    If I submit the sample message generated by BizTalk, it sails in, but if I submit the sample instance that I posted a header for above, the data gets ignored.  There has to be some reason for that but I can't see what it is, I was hoping there is some namespace convention I'm missing.

    I also tried generating a sample schema off of the instance data I was provided, but it looks pretty much the same: 

    <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:tns="urn:Ariba:Buyer:vrealm_599" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:Ariba:Buyer:vrealm_599" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    - <xs:element name="PaymentExportRequest">


    Down there somewhere, its just ones and zeros.

    Tuesday, February 21, 2012 7:57 PM
  •  

    Hi ,

    If you want to do like that Please  consume your incoming SOAP message through  WCF Adapter and  if you want to stripped off your Envelope configure  Message tab in WCF configuration wizard

    like

    Specify the source of the inbound BizTalk message body

    select Body--contents of <soap:Body>element

    refer this link to know more about WCF Adapter http://msdn.microsoft.com/en-us/library/bb226471.aspx

    Regards,

    Chandra Kumar

    • Edited by Chandra Kumar Tuesday, February 21, 2012 7:58 PM
    • Proposed as answer by Chandra Kumar Tuesday, February 21, 2012 7:58 PM
    Tuesday, February 21, 2012 7:58 PM
  • Thanks for the reply.

    If I submit the sample message generated by BizTalk, it sails in, but if I submit the sample instance that I posted a header for above, the data gets ignored.  There has to be some reason for that but I can't see what it is, I was hoping there is some namespace convention I'm missing.

    Ok, Thanks!

    Could you try to use  SOAP UI(its free) , Configure your service url in the SOAP ui, and it will generate the instance xml message for your service including all the SOAP headers. In that you could modify the values and test your service.

    Why i am saying to use SOAPUI is,It can guide us to generate the input message and all the necessary namespaces correctly after reading your service details.

    Let me know if you need more information.

    HTH,Thanks, Naushad (MCC/MCTS) http://alamnaushad.wordpress.com |@naushadalam

    If this is helpful or answers your question - please mark accordingly! Please "Vote As Helpful" if this was useful while resolving your question!

    Tuesday, February 21, 2012 8:03 PM
    Moderator
  • I'm using the regular SOAP adapter, and don't want to change it, it took some serious work to get that working. The problem isn't getting the envelope stripped off, as that is happening correctly.  The problem is that the message that comes out of the pipeline is just:

    <PaymentExportRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:Ariba:Buyer:vrealm_599" />

    So, an empty message.  When I submit the message generated as an instance by BizTalk, the full data inside shows up.

    So the question is: What is the difference between the input file from my partner that makes the data not recognized once it comes in?

    Again, the problem is not the adapter,  it is not the Soap envelope, it is something about the schema that causes it to ignore the XML tags that contain the data in my input. Please focus on the actual problem, I appreciate trying to help but I have narrowed it down to a specific thing that I want to solve, not start over from scratch.


    Down there somewhere, its just ones and zeros.

    Tuesday, February 21, 2012 8:06 PM
  • Okay, I will give Soap UI a  try (I use this tool a lot, its very good).  But in the end, I need to modify my schema to match what is coming from the partner, my web service has to accomodate what they are sending. So I was hoping someone could look at the header of my schema, and the header of the incoming message, and tell me what is wrong.

    Down there somewhere, its just ones and zeros.

    Tuesday, February 21, 2012 8:08 PM
  • I can notice the following difference in your schema and the schema generated by using the sample instance.

    <xs:schema xmlns:typens="urn:Ariba:Buyer:vrealm_599" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" elementFormDefault="unqualified" targetNamespace="urn:Ariba:Buyer:vrealm_599" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="PaymentExportRequest">

    <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:tns="urn:Ariba:Buyer:vrealm_599" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:Ariba:Buyer:vrealm_599" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="PaymentExportRequest">

    It seems that the sample instance you are using is using  ElementFormDefault as Qualified and for the schema created by you has specified the ElementFormDefault as Unqualified it can be verified from this too:

    <PaymentExportRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:Ariba:Buyer:vrealm_599" />

    So change ElementFormDefault to Qualified for schema and test it again.


    Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)

    Tuesday, February 21, 2012 8:44 PM
    Moderator
  • Sharp eye!  I've tried it both as Unqualified and Qualified, same result.

    Down there somewhere, its just ones and zeros.

    Tuesday, February 21, 2012 9:02 PM
  • Qualified attribute will not change parsing of whole message but only part of it. So it is irrelevant.

    I'd suggest to use WCF logging to get the real message.

    Second I'd create the File receive location and test to consume this message with this RL.

    Double check the schema. Redeploy it to make sure you use the right schema.


    Leonid Ganeline [BizTalk MVP] BizTalkien: Advanced Questions: have fun - test your knowledge

    Tuesday, February 21, 2012 9:37 PM
    Moderator
  • Hi,

    In the instance you try to validate you have a default namespace - urn:Ariba:Buyer:vrealm_599 (Declared by xmlns="urn:Ariba:Buyer:vrealm_599")

    Default namesapce means that all elements in the below tree hierarchy share this namespace.

    This means that in the input instance the node "Payment_PaymentHeaderExport_Item" has the namespace urn:Ariba:Buyer:vrealm_599.

    My guess is that in the schema you validate you dont have a default namespace declaration, and so inorder for the node "Payment_PaymentHeaderExport_Item" to have a namespace in the schema you validate , you need to set the ElementFormDefault property to "Qualifed" as mentioned before.

    Please try changing that and validate the instance again


    feldman.shay@gmail.com

    Wednesday, February 22, 2012 2:33 PM
  • If you recently changed the schema, try republishing it to your web service using the "BizTalk Web Services Publishing Wizard".

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

    Wednesday, February 22, 2012 3:25 PM
  • I originally had it set to qualified, I switched it as an experiment.  But I didn't republish it after I switched it, so I will give that a try as Leonard suggests

    Down there somewhere, its just ones and zeros.

    Wednesday, February 22, 2012 4:53 PM