eed3si9n / scalaxb

scalaxb is an XML data binding tool for Scala.
http://scalaxb.org/
MIT License
335 stars 154 forks source link

[1.3.0] Uses same namespace name twice (for different namespace URLs) #291

Open smessmer opened 9 years ago

smessmer commented 9 years ago

This bug is present in scalaxb 1.3.0 (scalaxb 1.1.2 was working and I couldn't test versions inbetween due to other bugs).

WSDL: https://api.affili.net/V2.0/Logon.svc?wsdl

Sending a request to this endpoint using the Soap11ClientsAsync (in scalaxb 1.3.0 with scala 2.10.4) uses the same namespace name (xmlns:tns0) twice. The request looks like:

<soap11:Envelope
  xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tns0="http://affilinet.framework.webservices/Svc"
  xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
  xmlns:tns4="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF"
  xmlns:tns3="http://www.microsoft.com/practices/EnterpriseLibrary/2007/01/wcf/validation"
  xmlns:tns2="http://affilinet.framework.webservices/Svc"
  xmlns:tns1="http://affilinet.framework.webservices/types"
  xmlns:tns0="http://schemas.microsoft.com/2003/10/Serialization/"
  xmlns="http://affilinet.framework.webservices/Svc">
  <soap11:Body>
    <LogonRequestMsg>
      <tns1:Username>[username]</tns1:Username>
      <tns1:Password>[password]</tns1:Password>
      <tns1:WebServiceType>Publisher</tns1:WebServiceType>
    </LogonRequestMsg>
  </soap11:Body>
</soap11:Envelope>

Using Soap11Clients (non-async) in scalaxb 1.1.2 creates the following:

<soap11:Envelope
  xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
  xmlns:tns4="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF"
  xmlns:tns3="http://www.microsoft.com/practices/EnterpriseLibrary/2007/01/wcf/validation"
  xmlns:tns2="http://affilinet.framework.webservices/Svc"
  xmlns:tns1="http://affilinet.framework.webservices/types"
  xmlns:tns0="http://schemas.microsoft.com/2003/10/Serialization/"
  xmlns="http://affilinet.framework.webservices/Svc">
  <soap11:Body>
    <LogonRequestMsg>
      <tns1:Username>[username]</tns1:Username>
      <tns1:Password>[password]</tns1:Password>
      <tns1:WebServiceType>Publisher</tns1:WebServiceType>
    </LogonRequestMsg>
  </soap11:Body>
</soap11:Envelope>

here the namespace names are unique.

This bug causes the soap endpoint to reject the soap request with a "400 Bad Request" when using scalaxb 1.3.0. Scalaxb 1.1.2 works fine.

smessmer commented 9 years ago

any progress on this?

eed3si9n commented 9 years ago

Not really, but I got another report today that might be related #298. The progress on scalaxb is limited to my free time but I'd be happy to accept pull reqs.