Spring WS has trouble with namespace declaration for schema instance

This is my request Envelope, with the xsi:xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" declaration put in my myRequestMethod XML tag:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:sd="http://www.foo.bar/ws" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soapenv:Header/>
    <soapenv:Body >
     <sd:myRequestMethod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <sd:name xsi:nil="true"/>

This works (tested with SoapUI), but when my user generates soap client, the xsi:xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" declaration is automatically put in the Envelope tag like this (the most outer tag):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:sd="http://www.foo.bar/ws" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header/>
    <soapenv:Body >
     <sd:myRequestMethod>
       <sd:name xsi:nil="true"/>

This gives him

The namespace associated with the prefix 'xsi' could not be resolved.   

Is this normal behaviour, that soap can't understand it if its not in inner tag? Or I can configure my spring-ws somehow to allow it? The user auto generates the client and request, so he can't change his side.

Answers


Both XMLs are instances of legitimate use of XML Namespaces. I suspect a bug in the document processing infrastructure where the contents of body are processed without proper propagation of all declared namespace prefixes.


Need Your Help

Python 2.7- Storing Each Row Of A CSV As A Separate List/Dictionary

python list dictionary

newbie programmer here. I am attempting to parse a pipe-delimited CSV file, and store each item row (each row after the header) in a separate List or Dictionary.

How do I step out of a loop with Ruby Pry?

ruby-on-rails ruby loops exit pry

I'm using Pry with my Rails application. I set binding.pry inside a loop in my model to try and debug a problem. For example: