axis && sap web service SOAPFaultBuilder error

[color=red]ERROR INFO:[/color]
[table]
|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: |
[/table]
[color=darkred]REFRENCE INFO:[/color]
http://issues.apache.org/jira/browse/AXIS-2394?subTaskView=unresolved
[color=red]SOLUTION:[/color]

[color=green]org.apache.axis.messageSOAPFaultBuilder.onEndChild() [/color]

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;
}
}


[color=darkred]OK[/color]

[color=darkred]THROW NEW EXCEPTION:[/color]
[table]
|AxisFault
|
| faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode:
|
| faultString: XML kernel processor cannot prepare function call|
[/table][color=darkred]REASON:[/color]
[color=darkred] REFERENCE INFO:[/color]http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d041e74911d6b2e400508b6b8a93/content.htm ---> "Step 3: Existence and Activation of the Web Service Implementation (function module)"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值