Hi Wolfgang, I am not using a WSDL, I am just testing on the sever side component. What I did is simply creating a soapEnvelope with a given XML as its body and then call toString() to deserialize the soapEnvelope, and then I saw that empty attribue (xmlns:ns1="") in the string!
Here is the soapEnvelope dump: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:RecordSet xmlns:ns1="http://xxxx.com/yyy_out" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:Record xmlns:ns1=""> <ns1:PROSPECT_NUMBER xmlns:ns1="">10</ns1:PROSPECT_NUMBER> <ns1:FIRM xmlns:ns1="">Business Objects</ns1:FIRM> <ns1:FIRST_NAME xmlns:ns1="">Ryan</ns1:FIRST_NAME> <ns1:MIDDLE_NAME xmlns:ns1=""/> <ns1:LAST_NAME xmlns:ns1="">Champlin</ns1:LAST_NAME> </ns1:Record> </ns1:RecordSet> </soapenv:Body> </soapenv:Envelope> Thanks in advance! Frank ============================================ --- WJ Krpelan <[EMAIL PROTECTED]> wrote: > Hi, > could you provide the wsdl and a soap-trace? > which style and encoding are u using? > Cheers Wolfgang > > > --- Frank Zhou <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > > I am re-posting this message, hoping to get some > > urgent help. > > > > I am using AXIS 1.4 for my web service needs. I > am > > now > > encounting the following error when I try to send > > an > > XML over HTTP: > > > > I have a valid XML message as a string, the XML > > message defines a namespace at the root element > > like > > this: > > > > xmlns:ns1="somthing" > > > > Let me assume this xml string as xmltext, now I > > create > > a soap envelope with this XML message as body, > the > > soapEnvelope object seems good to me in my > debugger, > > but a problem occurs when I try to deserialize it > > using soapEnvelope.toString() or > > soapEnvelope.getAsString(). > > I notice that for every local element in the > > original > > xml such as this: > > > > <ns1:rec>xxx</ns1:rec>, > > > > in the output string, I get the the following: > > > > <ns1:rec xmlns:ns1="">xxx</ns1:rec> > > > > That is, there is an extra attribute with empty > > value. > > This causes problems for the receivers of the > http > > response. > > > > Here are my code snappet: > > > =================================================== > > SOAPEnvelope soapEnvelope = new > SOAPEnvelope(); > > Element bodyElement = > > createDocument(xmltext).getDocumentElement(); > > org.apache.axis.message.SOAPBodyElement > > messageElement = new > > > > > org.apache.axis.message.SOAPBodyElement(bodyElement); > > > > > > > soapEnvelope.addBodyElement((SOAPBodyElement)messageElement); > > > > > > The createDocument(xmlText) calls the following > > APIs: > > > > InputSource source = new InputSource( new > > StringReader( xmlText ) ) ; > > DocumentBuilderFactory factory = > > DocumentBuilderFactory.newInstance(); > > > > > factory.setIgnoringElementContentWhitespace(false); > > DocumentBuilder docBuilder = > > factory.newDocumentBuilder(); > > return docBuilder.parse(source); > > > > It seems to me that AXIS has a bug handling this > > case. > > Any help is very much appreciated! > > > > Thanks! > > Frank > > > > > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]