XML namespace prefix appearing

We have recently migrated our JAX-RPC web services from Websphere 5.1 to 7.0.  The web services have not changed during the migration and the WSDL files for both versions are identical.  However, there is one difference in the web service response that is causing problems for the client.  Apparently there is a namespace prefix (p909) added for the elements that originally did not have any prefix.  This prefix is not in any of the WSDL files nor is it part of the request.  It just appears out of nowhere.

Does anyone know why this prefix is being added and how to prevent it?  Could it be a Websphere setting?

Thanks
leobaz2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leobaz2Author Commented:
Here are the responses that we return.  The top one is from websphere 7.0 and the bottom from websphere 5.1.  As you can see, they are the same except for the p909 prefix.
Websphere 7.0
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
  <p909:authenticateResponse xmlns:p909="http://webservice.abc.com">
  <p909:authenticateReturn>22DCAEB2C4777901B34EB33262A9778FBA6CDD</p909:authenticateReturn> 
  </p909:authenticateResponse>
  </soapenv:Body>
</soapenv:Envelope>

Websphere 5.1
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
  <authenticateResponse xmlns="http://webservice.abc.com">
  <authenticateReturn>22DCAEB2C4777901B34EB33262A9778FBA6CDD</authenticateReturn> 
  </authenticateResponse>
  </soapenv:Body>
</soapenv:Envelope>

Open in new window

0
BigRatCommented:
I think the reasons why it has been added in 7.0 are given in this rather long but extensive article :-

http://www.ibm.com/developerworks/webservices/library/ws-tip-namespace.html

and it seems that by setting elementFormDefault="unqualified" you might get the original back again.


Strictly speaking BOTH forms of the XML are perfectly legal and the client ought to be conform.
0
leobaz2Author Commented:
The solution was to set the JVM property com.ibm.ws.webservices.serializeOperationElementUsingDefaultNamesapce=true.  This suppresses the prefix from being generated.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.