Hi Ravi,
 
I have also run into "No deserializer for..." exception before, but yours is a little different from mine. After look into your wsdl, I think the problem lies in the "value" element. Your client does not know how to deserialize the returned element                
               <value>
                  <value>one</value>
                  <value>two</value>
               </value>
 
How can you expect Axis understand the returned XML without given a schema for it? I don't think there is a solution for deserialization of universal Object or anyType unless you use Message style operation. It means you treat the response as a Message, then your client program consumes the XML message. In this way, in fact your client still needs to know the schema of the message.
 
 
 
Regards,
Xinjun
 

 
On 5/26/06, Ravi Krishnamurthy <[EMAIL PROTECTED]> wrote:
XinJun/Anne:
I was monitoring the soap message using the tcp monitor.

The soapresponse for the RPC is as below:
<?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:getSimpleBeanResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://testanytyperpc.webservice.com">
            <getSimpleBeanReturn href=""
         </ns1:getSimpleBeanResponse>
         <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle= "http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:SimpleJavaBeanRPC" xmlns:soapenc= "http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://testanytyperpc.webservice.com" >
            <name xsi:type="xsd:string" xsi:nil="true"/>
            <value soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array">
               <value xsi:type="xsd:string">one</value>
               <value xsi:type="xsd:string">two</value>
            </value>
         </multiRef>
      </soapenv:Body>
   </soapenv:Envelope>

The soap response for the doc/lit/wrapped is as below:


<?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>
         <getSimpleBeanResponse xmlns="http://testanytype.webservice.com">
            <getSimpleBeanReturn>
               <name xsi:nil="true"/>
               <value>
                  <value>one</value>
                  <value>two</value>
               </value>
            </getSimpleBeanReturn>
         </getSimpleBeanResponse>
      </soapenv:Body>
   </soapenv:Envelope>

Interestingly the value tag does not contain the type information with the docl/lit/wrapped but in the rpc/encoded it does.

Any ideas are welcome.
Also since my webservice needed to be accessed by the .NET client, I tried to use soap/encoded since it worked but when I used visual studio 2005 found out when I send String[2}, there is an third element that comes with value null. Looks like the VB client is added one more index with value null and my webservice throws NullPointer since the null valeu is never expected.

Regards,
 
Ravi


Ravi Krishnamurthy wrote:
XinJun:
The exception stack trace on the client side is as below:
AxisFault
 faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: No deserializer for { http://www.w3.org/2001/XMLSchema}anyType
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/ }stackTrace:org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType
    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:314)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    at org.apache.axis.message.SAX2EventRecorder.replay (SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
    at org.apache.axis.message.RPCElement.getParams (RPCElement.java:384)
    at org.apache.axis.client.Call.invoke(Call.java:2467)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.webservice.testanytype.TestAnyTypeSoapBindingStub.getSimpleBean (TestAnyTypeSoapBindingStub.java:191)
    at com.webservice.testanytype.AnyTypeArrayTestServiceTestCase.test2TestAnyTypeGetSimpleBean(AnyTypeArrayTestServiceTestCase.java:61)
    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:216)
    at junit.framework.TestCase.runBare(TestCase.java:188)
    at junit.framework.TestResult$1.protect(TestResult.java:150)
    at junit.framework.TestResult.runProtected (TestResult.java:168)
    at junit.framework.TestResult.run(TestResult.java:153)
    at junit.framework.TestCase.run(TestCase.java:179)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java :478)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    { http://xml.apache.org/axis/}hostname:chennai

org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema }anyType
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
    at org.apache.axis.client.Call.invoke(Call.java:2470)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke (Call.java:1812)
    at com.webservice.testanytype.TestAnyTypeSoapBindingStub.getSimpleBean(TestAnyTypeSoapBindingStub.java:191)
    at com.webservice.testanytype.AnyTypeArrayTestServiceTestCase.test2TestAnyTypeGetSimpleBean (AnyTypeArrayTestServiceTestCase.java:61)
    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:216)
    at junit.framework.TestCase.runBare(TestCase.java:188)
    at junit.framework.TestResult$1.protect(TestResult.java:150)
    at junit.framework.TestResult.runProtected(TestResult.java:168)
    at junit.framework.TestResult.run(TestResult.java:153)
    at junit.framework.TestCase.run (TestCase.java:179)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.xml.sax.SAXException: No deserializer for { http://www.w3.org/2001/XMLSchema}anyType
    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:314)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java :1035)
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize (RPCElement.java:236)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    at org.apache.axis.client.Call.invoke(Call.java:2467)
    ... 17 more


Thanks,
Ravi
Ravi Krishnamurthy wrote:
Hello XinJun:
I have attached the zip file called testanytype.zip that contains the wsdl and also the testcase generated by the axis wsdl2java.

Client  Program:
Please look at the file: AnyTypeArrayTestServiceTestCase
             method: test2TestAnyTypeGetSimpleBean()

wsdl part of the program should refer to the line 70 in TestAnytype.wsdl and eventually to the definition of the SimpleBean which is line 14:
       <complexType name="SimpleJavaBean">
    <sequence>
     <element name="name" nillable="true" type="xsd:string"/>
     <element name="value" nillable="true" type="xsd:anyType"/>
    </sequence>
   </complexType>

The server.confif that describes the services looks like below:

