Topic
3 replies Latest Post - ‏2012-12-14T09:00:37Z by kimbert@uk.ibm.com
SystemAdmin
SystemAdmin
4179 Posts
ACCEPTED ANSWER

Pinned topic XML attributes after first are Empty in SOAP Tree

‏2012-12-12T17:40:38Z |
Using MessageBroker: 6.1.0.4

I am trying to upgrade a vendor's WSDL's to there new versions. In the new versions they have changed from using all XML elements with child elements with values to many of them having 1 or more attributes on them to replace the child elements. To build the flow, I just imported the Vendor's new WSDL and XSD's just like before. No issues were encountered.

I have run into a very odd issue with this. When WebSphere receives the SOAP message from the new vendor's product using their new WSDL's and loads the message into the SOAP tree, I get all the elements and values, but for the attributes I only get the values for the attribute that is first on the element. The other attributes are present in the tree, but are empty strings.

For example, If I have this fragment:
<ns1:ElementA action="Updated" type="Changed" mode="Forced">
I end up with the tree fragment:
(0x01000000:Folder)urn:sys.msg:InfoValues:V2_3:ElementA = (
(0x03000100:Attribute ):action = 'Updated' (CHARACTER)
(0x03000100:Attribute ):type = '' (CHARACTER)
(0x03000100:Attribute ):mode = '' (CHARACTER)
Now, if I reorder the attributes I can get all of them to show up in the tree with a value one by one, but only for the one that is listed first.
If I have this updated fragment:
<ns1:ElementA mode="Forced" action="Updated" type="Changed">
I end up with the tree fragment:
(0x01000000:Folder)urn:sys.msg:InfoValues:V2_3:ElementA = (
(0x03000100:Attribute ):mode = 'Forced' (CHARACTER)
(0x03000100:Attribute ):action = '' (CHARACTER)
(0x03000100:Attribute ):type = '' (CHARACTER)

I am at a complete loss. If I import the same WSDL and XSD's into IIS or soapUI they work without issues and all elements and values show up just fine. The fact that I can reorder the attributes and they show up one by one leads me to believe that there is not a core issue with the WSDL's or XSD's but maybe more of a Websphere quirk. I get no validation error and the message appears to flow correctly as far as WebSphere is concerned with the exception that there is missing data. Though if I leave off a required attribute the message does fail as I would expect with a validation error. So WebSphere is definitly looking at the attributes. So why do my values get set to empty after the first one?

Does anyone have any ideas what I can look at? Is there some sort of multiple attributes setting somewhere we are missing?

This is driving us crazy and our project timeline is really starting to suffer. Any help would be great.
Updated on 2012-12-14T09:00:37Z at 2012-12-14T09:00:37Z by kimbert@uk.ibm.com
  • kimbert@uk.ibm.com
    kimbert@uk.ibm.com
    508 Posts
    ACCEPTED ANSWER

    Re: XML attributes after first are Empty in SOAP Tree

    ‏2012-12-12T22:53:13Z  in response to SystemAdmin
    This is very strange. It sounds like a product defect, but it is hard to imagine something as basic as this going unnoticed - message broker processes millions of SOAP/XML messages every day in production systems across the world, and I'm pretty sure that most of them contain attributes.
    On the other hand, I'm at a loss to explain it, so I think you should open a PMR.
    • SystemAdmin
      SystemAdmin
      4179 Posts
      ACCEPTED ANSWER

      Re: XML attributes after first are Empty in SOAP Tree

      ‏2012-12-14T00:00:03Z  in response to kimbert@uk.ibm.com
      Just as an update, I was able to take the same WSDL file (and the pile of XSD's that are behind it) and import as a new service into WebSphere 8 and it works as I would expect it to. So rather than continue to try and work these existing flows in v6 to put the vendor's new WSDL in front of them, I am attempting to migrate the entire project into v8.

      Though, I have given the information on this to our company IBM rep to see if they can provide back an answer as to what went wrong in the attempt to use them in v6. Maybe we just need a fixpack or something installed which would be quicker at this point.
  • kimbert@uk.ibm.com
    kimbert@uk.ibm.com
    508 Posts
    ACCEPTED ANSWER

    Re: XML attributes after first are Empty in SOAP Tree

    ‏2012-12-14T09:00:37Z  in response to SystemAdmin
    Ah! Memories are stirring now.

    6.1.0.4 is quite old - I think I remember a defect that was fixed in later versions.
    Either way, moving to v8 is a great idea for all kinds of reasons. v6.1 will not be supported for ever.