java - SAXParseException: The prefix "xsi" for attribute "xsi:schemaLocation" is not bound -


i'm getting error when try call webservice (hp-service manager, if it's going help) class deployed websphere 7.0. same code functions when call junit code...

the fragment of wsdl is:

<definitions targetnamespace="http://schemas.hp.com/sm/7" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/xmlschema"   xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://schemas.xmlsoap.org/wsdl/  http://schemas.xmlsoap.org/wsdl/"> 

i've thought xmlns:xsi knows xml parser, don't understand error. why such error occures on websphere, while not occur when code launched in junit using com.ibm.ws.webservices.thinclient?

the adequate stacktrace fragment is:

caused by: javax.wsdl.wsdlexception: wsdlexception: faultcode=parser_error: problem parsing 'wsjar:file:/path/to/ear.ear/war.war/web-inf/lib/my_jar-0.0.1-snapshot.jar!/wsdl/mywsdl.wsdl'.: org.xml.sax.saxparseexception: das präfix "xsi" für attribut "xsi:schemalocation", das einem elementtyp "definitions" zugeordnet ist, ist nicht gebunden. @ com.ibm.wsdl.xml.wsdlreaderimpl.getdocument(wsdlreaderimpl.java:2255) @ com.ibm.wsdl.xml.wsdlreaderimpl.readwsdl(wsdlreaderimpl.java:2330) @ com.ibm.wsdl.xml.wsdlreaderimpl.readwsdl(wsdlreaderimpl.java:2296) @ org.apache.axis2.jaxws.util.wsdl4jwrapper$13.run(wsdl4jwrapper.java:745) @ org.apache.axis2.java.security.accesscontroller.doprivileged(accesscontroller.java:132) @ org.apache.axis2.jaxws.util.wsdl4jwrapper.loaddefinition(wsdl4jwrapper.java:742) ... 51 more caused by: org.xml.sax.saxparseexception: das präfix "xsi" für attribut "xsi:schemalocation", das einem elementtyp "definitions" zugeordnet ist, ist nicht gebunden. @ org.apache.xerces.parsers.domparser.parse(unknown source) @ org.apache.xerces.jaxp.documentbuilderimpl.parse(unknown source) @ com.ibm.wsdl.xml.wsdlreaderimpl.getdocument(wsdlreaderimpl.java:2245) ... 56 more

the error stems not wsdl xml sent webservice. may want glance @ xml returned , check if xsi namespace bound correctly in document.

apart that, may minor difference in configuration of each parser instance (server vs. junit) causes 1 parser reject unbound namespace , other 1 ignore "glitch" in xml parsed. (see instance setnamespaces() apache parser.)


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -