Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I handle Castor unmarshaling of SOAP messages when the namespace is defined inside the operation tag?
    primarykey
    data
    text
    <p>I am developing a contract-first web service based on Spring-WS. I'm relying on Castor marshaling, and I have run into the following issue. </p> <p>Requests are being accepted when the "xmlns" namespace is defined in the Envelope tag, such as:</p> <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.mycompany.com/MyService/schemas"&gt; &lt;soap:Header/&gt; &lt;soap:Body&gt; &lt;doPlaceHoldRequest&gt; &lt;hold&gt; &lt;accountInfo&gt; &lt;accountNumber&gt;123456789&lt;/accountNumber&gt; &lt;/accountInfo&gt; &lt;extended&gt;false&lt;/extended&gt; &lt;afterHours&gt;false&lt;/afterHours&gt; &lt;amountSavings&gt;1.00&lt;/amountSavings&gt; &lt;amountChecking&gt;0.00&lt;/amountChecking&gt; &lt;/hold&gt; &lt;/doPlaceHoldRequest&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt; </code></pre> <p>However, both .NET and Java clients generated from the .wsdl provided by Spring-WS (which was generated from a XSD), form their requests in the following manner:</p> <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;soap:Header/&gt; &lt;soap:Body&gt; &lt;doPlaceHoldRequest xmlns="http://www.mycompany.com/MyService/schemas"&gt; &lt;hold&gt; &lt;accountInfo&gt; &lt;accountNumber&gt;123456789&lt;/accountNumber&gt; &lt;/accountInfo&gt; &lt;extended&gt;false&lt;/extended&gt; &lt;afterHours&gt;false&lt;/afterHours&gt; &lt;amountSavings&gt;1.00&lt;/amountSavings&gt; &lt;amountChecking&gt;0.00&lt;/amountChecking&gt; &lt;/hold&gt; &lt;/doPlaceHoldRequest&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt; </code></pre> <p>Which results in an Unmarshalling Exception being thrown by Castor. How do I get Castor to recognize these messages as valid? Could my WSDL (or the XSD I used to autogenerate it) be wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload