users@jax-rpc.java.net

Working with Arrays!!!

From: Dilip Easwaran <dilip_at_IIITB.AC.IN>
Date: Mon, 08 Apr 2002 01:35:09 -0600

hi all!!!

I have a webservice published that takes as input parameter an array of strings and returns an array of strings.

Now when i want to access it:starting from WSDl, i get the errors:

java.rmi.RemoteException: received fault: "Internal Server Error (deserialization error: deserialization error: deserialization error: deserialization error: deserialization error: unexpected element name: expected=string, actual={http://www.w3.org/2001/XMLSchema}string)" (code: "Server" namespace: "http://schemas.xmlsoap.org/soap/envelope/"); nested exception is:received fault: "Internal Server Error (deserialization error: deserialization error: deserialization error: deserialization error: deserialization error: unexpected element name: expected=string, actual={http://www.w3.org/2001/XMLSchema}string)" (code: "Server" namespace: "http://schemas.xmlsoap.org/soap/envelope/")
        at Client.InsIFPort_Stub.getInsRate(Unknown Source)
        at Client.insClient.demoArray(insClient.java:50)
        at Client.insClient.main(insClient.java:14)
Caused by: received fault: "Internal Server Error (deserialization error: deserialization error: deserialization error: deserialization error: deserialization error: unexpected element name: expected=string, actual={http://www.w3.org/2001/XMLSchema}string)" (code: "Server" : "http://schemas.xmlsoap.org/soap/envelope/") at
com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:321)
        at com.sun.xml.rpc.client.StreamingSender._sendStreamingSender.java:211
)
        ... 3 more


Note:I have no problems with other permitted data types.The problem arises only when i am working with arrays.

my Config.xml file that i use to feed the XRPCC tool is:

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://java.sun.com/jax-rpc-ri/xrpcc-config">
<wsdl name="InsuranceService" location="http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl" packageName="Client">
</wsdl>
</configuration>

and the wsdl file that i refer to is:

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="InsuranceService" targetNamespace="http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl" xmlns:tns="http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://simplebean-hello.org/types">
  <types>
    <schema targetNamespace="http://simplebean-hello.org/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://simplebean-hello.org/types" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
      <complexType name="ArrayOfstring">
        <complexContent>
          <restriction base="soap-enc:Array">
            <attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/></restriction></complexContent></complexType></schema></types>
  <message name="getInsRate">
    <part name="arrayOfString_1" type="ns2:ArrayOfstring"/></message>
  <message name="getInsRateResponse">
    <part name="result" type="ns2:ArrayOfstring"/></message>
  <portType name="insIF">
    <operation name="getInsRate">
      <input message="tns:getInsRate"/>
      <output message="tns:getInsRateResponse"/></operation></portType>
  <binding name="insIFBinding" type="tns:insIF">
    <operation name="getInsRate">
      <input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl"/></input>
      <output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl"/></output>
      <soap:operation soapAction=""/></operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
  <service name="Insurance">
    <port name="insIFPort" binding="tns:insIFBinding">
      <soap:address location="http://dilipe:8080/jaxrpc-insurance/jaxrpc/insIF"/></port></service></definitions>

can anyone help???

dilip