<service name="TestAnyType" provider="java:RPC" style="wrapped" use="literal">
     <namespace>http://testanytype.webservice.com</namespace>
     <parameter name="allowedMethods" value="*"/>
     <parameter name="scope" value="request"/>
     <parameter name="className" value="test.AnyTypeArrayTest"/>
     <beanMapping languageSpecificType="java: test.SimpleBean" xmlns:ns="http://testanytype.webservice.com" qname="ns:SimpleJavaBean"/>
 </service>

Also I ahve attached the zip file test.zip that contains the webservice source file: AnyTypeArrayTest and the java bean file SimpleBean.

Eventually I want to use this webservice pblished using axis from a .NET client.

Thanks for your help in advance,
Ravi

Xinjun Chen wrote:
Hi Ravi,
 
Can you provide relevant part of WSDL and client code?
 
Regards,
Xinjun

 
On 5/25/06, Anne Thomas Manes <[EMAIL PROTECTED] > wrote:
Perhaps you need Object[] rather than Object.
 

Anne


On 5/25/06, Hariharasudhan.D Dhakshinamoorthy < [EMAIL PROTECTED]> wrote:
Ravi ,
i too have the same problem , could you figure out something ?

 
On 5/25/06, Ravi Krishnamurthy <[EMAIL PROTECTED] > wrote:
Hello;
Would be evry helpful if someone could reply this email.

thanks,
Ravi

Ravi Krishnamurthy wrote:

> More information:
> The exception that I mentioned happens only if the webservice is a
> document/literal/wrapped but with RPC it is fine.
>
> Is there is any known bug related to wrapped/literal style, anytype
> and ArrayOfString and axis1.2.1
>
> Thanks,
> Ravi
>
> Ravi Krishnamurthy wrote:
>
>> Hello;
>> One of the javabean I have registered as a bean mapping has a field
>> of Object type which corresponds to xsd:anyType. But the types  for
>> Object are always primitive types. As long they are primitives it
>> works fine. I tried to pass String[] and it started to throw
>> exception at the test cases generated by wsdl2java when I executed
>> the JUnit test case as below:
>>
>> AxisFault
>>  faultCode:
>> { http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>>  faultSubcode:
>>  faultString: org.xml.sax.SAXException: No deserializer for
>> { http://www.w3.org/2001/XMLSchema}anyType
>>  faultActor:
>>  faultNode:
>>  faultDetail:
>>     { http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException :
>> No deserializer for { http://www.w3.org/2001/XMLSchema}anyType
>>     at
>> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild (BeanDeserializer.java:314)
>>
>>     at
>> org.apache.axis.encoding.DeserializationContext.startElement (DeserializationContext.java:1035)
>>
>>     at
>> org.apache.axis.message.SAX2EventRecorder.replay (SAX2EventRecorder.java:165)
>>
>>     at
>> org.apache.axis.message.MessageElement.publishToHandler (MessageElement.java:1141)
>>
>>     at
>> org.apache.axis.message.RPCElement.deserialize (RPCElement.java:236)
>>     at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
>>     at org.apache.axis.client.Call.invoke(Call.java:2448)
>>     at org.apache.axis.client.Call.invoke (Call.java:2347)
>>     at org.apache.axis.client.Call.invoke(Call.java:1804)
>>     at
>> com.savvion.webservice.workflow.BizLogic1SoapBindingStub.getProcessTemplateDataSlot(BizLogic1SoapBindingStub.java :1704)
>>
>>     at
>> com.savvion.webservice.workflow.WorkFlowWSServiceTestCase.test20BizLogic1GetProcessTemplateDataSlot (WorkFlowWSServiceTestCase.java:457)
>>
>>     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:216)
>>     at junit.framework.TestCase.runBare(TestCase.java :188)
>>     at junit.framework.TestResult$1.protect(TestResult.java:150)
>>     at junit.framework.TestResult.runProtected (TestResult.java:168)
>>     at junit.framework.TestResult.run(TestResult.java :153)
>>     at junit.framework.TestCase.run(TestCase.java:179)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:478)
>>
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>>
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java :196)
>>
>>
>>     {http://xml.apache.org/axis/}hostname:chennai
>>
>> The returned soap envelop looks like below:
>> HTTP/1.1 200 OK
>>
>> Date: Wed, 24 May 2006 23:45:26 GMT
>>
>> Content-Type: text/xml; charset=utf-8
>>
>> Connection: Close
>>
>>
>>
>> <?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>
>>          <getProcessTemplateDataSlotResponse
>> xmlns=" http://workflow.webservice.savvion.com ">
>>             <getProcessTemplateDataSlotReturn>
>>                <choices xsi:nil="true"/>
>>                <isReadOnly>false</isReadOnly>
>>                <isWriteOnly>false</isWriteOnly>
>>                <name>listds</name>
>>                <ptid>1</ptid>
>>                <type>LIST</type>
>>                <value>
>>                   <value>one</value>
>>                   <value>ten</value>
>>                </value>
>>             </getProcessTemplateDataSlotReturn>
>>          </getProcessTemplateDataSlotResponse>
>>       </soapenv:Body>
>>    </soapenv:Envelope>
>>
>> and the xsd:anytype if for the following element:
>>                 <value>
>>                   <value>one</value>
>>                   <value>ten</value>
>>                </value>
>>
>> Would appreciate any help on this.
>>
>> Thanks,
>> Ravi
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to