I am consuming a webservice created in .NET. So, the wsdl is generated from that code. I am using cxf 2.2.11 wsdl2java to create java classes for a client. Once I have the client running it sends out a request that does not contain the correct namespaces. So, it gets a bad response. The generated problem namespaces look like this: xmlns:ns5="http://tempuri.org/" xmlns="" The correct names should simply refer to an already defined namespace, such as ns3: The proper namespace for these items is: xmlns:ns3="http://schemas.datacontract.org/2004/07/net.PaymentService" The item that does have the correct name is an Integer The item that does not have the correct name is a JAXBElement<String> Throughout it is only with the JAXBElements that the problem is occuring.
Here is an example piece of what is generated: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ValidateTransaction xmlns="http://tempuri.org/" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns3="http://schemas.datacontract.org/2004/07/net.PaymentService" xmlns:ns4="http://schemas.microsoft.com/2003/10/Serialization/"> <acctInfo> <AccountNumber xmlns:ns5="http://tempuri.org/" xmlns="">8220122040263427</AccountNumber> <ns3:BillerLocationID>370211</ns3:BillerLocationID> </acctInfo> <paymentProcessorID>0</paymentProcessorID> </ValidateTransaction> </soap:Body> </soap:Envelope> Here is a request that works properly: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:eur="http://schemas.datacontract.org/2004/07/net.PaymentService" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <soapenv:Header/> <soapenv:Body> <tem:ValidateTransaction> <tem:acctInfo> <eur:AccountNumber>8220122040263427</eur:AccountNumber> <eur:BillerLocationID>370211</eur:BillerLocationID> </tem:acctInfo> <tem:paymentProcessorID>0</tem:paymentProcessorID> </tem:ValidateTransaction> </soapenv:Body> </soapenv:Envelope> I have tried editing the generated classes to try to correct this, but cannot seem to figure out the correct way to do it. Thanks, David -- View this message in context: http://cxf.547215.n5.nabble.com/generated-request-has-incorrect-namespaces-tp3247088p3247088.html Sent from the cxf-user mailing list archive at Nabble.com.
