Hi there...

I think this is my ... message concerning the same error : Prefix cannot be 
null when creating QName, and no answer from your side. After debugging the 
code I found that this exception is thrown in the XFire ReadHeadersHandler 
class and exactly in the method invoke:

public void invoke(MessageContext context)

throws Exception

{

InMessage message = context.getInMessage();

----

switch (event)

{

case XMLStreamReader.START_DOCUMENT:

String encoding = reader.getCharacterEncodingScheme();

message.setEncoding(encoding);

break;

case XMLStreamReader.END_DOCUMENT:

end = true;

return;

case XMLStreamReader.END_ELEMENT:

break;

case XMLStreamReader.START_ELEMENT:

if (reader.getLocalName().equals("Header"))

{

readHeaders(context,namespaces);

}

else if (reader.getLocalName().equals("Body"))

{

readNamespaces(reader, namespaces);


event = reader.nextTag();


checkForFault(context, message, reader);


return;

}

else if (reader.getLocalName().equals("Envelope"))

{

readNamespaces(reader, namespaces);


message.setSoapVersion(reader.getNamespaceURI());


if (message.getSoapVersion() == null)

{

---



When I got in the first time, i got forwarded in the switch loop to Envelope 
part, the second time i got the BODY part and inside it, the call for the method

private void readNamespaces(XMLStreamReader reader, Map namespaces){

for (int i = 0; i < reader.getNamespaceCount(); i++){

String prefix = reader.getNamespacePrefix(i);

if (prefix == null) prefix = "";


namespaces.put(prefix,

reader.getNamespaceURI(i));

}

}

 the reader.getNamesapceCount() returns 0, the returning to the switch loop, we 
check forFault, which throw the Exception.

Now does anyone knows what this exception is related to, and what do i have to 
see in the body part of the of the received message.



Please any idea will be appreciated

Thank you

Reply via email to