Do your namespaces actually contain backslashes. If so, then your namespace declarations are invalid.
On 7/25/05, Wierenga, R. - SPLXE <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > I'm having a problem when using the soap api to create messages. It seems > that the namespaces are disregarded when extracting content from the > SOAPBody. Does anybody have any idea why? > > > > See code snippet below: > > > > /* String soapMessageContent = > > * <env:Envelope > xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"> > > * <env:Body> > > * <Example xmlns=\"http://www.example.com\"/> > > * </env:Body> > > * </env:Envelope> > > */ > > > > /* First create a test soap message and set its contents */ > > MessageFactory messageFactory = MessageFactory.newInstance(); > > SOAPMessage message = messageFactory.createMessage(); > > // XMLHelper is my own code which uses documentbuilder with namespaceaware > option set to true. > > Document input = XMLHelper.readXML(soapMessageContent); > > message.getSOAPPart().setContent(new DOMSource(input)); > > > > > > /* So far so good.... Now retrieve contents of body */ > > Node contents = message.getSOAPBody().getChildNodes().item(0); > > > > > > /* contents value will be this: > > * <Example/> > > * > > */ > > > > Where the *BEEP* is the namespace? J > > > > > > I'm using axis-1.2, xerces-2.7.0, saaj-1.2, jaxrpc-1.1 and some other jars. > > > > Thanks, > > Robin > > ********************************************************************** > For information, services and offers, please visit our web site: > http://www.klm.com. This e-mail and any attachment may contain confidential > and privileged material intended for the addressee only. If you are not the > addressee, you are notified that no part of the e-mail or any attachment may > be disclosed, copied or distributed, and that any other action related to > this e-mail or attachment is strictly prohibited, and may be unlawful. If > you have received this e-mail by error, please notify the sender immediately > by return e-mail, and delete this message. Koninklijke Luchtvaart > Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be > liable for the incorrect or incomplete transmission of this e-mail or any > attachments, nor responsible for any delay in receipt. > ********************************************************************** >
