Forum Discussion

dwhitehead's avatar
14 years ago

The prefix "xmlns" cannot be bound to any namespace explicit

In soapUI Pro 3.5.1 -

I'm recieving the error "The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly." anytime I try to send a SOAP request (note, these requests worked in 2.0.2 but arent in 3.5 Pro). I've been able to resolve manually by removing the XN:type and xmlns:ns assigned to each attribute but when I switch between XML and Form tabs it automatically gets regenerated. Any suggestions?

7 Replies

  • I am experiencing the same issue. I use soapui 2.0.2 and it works fine . But with 3.5.1 i am getting the following exception :

    org.xml.sax.SAXParseException: The prefix "xmlns" cannot be bound to any namespa
    ce explicitly; neither can the namespace for "xmlns" be bound to any prefix expl
    icitly.
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
    stractSAXParser.java:1231)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
    arse(SAXParserImpl.java:522)

    Thanks to dwhitehead with the xmlns:xn removed it worked !!
  • I'm experiencing the same problem. I didn't see what the resolution was. I tried removing the autogenerated namespace tags from the request but this caused a nullPointer error.
  • I am encountering this issue also but only when I import a WSDL into my project. It also seems only to happen when I use the FORM tab to change my payload. I can augment the XML and it works fine, however, if I input anything into the FORM, it changes the payload for that variable from "xs:type" to "xn:type" for the changed variable. You can click the XML and OUTLINE tabs and see the changed variable, however the RAW view appears unchanged. If I run my payload after it gets changed to "xn:type" I get this "xmlns" error. The workaround has been to only change the xml variables and not use the FORM at all. If the FORM is used, the wsdl becomes unusable since we then have to go manually adjust it to correct the issue and that's risky. So we just reimport.

    Any help would be greatly appreciated.
  • cdichter's avatar
    cdichter
    New Contributor
    I'm experiencing the same issue.

    Are we going to get an answer?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    this is per the XML specification. Please see the excerpt from http://www.w3.org/TR/REC-xml-names/#ns-decl :

    "The prefix xmlns is used only to declare namespace bindings and is by definition bound to the namespace name http://www.w3.org/2000/xmlns/. It MUST NOT be declared . Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace. Element names MUST NOT have the prefix xmlns."

    Thanks,
    Michael Giller
    SmartBear Software