-
1. Re: TypeMapping problem
thomas.diesler Sep 14, 2004 4:47 PM (in response to gerhardo)For completeness: where is your type mapping from ws4ee-deployment.xml ?
LOL -
2. Re: TypeMapping problem
gerhardo Sep 15, 2004 7:02 AM (in response to gerhardo)Sorry, sometimes cut and paste is quite difficult.
So here is my ws4ee-deployment.xml:
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:soap="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:lvsns="http://lvsws.emediapark.de">
With this deployment info the warning about missing class information for ArrayOfLVSDoSupplier is found in the server log.
After some search on the internet i found an example to specify the
missing array class for LVSDoSupplier[]; I added this type mapping:
... and the warning didn't come up again.
So evrything is working now. Even my problem with different results on the clients (NT,2000,XP - see my fist posting) is resolved. It turned out to be caused by mixing different pocketSOAP Versions.
TIA Gerhard -
3. Re: TypeMapping problem
gerhardo Sep 15, 2004 7:12 AM (in response to gerhardo)... I'm pulling my hair out, where is my deployment info.
Once again:... <typeMapping qname="lvsns:LVSDoSupplier" type="java:de.emediapark.lvsws.LVSDoSupplier" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> <typeMapping qname="lvsns:ArrayOfLVSDoSupplier" type="java:de.emediapark.lvsws.LVSDoSupplier[]" serializer="org.apache.axis.encoding.ser.ArraySerializerFactory" deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> ...
Sorry for wasting bandwidth.
Gerhard -
4. Re: TypeMapping problem
thomas.diesler Sep 15, 2004 5:23 PM (in response to gerhardo)Beware that you are violating the BasicProfile R1006 when you are using rpc/encoded. Stick to literal encoding.
-
5. Re: TypeMapping problem
manica Sep 17, 2004 9:57 AM (in response to gerhardo)I'm still having trouble with a very similar problem. I'm using an array as an input, rather than a return value. I followed the type mapping described above and now I'm getting a "No deserializer defined for array type InventoryUpdate". I'm confused because I have both the InventoryUpdate type and the ArrayOfInventoryUpdate mapped to a BeanDeserializer and an ArrayDeserializer respectively.
Here is the debug output from the server.log:
2004-09-17 07:31:39,080 DEBUG [org.jboss.webservice.EngineConfigurationFinder] Found config at: file:/home/nfs/darin/dev/ehr/jboss-4.0.0RC2/server/default/deploy/jboss-ws4ee.sar/META-INF/axis-client-config.xml
2004-09-17 07:31:39,486 DEBUG [org.jboss.webservice.deployment.ServiceDescription] Merging with ws4ee deployment meta data: jar:file:/home/nfs/darin/dev/ehr/deploy/ehr.ear/test.war!/WEB-INF/ws4ee-deployment.xml
2004-09-17 07:31:39,490 DEBUG [org.jboss.webservice.deployment.ServiceDescription] Addinging typeMapping: {http://inventorycontrol.ejb.ehr.com}InventoryUpdate
2004-09-17 07:31:39,490 DEBUG [org.jboss.webservice.deployment.ServiceDescription] Replacing typeMapping: {http://inventorycontrol.ejb.ehr.com}ArrayOfInventoryUpdate
2004-09-17 07:31:39,491 DEBUG [org.jboss.webservice.client.ServiceImpl] initService: port=null
2004-09-17 07:31:39,491 DEBUG [org.jboss.webservice.client.ServiceImpl] Service configuration:
<operation name='submit' qname='ns1:submit' returnQName='submitReturn' returnType='xsd:string' xmlns:ns1='http://inventorycontrol.ejb.ehr.com' >
<parameter name='in0' qname='in0' mode='IN' type='ns1:ArrayOfInventoryUpdate' xmlns:ns1='http://inventorycontrol.ejb.ehr.com' />
</operation>
<typeMapping
qname='ns1:InventoryUpdate' xmlns:ns1='http://inventorycontrol.ejb.ehr.com'
type='java:com.ehr.ejb.inventorycontrol.InventoryUpdate'
serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
encodingStyle=''>
</typeMapping>
<typeMapping
qname='ns1:ArrayOfInventoryUpdate' xmlns:ns1='http://inventorycontrol.ejb.ehr.com'
type='java:com.ehr.ejb.inventorycontrol.InventoryUpdate[]'
serializer='org.apache.axis.encoding.ser.ArraySerializerFactory'
deserializer='org.apache.axis.encoding.ser.ArrayDeserializerFactory'
encodingStyle=''>
</typeMapping>
2004-09-17 07:31:39,500 DEBUG [org.jboss.webservice.client.ServiceImpl] Register type mapping [qname={http://inventorycontrol.ejb.ehr.com}InventoryUpdate,class=com.ehr.ejb.inventorycontrol.InventoryUpdate]
2004-09-17 07:31:39,501 DEBUG [org.jboss.webservice.client.ServiceImpl] Register type mapping [qname={http://inventorycontrol.ejb.ehr.com}ArrayOfInventoryUpdate,class=com.ehr.ejb.inventorycontrol.InventoryUpdate[]]
2004-09-17 07:31:39,516 DEBUG [org.jboss.webservice.client.ServiceProxy] Invoke on jaxrpc service: getPort [interface com.ehr.ejb.inventorycontrol.InventoryControlEndpoint]
2004-09-17 07:31:39,609 DEBUG [org.jboss.webservice.client.PortProxy] Invoke on service endpoint interface: submit [[Lcom.ehr.ejb.inventorycontrol.InventoryUpdate;@fde7ba]
2004-09-17 07:31:39,621 DEBUG [org.jboss.webservice.client.CallImpl] Fixing use: [was=encoded,is=literal]
2004-09-17 07:31:39,911 DEBUG [org.jboss.webservice.client.ClientEngine] invoke: org.apache.axis.MessageContext@5b84b
2004-09-17 07:31:39,918 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Create a handler chain for roles: null
2004-09-17 07:31:39,918 DEBUG [org.jboss.webservice.client.ClientEngine] Using handler chain for port: InventoryControlEndpoint
2004-09-17 07:31:39,918 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Create a handler chain for roles: null
2004-09-17 07:31:39,918 DEBUG [org.jboss.webservice.client.ClientEngine] Using empty handler chain
2004-09-17 07:31:39,918 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] init: [config=null]
2004-09-17 07:31:39,951 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Enter: doHandleRequest
2004-09-17 07:31:39,951 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Exit: doHandleRequest with status: true
2004-09-17 07:31:40,589 DEBUG [org.jboss.web.tomcat.security.SecurityAssociationValve] Failed to determine servlet
java.lang.NullPointerException
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:115)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:122)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
2004-09-17 07:31:40,682 DEBUG [org.jboss.webservice.server.InvokerProvider] initServiceDesc: service=InventoryControlService
2004-09-17 07:31:40,686 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Create a handler chain for roles: []
2004-09-17 07:31:40,686 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] init: [config=null]
2004-09-17 07:31:40,736 DEBUG [org.jboss.webservice.server.ServerEngine] invoke: org.apache.axis.MessageContext@11d221e
2004-09-17 07:31:40,736 DEBUG [org.jboss.webservice.server.ServerEngine] TransportHandler: http
2004-09-17 07:31:40,777 DEBUG [org.jboss.webservice.server.InvokerProviderEJB] makeNewServiceObject: class=com.ehr.ejb.inventorycontrol.InventoryControlEndpoint
2004-09-17 07:31:40,801 ERROR [org.apache.axis.providers.java.RPCInvocation] org.xml.sax.SAXException: No deserializer defined for array type InventoryUpdate
org.xml.sax.SAXException: No deserializer defined for array type InventoryUpdate
at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:332)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:468)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1202)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
at org.apache.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1409)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:263)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:397)
at org.apache.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope(RPCInvocation.java:232)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:104)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:360)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:162)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:125)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:557)
at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:202)
at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:91)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:971)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:372)
... -
6. Re: TypeMapping problem
lafr Sep 17, 2004 4:45 PM (in response to gerhardo)I guess your typemapping is not correct. To get sure, I would have to see the wsdl-file.
I guess ArrayOf... is not an array, it conatins an array of types.
The only way we found to get this working was, to create a class for that ArrayOf.. type.
For ArrayOf... you need the BeanSerializer/BeanDeserializer then. -
7. Re: TypeMapping problem
thomas.diesler Sep 20, 2004 4:43 AM (in response to gerhardo)The Axis ArraySerializer is strictly for rpc/encoded only. If you have arrays with literal encoding, you should wrap them with a pojo.
class ArrayWrapper { private <Type> array; public <Type> getArray() {...} public void setArray(<Type> arrValues) {} }
-
8. Re: TypeMapping problem
manica Sep 21, 2004 12:54 PM (in response to gerhardo)Thank you! This is now working perfectly
Darin