Alek,
Thanks for prompt reply.
1. I will put the Apache ASP v2 license in all the files.
2. I am testing the code only against Apache SOAP, and WSIF (Both Latest
Version downloaded src and compiled, I used binaries at the first stage).
Code examples provided with Apache SOAP are all working well (They contains
ArrayList, Collection, List ... examples). My Code work fine with Vector,
Map, HashMap. It does not work for methods with parameters containing
Collection, ArrayList etc.
2.1 First of all, if Mapping (as explained in 2.1.1) is not defined in the
client java src code, we get the client side error: Method not defined in
the portType:
Run(SOAPPort) caught exception
java.lang.reflect.UndeclaredThrowableException
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.setUserClassType(Unknown Source)
at lg.ws.demo.client.Run.doit(Run.java:185)
at lg.ws.demo.client.Run.main(Run.java:104)
Caused by: org.apache.wsif.WSIFException: Method setUserClassType(interface
java.util.Map, class java.util.Hashtable, class java.util.HashMap, class
lg.ws.demo.components.SimpleCLass, class java.util.Vector) was not found in
portType
{http://lg/ws/demo/service/SimpleIsBeautifulService.wsdl}SimpleIsBeautifulSe
rvicePortType
at
org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(WSIFClientProxy.j
ava:562)
at
org.apache.wsif.base.WSIFClientProxy.invoke(WSIFClientProxy.java:205)
... 3 more
2.1.1 I need to put the following code to get ride of the Method not defined
in the port. It seems to me I am doing something wrong here. I should not do
it as I am not doing it for Vector and Map etc.
service.mapType(
new javax.xml.namespace.QName(
"http://xml.apache.org/xml-soap",
"Collection"),
Class.forName("java.util.Collection"));
2.2 Somehow or the other If I do 2.1.1. I am getting Second error:
<faultstring>array element type mismatch</faultstring> in the envelope
received from the server as follows:
Run(SOAPPort) caught exception
java.lang.reflect.UndeclaredThrowableException
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.setUserClassType(Unknown Source)
at lg.ws.demo.client.Run.doit(Run.java:201)
at lg.ws.demo.client.Run.main(Run.java:104)
Caused by: org.apache.wsif.WSIFException: Operation failed but returned
fault message contained no part
at
org.apache.wsif.base.WSIFClientProxy.invoke(WSIFClientProxy.java:292)
... 3 more
3. I tracked the message using TCP Tunnel and Send Message to the server is:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:set
UserClassType
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="SimpleIsBeautifulService"><ns1:Map href="#id0"/><ns1:p_Hashtable
href="#id1"/><ns1:HashMap href="#id2"/><ns1:p_SimpleCLass
href="#id3"/><ns1:p_Vector href="#id4"/><ns1:Collection
href="#id5"/></ns1:setUserClassType><multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Map" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://xml.apache.org/xml-soap"><item><key
xsi:type="soapenc:string">name</key><value xsi:type="soapenc:string">My name
Is SimpleIsBeautifulService</value></item><item><key
xsi:type="soapenc:string">dateOfBirth</key><value
xsi:type="soapenc:string">2006/09/09</value></item><item><key
xsi:type="soapenc:string">gender</key><value
xsi:type="soapenc:string">uummm..IdontKnowYet</value></item><item><key
xsi:type="soapenc:string">personId</key><value
xsi:type="soapenc:string">p_MapTypeId</value></item></multiRef><multiRef
id="id5" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
soapenc:arrayType="ns3:Collection[2]" xsi:type="soapenc:Array"
xmlns:ns3="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><multiRef
xsi:type="xsd:string">Lachhman</multiRef><multiRef
xsi:type="xsd:string">Dass</multiRef></multiRef><multiRef id="id3"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns4:simpleCLass" xmlns:ns4="http://schemaless.bean.classes/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><name
xsi:type="soapenc:string">SimpleCLassMyname</name><password
xsi:type="soapenc:string">SimpleCLassnewpassword</password></multiRef><multi
Ref id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns5:Map" xmlns:ns5="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key
xsi:type="soapenc:string">gender</key><value
xsi:type="soapenc:string">uummm..IdontKnowYet</value></item><item><key
xsi:type="soapenc:string">dateOfBirth</key><value
xsi:type="soapenc:string">2006/09/09</value></item><item><key
xsi:type="soapenc:string">personId</key><value
xsi:type="soapenc:string">p_MapTypeId</value></item><item><key
xsi:type="soapenc:string">name</key><value xsi:type="soapenc:string">My name
Is SimpleIsBeautifulService</value></item></multiRef><multiRef id="id4"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns6:Vector" xmlns:ns6="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item
xsi:type="soapenc:string">Lachhman</item><item
xsi:type="soapenc:string">Alak</item><item
xsi:type="soapenc:string">Wsif</item><item
xsi:type="soapenc:string">You</item><item
xsi:type="soapenc:string">Me</item></multiRef><multiRef id="id2"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns7:Map" xmlns:ns7="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key
xsi:type="soapenc:string">User</key><value
xsi:type="soapenc:string">Lachhman
Dass</value></item></multiRef></soapenv:Body></soapenv:Envelope>
3.1 And server side envelop is:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>array element type mismatch</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks,
Lachhman Dass
-----Original Message-----
From: Aleksander Slominski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 06, 2006 9:05 PM
To: [email protected]
Subject: Re: Contribution of code
Lachhman Dass wrote:
> Hi,
>
> I have created some examples for WSIF, These are to demonstrate WSIF using
> of a simple bean class, Map, Vector and Hashtable etc. I also want to add
> some more types to this list.
hi,
if you want it to be added to WSIF it will need to have Apache ASF v2
license not
* Copyright 2006 , Inc. All rights reserved.
* PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
> The problem comes when the stuff is not
> working for some types and the main problem comes for encoding. I dont
know
> the in and outs of WSIF, and hence is this problem. Is anyone can add say
> ArrayList and make the code working?
>
i am not sure what is exactly the problem: does it work for
Vector/Hashtable and Map? what errors do you get for ArrayList - can it
not be converted to Vector? does ArrayList work with AXIS or Apache SOAP
- WSIF is using them to do actual mapping/ser/deser?
best,
alek
> I also noticed that stuff only works with latest soap and wsif.
>
> After compiling all the class we can deploy the service as:
>
> java org.apache.soap.server.ServiceManagerClient
> http://localhost:8080/soap/servlet/rpcrouter deploy
> lg\ws\demo\service\DeploymentDescriptor.xml
>
> And to run the example:
>
> java lg.ws.demo.client.Run lg\ws\demo\service\WorkRosterService.wsdl
>
>
> Before run make sure:
"META-INF/services/org.apache.wsif.spi.WSIFProvider"
> as part of your classpath.
>
>
> Thanks,
>
> Lachhman Dass
> <<lg.zip>>
>
>
****************************************************************************
*
> **
**
> ** WARNING: This email contains an attachment of a very suspicious type.
**
> ** You are urged NOT to open this attachment unless you are absolutely
**
> ** sure it is legitimate. Opening this attachment may cause irreparable
**
> ** damage to your computer and your files. If you have any questions
**
> ** about the validity of this message, PLEASE SEEK HELP BEFORE OPENING IT.
**
> **
**
> ** This warning was added by the IU Computer Science Dept. mail scanner.
**
>
****************************************************************************
*
>
>
--
The best way to predict the future is to invent it - Alan Kay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]