I am still struggling try to figure out what type mappings I need in order to
get my dynamic client to work. I have a couple of parameters in my service
that take String[] and I get a NullPointerException when XFire (default aegis
binding) tries to format the request message on the first instance of String[].
The schema type ends up with the default ObjectType and the typeCreator is
null, which leads to the NPE below.
I have added the following lines to my client code but to no avail.
reg = new DefaultTypeMappingRegistry(true);
mapping = reg.createTypeMapping(true);
mapping.register(String[].class, new QName(QNAME, "ArrayOfString"), new
ArrayType());
and then called
boolean registered = mapping.isRegistered(String[].class);
and got a true back.
0 [main] DEBUG org.codehaus.xfire.transport.DefaultTransportManager -
Registered transport [EMAIL PROTECTED]
16 [main] DEBUG org.codehaus.xfire.transport.DefaultTransportManager -
Registered transport [EMAIL PROTECTED]
16 [main] DEBUG org.codehaus.xfire.transport.DefaultTransportManager -
Registered transport [EMAIL PROTECTED]
16 [main] DEBUG org.codehaus.xfire.transport.DefaultTransportManager -
Registered transport [EMAIL PROTECTED]
8825 [main] DEBUG org.codehaus.xfire.transport.http.HttpTransport - Creating
new channel for uri: urn:xfire:transport:http:11873664256620-1435091684
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler
[EMAIL PROTECTED] to phase send
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler
[EMAIL PROTECTED] to phase transport
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler
[EMAIL PROTECTED] to phase post-invoke
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase
post-invoke
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler
org.codehaus.xfire.soap.handler.SoapSerializerHandler in phase post-invoke
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase
policy
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase
user
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase
transport
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler
org.codehaus.xfire.soap.handler.SoapActionOutHandler in phase transport
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase
send
8856 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler
org.codehaus.xfire.handler.OutMessageSender in phase send
8918 [main] DEBUG org.apache.commons.httpclient.HttpClient - Java version:
1.4.2_13
8918 [main] DEBUG org.apache.commons.httpclient.HttpClient - Java vendor: Sun
Microsystems Inc.
8918 [main] DEBUG org.apache.commons.httpclient.HttpClient - Java class path:
C:\PPOSDevelopment\7.5\Libraries\XFire\commons-httpclient-3.0.jar;C:\PPOSDevelopment\7.5\Frameworks\build\classes;C:\PPOSDevelopment\7.5\Frameworks\Infrastructure\Base\build\infrastructurebase.jar;C:\PPOSDevelopment\7.5\Frameworks\Common\Base\build\commonbase.jar;C:\PPOSDevelopment\7.5\Frameworks\Common\Base\build\commonbasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\Common\Client\build\commonclient.jar;C:\PPOSDevelopment\7.5\Frameworks\Common\Client\build\commonclienti18n.jar;C:\PPOSDevelopment\7.5\Frameworks\Common\ImportMerchandiseMDB\build\pposimportmerchandisemdb.jar;C:\PPOSDevelopment\7.5\Frameworks\Common\Server\build\commonserver.jar;C:\PPOSDevelopment\7.5\Frameworks\HostCommon\Base\build\hostcommonbase.jar;C:\PPOSDevelopment\7.5\Frameworks\HostCommon\Base\build\hostcommonbasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\HostCommon\Server\build\hostcommonserver.jar;C:\PPOSDevelopment\7.5\Frameworks\HostExport\Base\build\hostexportbase.jar;C:\PPOSDevelopment\7.5\Frameworks\HostExport\Base\build\hostexportbasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\HostExport\CustomerMDB\build\hostexportcustomermdb.jar;C:\PPOSDevelopment\7.5\Frameworks\HostExport\Server\build\hostexportserver.jar;C:\PPOSDevelopment\7.5\Frameworks\HostImport\Base\build\hostimportbase.jar;C:\PPOSDevelopment\7.5\Frameworks\HostImport\Base\build\hostimportbasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\HostImport\Server\build\hostimportserver.jar;C:\PPOSDevelopment\7.5\Frameworks\Infrastructure\Base\build\infrastructurebasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\Infrastructure\Client\build\infrastructureclient.jar;C:\PPOSDevelopment\7.5\Frameworks\Infrastructure\Client\build\infrastructureclienti18n.jar;C:\PPOSDevelopment\7.5\Frameworks\Infrastructure\Server\build\infrastructureserver.jar;C:\PPOSDevelopment\7.5\Frameworks\Infrastructure\Startup\build\infrastructurestartup.jar;C:\PPOSDevelopment\7.5\Frameworks\Product\Base\build\productbase.jar;C:\PPOSDevelopment\7.5\Frameworks\Product\Base\build\productbasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\Product\Server\build\productserver.jar;C:\PPOSDevelopment\7.5\Frameworks\Test\Base\build\testbase.jar;C:\PPOSDevelopment\7.5\Frameworks\Test\Base\build\testbasei18n.jar;C:\PPOSDevelopment\7.5\Frameworks\Test\build\test.jar;C:\PPOSDevelopment\7.5\Frameworks\Test\build\testi18n.jar;C:\PPOSDevelopment\7.5\Libraries\Calendar\jcalendar.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\CorbaIDL.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\MetafileRenderer.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OB405.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBBiDir.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBEvent.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBIMR.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBNaming.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBProperty.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBTest.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBTime.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\OBUtil.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\rasapp.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\rascore.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\reportsourcefactory.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\ReportTemplate.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\ReportViewer.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\Serialization.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\webreporting.jar;C:\PPOSDevelopment\7.5\Libraries\Crystal\WebReportWizard.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\c3p0-0.8.3.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\cglib-2.0-rc2.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\commons-collections-2.1.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\commons-dbcp-1.1.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\commons-lang-1.0.1.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\commons-logging-1.0.3.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\commons-pool-1.1.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\concurrent-1.3.2.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\connector.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\dom4j-1.4.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\ehcache-0.6.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\hibernate2.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\jaas.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\jcs-1.0-dev.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\jdbc2_0-stdext.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\jgroups-2.2.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\jta.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\odmg-3.0.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\oscache-2.0.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\proxool-0.8.3.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\swarmcache-1.0rc2.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\xalan-2.4.0.jar;C:\PPOSDevelopment\7.5\Libraries\Hibernate\xml-apis.jar;C:\PPOSDevelopment\7.5\Libraries\J2EE\j2ee.jar;C:\PPOSDevelopment\7.5\Libraries\jacoZoom\izmcomjni.jar;C:\PPOSDevelopment\7.5\Libraries\jacoZoom\WebBrowser2.jar;C:\PPOSDevelopment\7.5\Libraries\Jakarta
Commons\commons-beanutils.jar;C:\PPOSDevelopment\7.5\Libraries\Jakarta
Commons\commons-cli.jar;C:\PPOSDevelopment\7.5\Libraries\JavaHelp\jhall.jar;C:\PPOSDevelopment\7.5\Libraries\JavaWebStart\jh.jar;C:\PPOSDevelopment\7.5\Libraries\JavaWebStart\jnlp.jar;C:\PPOSDevelopment\7.5\Libraries\JavaWebStart\jnlp-servlet.jar;C:\PPOSDevelopment\7.5\Libraries\JavaWebStart\servlet.jar;C:\PPOSDevelopment\7.5\Libraries\JavaWebStart\xalan.jar;C:\PPOSDevelopment\7.5\Libraries\JUnit\junit.jar;C:\PPOSDevelopment\7.5\Libraries\JBoss\jboss.jar;C:\PPOSDevelopment\7.5\Libraries\JBoss\jboss-jmx.jar;C:\PPOSDevelopment\7.5\Libraries\JBoss\jbossall-client.jar;C:\PPOSDevelopment\7.5\Libraries\JBoss\jbossmq.jar;C:\PPOSDevelopment\7.5\Libraries\Log4J\log4j-1.2.8.jar;C:\PPOSDevelopment\7.5\Libraries\systray4j\systray4j.jar;C:\PPOSDevelopment\7.5\Libraries\TableLayout\tablelayout.jar;C:\PPOSDevelopment\7.5\Libraries\Weblogic\weblogic.jar;C:\PPOSDevelopment\7.5\Libraries\Weblogic\wlbase.jar;C:\PPOSDevelopment\7.5\Libraries\Weblogic\wlsqlserver.jar;C:\PPOSDevelopment\7.5\Libraries\Weblogic\wlutil.jar;C:\PPOSDevelopment\7.5\Libraries\XMLBeans\xbean.jar;C:\PPOSDevelopment\7.5\Libraries\JUnit\junitperf.jar;C:\PPOSDevelopment\7.5\Libraries\XML\xerces.jar;C:\PPOSDevelopment\7.5\Libraries\jacoZoom\jacozoomDll.jar;C:\PPOSDevelopment\7.5\Libraries\Security\security.jar;C:\PPOSDevelopment\7.5\Libraries\Oracle\ojdbc14.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\commons-codec-1.3.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\commons-logging-1.0.4.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\jdom-1.0.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\spring-1.2.6.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\wsdl4j-1.6.1.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\xfire-all-1.2.6.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\stax-api-1.0.1.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\stax-utils-20040917.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\xbean-spring-2.8.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\XmlSchema-1.1.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\activation-1.1.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\jaxen-1.1-beta-9.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\qname.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\wstx-asl-3.2.0.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\xbean-2.2.0.jar;C:\eclipse\plugins\org.junit_3.8.1\junit.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\commons-discovery-0.2.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\saaj-api-1.3.jar;C:\PPOSDevelopment\7.5\Libraries\XFire\saaj-impl-1.3.jar;C:\PPOSDevelopment\7.5;/C:/eclipse/plugins/org.eclipse.jdt.junit_3.2.1.r321_v20060810/junitsupport.jar;/C:/eclipse/plugins/org.eclipse.jdt.junit.runtime_3.2.1.r321_v20060721/junitruntime.jar
8918 [main] DEBUG org.apache.commons.httpclient.HttpClient - Operating system
name: Windows XP
8918 [main] DEBUG org.apache.commons.httpclient.HttpClient - Operating system
architecture: x86
8918 [main] DEBUG org.apache.commons.httpclient.HttpClient - Operating system
version: 5.1
8965 [main] DEBUG org.apache.commons.httpclient.HttpClient - SUN 1.42: SUN (DSA
key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509
certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP,
Collection CertStores)
8965 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunJSSE 1.42: Sun
JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories,
SSLv3, TLSv1)
8965 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunRsaSign 1.42:
SUN's provider for RSA signatures
8965 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunJCE 1.42:
SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE,
Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
8965 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunJGSS 1.0: Sun
(Kerberos v5)
8965 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.useragent = Jakarta Commons-HttpClient/3.0
8965 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.version = HTTP/1.1
8965 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection-manager.class = class
org.apache.commons.httpclient.SimpleHttpConnectionManager
8965 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.cookie-policy = rfc2109
8965 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.element-charset = US-ASCII
8965 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.content-charset = ISO-8859-1
8981 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.method.retry-handler = [EMAIL PROTECTED]
8981 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE,
dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z,
EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy
HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE
dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z,
EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
9012 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection-manager.max-per-host = {HostConfiguration[]=6}
9012 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.connection-manager.max-total = 20
9012 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.useragent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
XFire Client +http://xfire.codehaus.org)
9012 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.expect-continue = true
9012 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set
parameter http.protocol.version = HTTP/1.1
org.codehaus.xfire.fault.XFireFault: Fault: java.lang.NullPointerException
org.codehaus.xfire.fault.XFireFault: Fault: java.lang.NullPointerException
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:83)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.Client.invoke(Client.java:368)
at
com.jda.portfolio.infrastructure.server.test.service.security.TestCaseDecryptionWebServicePCOS.testDecrypt(TestCaseDecryptionWebServicePCOS.java:108)
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:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NullPointerException
at
org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:192)
at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:229)
at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
at
org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:90)
at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80)
at
org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)
at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:422)
at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:360)
at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
... 22 more
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE