You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Steve Barham <st...@formicary.net> on 2006/05/04 15:11:10 UTC

Undeclared Prefix error?

Hi,

I'm using Axis and WSS4j to build a secure web service (using Orion as the
container). I'm running into the following problem - while trying to call
from a Java Axis client, I get the following exception on the server:

WSDoAllReceiver: cannot convert into document; nested exception is:
	org.xml.sax.SAXException: Error: URI=null Line=32: Undeclared prefix:
"wsu:Id".
	at
org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:115)
	at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
	at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
	at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:208)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:306)
	at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:333)
	at com.evermind._csb._pvd(Unknown Source)
	at com.evermind._csb._boc(Unknown Source)
	at com.evermind._ax._lsc(Unknown Source)
	at com.evermind._ax._uab(Unknown Source)
	at com.evermind._bf.run(Unknown Source)
Caused by: org.xml.sax.SAXException: Error: URI=null Line=32: Undeclared
prefix: "wsu:Id".
	at
org.apache.axis.utils.XMLUtils$ParserErrorHandler.error(XMLUtils.java:718)
	at org.apache.crimson.parser.Parser2.error(Parser2.java:3018)
	at org.apache.crimson.parser.Parser2.processName(Parser2.java:1581)
	at org.apache.crimson.parser.Parser2.processAttributeNS(Parser2.java:1553)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1410)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
	at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
	at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
	at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
	at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
	at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
	at
org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:179)
	at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
	at
org.apache.axis.message.MessageElement.getAsDocument(MessageElement.java:1082)
	at
org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:108)

Based on the SOAP request trace (will attach on request), this looks to be
down to one of two elements in the request:

<wsse:SecurityTokenReference wsu:Id="STRId-12767107"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

or

<soapenv:Body wsu:Id="id-4918203"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

Does anyone have any suggestions on how to resolve this issue? I'm
guessing more information is required, and I'll be happy to provide it on
request - I just didn't want to flood the list with every detail of my
application on first post ;)

Cheers,

steve





-- 
Steve Barham                       tel: +44 (0)7973 199 471
Systems Engineer
Formicary - delivering quality financial technology solutions
http://www.formicary.net/