axis && sap web service SOAPFaultBuilder error

ERROR INFO:
The above snippet of code is _unpatched_ in Axis version 1.4 and it causes the same problems as mentioned above.
Specifically:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
faultActor:
faultNode:
faultDetail:

REFRENCE INFO:
http://issues.apache.org/jira/browse/AXIS-2394?subTaskView=unresolved
SOLUTION:

org.apache.axis.messageSOAPFaultBuilder.onEndChild()

public void onEndChild(String namespace, String localName,
                           DeserializationContext context)
            throws SAXException {
        if (Constants.ELEM_FAULT_DETAIL.equals(localName)) {
            MessageElement el = context.getCurElement();
            List children = el.getChildren();
            if (children != null) {
                Element [] elements = new Element [children.size()];
                for (int i = 0; i < elements.length; i++) {
                    try {
                        Node node = (Node) children.get(i);
                        if (node instanceof MessageElement) {
                            elements[i] = ((MessageElement) node).getAsDOM();
                        } else if(node instanceof Text){
                        	/*Document tempDoc = XMLUtils.newDocument(); 
                            elements[i] = tempDoc.createElement("text"); 
                            elements[i].appendChild(tempDoc.importNode(node,true)); */
                            
                            elements[i] = XMLUtils.newDocument().createElement("text"); 
                            Node node2 = elements[i].getOwnerDocument().importNode(node, true);     // line added 
                            elements[i].appendChild(node2); 
                        }
                    } catch (Exception e) {
                        throw new SAXException(e);
                    }
                }
                faultDetails = elements;
            }
        }


OK

THROW NEW EXCEPTION:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode:
faultString: XML kernel processor cannot prepare function call
REASON:
REFERENCE INFO:http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d041e74911d6b2e400508b6b8a93/content.htm ---> "Step 3: Existence and Activation of the Web Service Implementation (function module)"

你可能感兴趣的:(apache,Web,xml,SOAP)