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]
|
- Re: String[] for xsd:anyType with axis1.2.1 Ravi Krishnamurthy
-