[ 
https://issues.apache.org/jira/browse/XMLBEANS-427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukas krecan updated XMLBEANS-427:
----------------------------------

    Description: 
I have following SOAP request.
 
{code}
<soapenv:Envelope  xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0"; 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getRights> 
            <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
               <ns:msisdn>420123456789</ns:msisdn>
            </ns:customerCredential>
      </ns:getRights>
   </soapenv:Body>
</soapenv:Envelope>
{code}

I only need to bind the payload:

{code}
<ns:getRights> 
            <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
               <ns:msisdn>420123456789</ns:msisdn>
            </ns:customerCredential>
</ns:getRights>
{code}

Please note that namespace prefix ns is not defined. Usually this is not a 
problem since in DOM namespaces are already resolved. There is one exception - 
attribute value. When XmlBeans try to unmarshall the element, they are not able 
to resolve the namespace and do not work correctly.

If following request is used (the only difference is position of ns prefix 
declaration) everything works fine

{code}
<soapenv:Envelope  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getRights xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0";> 
            <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
               <ns:msisdn>420123456789</ns:msisdn>
            </ns:customerCredential>
      </ns:getRights>
   </soapenv:Body>
</soapenv:Envelope>
{code}



  was:
I have following SOAP request.
 
{code:xml}
<soapenv:Envelope  xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0"; 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getRights> 
            <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
               <ns:msisdn>420123456789</ns:msisdn>
            </ns:customerCredential>
      </ns:getRights>
   </soapenv:Body>
</soapenv:Envelope>
{code}

I only need to bind the payload:

 {code:xml}
<ns:getRights> 
            <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
               <ns:msisdn>420123456789</ns:msisdn>
            </ns:customerCredential>
</ns:getRights>
{code}

Please note that namespace prefix ns is not defined. Usually this is not a 
problem since in DOM namespaces are already resolved. There is one exception - 
attribute value. When XmlBeans try to unmarshall the element, they are not able 
to resolve the namespace and do not work correctly.

If following request is used (the only difference is position of ns prefix 
declaration) everything works fine

{code:xml}
<soapenv:Envelope  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getRights xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0";> 
            <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
               <ns:msisdn>420123456789</ns:msisdn>
            </ns:customerCredential>
      </ns:getRights>
   </soapenv:Body>
</soapenv:Envelope>
{code}




> Namespace prefix in attribute value not resolved correctly
> ----------------------------------------------------------
>
>                 Key: XMLBEANS-427
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-427
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Binding
>    Affects Versions: Version 2.4 
>            Reporter: Lukas krecan
>
> I have following SOAP request.
>  
> {code}
> <soapenv:Envelope  xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0"; 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>    <soapenv:Header/>
>    <soapenv:Body>
>       <ns:getRights> 
>             <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
>                <ns:msisdn>420123456789</ns:msisdn>
>             </ns:customerCredential>
>       </ns:getRights>
>    </soapenv:Body>
> </soapenv:Envelope>
> {code}
> I only need to bind the payload:
> {code}
> <ns:getRights> 
>             <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
>                <ns:msisdn>420123456789</ns:msisdn>
>             </ns:customerCredential>
> </ns:getRights>
> {code}
> Please note that namespace prefix ns is not defined. Usually this is not a 
> problem since in DOM namespaces are already resolved. There is one exception 
> - attribute value. When XmlBeans try to unmarshall the element, they are not 
> able to resolve the namespace and do not work correctly.
> If following request is used (the only difference is position of ns prefix 
> declaration) everything works fine
> {code}
> <soapenv:Envelope  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>    <soapenv:Header/>
>    <soapenv:Body>
>       <ns:getRights xmlns:ns="http://schemas.qqq.com/wsdl/spi/profile/1.0";> 
>             <ns:customerCredential xsi:type="ns:CustomerCredentialMsisdn">
>                <ns:msisdn>420123456789</ns:msisdn>
>             </ns:customerCredential>
>       </ns:getRights>
>    </soapenv:Body>
> </soapenv:Envelope>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org

Reply via email to