Problems with Jboss ESB SOAP client
skumarraju May 12, 2011 4:54 AMHi Guys,
I'm desperately looking for the working solution on using the SOAPClient for consuming a webservice over ssl+basic authentication enabled.
trying trying ......a lot, but no luck till now.
would appreciate if someone can guide me in the right direction.
surprisingly, if the wsdl is loaded prior making soap call over ssl+ basic authentication, then soap calls are going fine.
1. configure a wsdl over simple http(no authentication)
2. call the soapclient process method - Success
3.configure the same wsdl(step-1) in ssl+basic authentication
4.call the soapclient process method - Success
5. Restart the JBoss - Success
6.call the soapclient process method - Failed
ConfigTree newCT = ConfigTree.fromXml(ConfigTreefromXml, "UTF-8");
newCT.setName("config");
ConfigTreefromXml is as follows
<?xml version="1.0"encoding="UTF-8"?>
<config EndPointName="UserMgmtIfcPort"SOAPAction="addSubscriberAccountXML"
endpointUrl="https://10.18.67.45:8443/NPM_API-6.1.5.4/user_mgmt?WSDL"
get-payload-location="RequestLocation" password="npmadmin"username="npmadmin"
wsdl="https://10.18.67.45:8443/NPM_API-6.1.5.4/user_mgmt?WSDL">
<property name="wsdl"
value="https://10.18.67.45:8443/NPM_API-6.1.5.4/user_mgmt?WSDL"/>
<property name="SOAPAction"value="addSubscriberAccountXML" />
<property name="get-payload-location" value="RequestLocation"/>
<property name="endpointUrl"
value="https://10.18.67.45:8443/NPM_API-6.1.5.4/user_mgmt?WSDL"/>
<property name="EndPointName" value="UserMgmtIfcPort"/>
<http-client-property name="file"
value="/META-INF/httpclient-8443.properties" />
<property name="http-client-properties">
<http-client-property name="configurators"
value="HttpsProtocol,AuthBASIC" />
<http-client-property name="http.proxyHost"
value="10.18.67.45" />
<http-client-property name="http.proxyPort"
value="8443" />
<http-client-property name="auth-username" value="npmadmin"/>
<http-client-property name="auth-password"value="npmadmin" />
<http-client-property name="username" value="npmadmin"/>
<http-client-property name="password" value="npmadmin"/>
<http-client-property name="authscope-host"
value="10.18.67.45" />
<http-client-property name="authscope-port"
value="8443" />
<http-client-property name="authscope-realm"
value="Example API authentication area" />
</property>
</config>
error-2
2011-05-09 14:08:23,982 ERROR [com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext] (Thread-337) Loading of definition failed for [https://npmadmin:npmadmin@10.18.67.45:8443/NPM_API-6.1.5.4/user_mgmt?WSDL]; org.apache.xmlbeans.XmlException: error: </body> does not close tag <HR>.
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) org.apache.xmlbeans.XmlException: error: </body> does not close tag <HR>.
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3467)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:721)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:62)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:412)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:403)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.cacheWsdl(WsdlLoader.java:116)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.impl.wsdl.WsdlInterface.cacheDefinition(WsdlInterface.java:291)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext$Loader.construct(WsdlContext.java:200)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:45)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:111)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at java.lang.Thread.run(Thread.java:619)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) Caused by: org.xml.sax.SAXParseException: </body> does not close tag <HR>.
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3435)
2011-05-09 14:08:23,982 ERROR [STDERR] (Thread-337) ... 13 more
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) org.apache.xmlbeans.XmlException: error: </body> does not close tag <HR>.
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3467)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:721)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:62)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:412)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:403)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.cacheWsdl(WsdlLoader.java:116)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.WsdlInterface.cacheDefinition(WsdlInterface.java:291)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext$Loader.construct(WsdlContext.java:200)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:45)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:111)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at java.lang.Thread.run(Thread.java:619)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) Caused by: org.xml.sax.SAXParseException: </body> does not close tag <HR>.
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3435)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) ... 13 more
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) java.lang.NullPointerException
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.WsdlRequest.setRequestContent(WsdlRequest.java:280)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.WsdlProject.importWsdl(WsdlProject.java:439)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.eviware.soapui.impl.wsdl.WsdlProject.importWsdl(WsdlProject.java:402)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.services.soapui.SoapUIClientService.getWsdlInterfaces(SoapUIClientService.java:414)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.services.soapui.SoapUIClientService.getOperation(SoapUIClientService.java:429)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.services.soapui.SoapUIClientService.buildRequest(SoapUIClientService.java:327)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at java.lang.reflect.Method.invoke(Method.java:597)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.actions.soap.MBeanSoapUIInvoker.buildRequest(MBeanSoapUIInvoker.java:73)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:425)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.mot.sag.adapter.iscdhcp.ISCDHCPAdd.sendMsg(ISCDHCPAdd.java:166)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.mot.sag.adapter.iscdhcp.ISCDHCPAdd.doSOAPRequest1(ISCDHCPAdd.java:94)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at com.mot.sag.adapter.iscdhcp.ISCDHCPAdd.process(ISCDHCPAdd.java:74)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:634)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:588)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:419)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:540)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
2011-05-09 14:08:23,982 ERROR [STDERR] (pool-44-thread-1) at java.lang.Thread.run(Thread.java:619)
Server log is as follows:
2011-05-09 14:08:23,872 DEBUG [org.apache.commons.httpclient.HttpMethodDirector] (Thread-338) Authentication scope: BASIC 'Example API authentication area'@10.18.67.45:8443
2011-05-09 14:08:23,872 TRACE [org.apache.commons.httpclient.HttpState] (Thread-338) enter HttpState.getCredentials(AuthScope)
2011-05-09 14:08:23,872 DEBUG [org.apache.commons.httpclient.HttpMethodDirector] (Thread-338) Credentials required
2011-05-09 14:08:23,872 ERROR [org.apache.commons.httpclient.HttpMethodDirector] (Thread-338)
java.lang.NullPointerException
at com.eviware.x.form.XFormFactory.createDialogBuilder(XFormFactory.java:19)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentialsProvider.buildBasicDialog(UrlWsdlLoader.java:253)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentialsProvider.getCredentials(UrlWsdlLoader.java:223)
at org.apache.commons.httpclient.HttpMethodDirector.promptForCredentials(HttpMethodDirector.java:864)
at org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChallenge(HttpMethodDirector.java:727)
at org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationResponse(HttpMethodDirector.java:663)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:192)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$LoaderWorker.construct(UrlWsdlLoader.java:147)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:111)
at java.lang.Thread.run(Thread.java:619)
SOAP response being received:
2011-05-09 14:09:16,377 ERROR [com.mot.sag.adapter.iscdhcp.ISCDHCPAdd] (pool-54-thread-1) SOAP Response of soapClient :soapUI Client Se
rvice invocation failed.
org.jboss.soa.esb.actions.ActionProcessingException: soapUI Client Service invocation failed.
at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:428)
at com.mot.sag.adapter.iscdhcp.ISCDHCPAdd.sendMsg(ISCDHCPAdd.java:166)
at com.mot.sag.adapter.iscdhcp.ISCDHCPAdd.doSOAPRequest1(ISCDHCPAdd.java:94)
at com.mot.sag.adapter.iscdhcp.ISCDHCPAdd.process(ISCDHCPAdd.java:74)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:634)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:588)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:419)
at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:540)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Failed to deserialize the SOAP message template
at org.jboss.soa.esb.services.soapui.SoapUIClientService.getDocument(SoapUIClientService.java:503)
at org.jboss.soa.esb.services.soapui.SoapUIClientService.buildSOAPMessage(SoapUIClientService.java:455)
at org.jboss.soa.esb.services.soapui.SoapUIClientService.buildRequest(SoapUIClientService.java:330)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.soa.esb.actions.soap.MBeanSoapUIInvoker.buildRequest(MBeanSoapUIInvoker.java:73)
at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:425)
... 10 more
Caused by: java.lang.NullPointerException
at java.io.StringReader.<init>(StringReader.java:33)
at org.jboss.soa.esb.services.soapui.SoapUIClientService.getDocument(SoapUIClientService.java:500)
Regards,
-Shravan
-
server.log.zip 128.5 KB
-
soaptests.esb.zip 8.4 KB
-
serverandbootlog.zip 159.1 KB