java - Does Apache CXF library work on a WAS CE server? -
i using cxf me call web services. able code run locally, when deploy war having issues. after looking through logs believe ce uses axis2 web service engine. causing issues? cxf library not work on ce servers?
edit: here code. issue seems x509 authentication. have been able call different web service requires basic preemptive authentication without problem.
url wsdlurl = new url(endpoint); /*wsorganization ss = new wsorganization(wsdlurl, service_name); port = ss.getwsorganizationsoap();*/ jaxwsproxyfactorybean factory = new jaxwsproxyfactorybean(); factory.setaddress(endpoint); factory.setserviceclass(wssoap.class); port = (wssoap) factory.create(); client client = clientproxy.getclient(port); endpoint cxfendpoint = client.getendpoint(); map<string,object> outprops = new hashmap<string,object>(); wss4joutinterceptor wssout = new wss4joutinterceptor(outprops); outprops.put(wshandlerconstants.action, "signature"); outprops.put(wshandlerconstants.user, "alias"); outprops.put(wshandlerconstants.sig_key_id, "directreference"); outprops.put(wshandlerconstants.pw_callback_class, pwdcallbackhandler.class.getname()); outprops.put(wshandlerconstants.sig_prop_file, "crypto.properties"); cxfendpoint.getoutinterceptors().add(wssout);
logs gving me error:
javax.xml.ws.soap.soapfaultexception: hierarchy_request_err: attempt made insert node not permitted. @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:156) @ $proxy96.findcode(unknown source) ... 6 more caused by: org.w3c.dom.domexception: hierarchy_request_err: attempt made insert node not permitted. @ org.w3c.dom.domexception.<init>(unknown source) @ org.apache.axiom.om.impl.dom.parentnode.insertbefore(parentnode.java:164) @ org.apache.axiom.om.impl.dom.nodeimpl.appendchild(nodeimpl.java:238) @ org.apache.axis2.saaj.soappartimpl.appendchild(soappartimpl.java:986) @ org.apache.cxf.staxutils.w3cdomstreamwriter.setchild(w3cdomstreamwriter.java:114) @ org.apache.cxf.staxutils.w3cdomstreamwriter.newchild(w3cdomstreamwriter.java:104) @ org.apache.cxf.staxutils.w3cdomstreamwriter.writestartelement(w3cdomstreamwriter.java:132) @ org.apache.cxf.binding.soap.interceptor.soapoutinterceptor.writesoapenvelopestart(soapoutinterceptor.java:122) @ org.apache.cxf.binding.soap.interceptor.soapoutinterceptor.handlemessage(soapoutinterceptor.java:81) @ org.apache.cxf.binding.soap.interceptor.soapoutinterceptor.handlemessage(soapoutinterceptor.java:61) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:263) @ org.apache.cxf.endpoint.clientimpl.doinvoke(clientimpl.java:519) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:449) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:352) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:304) @ org.apache.cxf.frontend.clientproxy.invokesync(clientproxy.java:88) @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:134) ... 7 more
Comments
Post a Comment