You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mahindra K <mk...@cisco.com> on 2002/09/13 15:25:17 UTC

HOW to pass Vector acrross to published service

Hi,
    I am in a fix as to how to pass accross vectors to the service.
    Please direct me to some links or mail me piece of code which might
help me
    
Thanks
Mahindra
 
--------------------------------------------------------------------
Mahindra K
Cisco Systems Inc. ODC.
Zensar Technologies Limited.
Mile Post# 4,
Nagar Road, Pune.
Ph: 6633001 - 612
E-Mail: mkshirsa@cisco.com
------------------------------------------------------------------------
-----------
 

Re: HOW to pass Vector acrross to published service

Posted by James Black <jb...@ieee.org>.
Mahindra K wrote:

> I am doing
>         call.setReturnType( new QName("http://xml.apache.org/xml-soap",
> "java.util.Vector"));
>
> Sep 13, 2002 7:55:59 PM org.apache.axis.client.Call invoke
> SEVERE: Exception:
> org.xml.sax.SAXException: Bad types (null -> class java.util.Vector)
>         at TestClient.main(TestClient.java:148)

  If you look at this line, you may be passing a null value in the Vector,
and I am assuming that that is not allowed. It must be instantiated I
believe.



RE: HOW to pass Vector acrross to published service

Posted by Mahindra K <mk...@cisco.com>.
Hi,
	james thanks for respondng
I am using wsdd to deploy across to server.	wsdl is automatically
generated.
While I am returning vector thru the service I am getting foll exception

I am doing 		
	call.setReturnType( new QName("http://xml.apache.org/xml-soap",
"java.util.Vector"));

Sep 13, 2002 7:55:59 PM org.apache.axis.client.Call invoke
SEVERE: Exception:
org.xml.sax.SAXException: Bad types (null -> class java.util.Vector)
        at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:207)
        at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextIm
pl.java:857)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
199)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:644)
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:235)
        at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
        at org.apache.axis.client.Call.invoke(Call.java:1806)
        at org.apache.axis.client.Call.invoke(Call.java:1711)
        at org.apache.axis.client.Call.invoke(Call.java:1251)
        at TestClient.main(TestClient.java:148)

Thanks
Mahindra


-----Original Message-----
From: James Black [mailto:jblack@ieee.org] 
Sent: Friday, September 13, 2002 7:08 PM
To: axis-user@xml.apache.org
Subject: Re: HOW to pass Vector acrross to published service


Mahindra K wrote:

>  Hi,    I am in a fix as to how to pass accross vectors to the
> service.    Please direct me to some links or mail me piece of code
> which might help
> meThanksMahindra 
>
--------------------------------------------------------------------Mahi
ndra
> KCisco Systems Inc. ODC.
> Zensar Technologies Limited.
> Mile Post# 4,
> Nagar Road, Pune.
> Ph: 6633001 - 612E-Mail:
>
mkshirsa@cisco.com------------------------------------------------------
-----------------------------

  At the moment I don't think it is going to work, but my client did
compile. I am concerned because it uses anyType, but here is how
java2wsdl handled by Vector.

<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xml.apache.org/xml-soap">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="Vector">
- <sequence>
  <element name="item" minOccurs="0" maxOccurs="unbounded"
type="xsd:anyType" />
  </sequence>
  </complexType>
  <element name="Vector" nillable="true" type="apachesoap:Vector" />
  </schema>

So, here is one usage:
 <wsdl:message name="lookupCollegesResponse4">
  <wsdl:part name="lookupCollegesReturn" type="apachesoap:Vector" />
  </wsdl:message>

Some other data: xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns1="http://persons.epic.acomp.usf.edu"

  Hope this helps.



Re: HOW to pass Vector acrross to published service

Posted by James Black <jb...@ieee.org>.
Mahindra K wrote:

>  Hi,    I am in a fix as to how to pass accross vectors to the
> service.    Please direct me to some links or mail me piece of code
> which might help
> meThanksMahindra --------------------------------------------------------------------Mahindra
> KCisco Systems Inc. ODC.
> Zensar Technologies Limited.
> Mile Post# 4,
> Nagar Road, Pune.
> Ph: 6633001 - 612E-Mail:
> mkshirsa@cisco.com-----------------------------------------------------------------------------------

  At the moment I don't think it is going to work, but my client did
compile. I am concerned because it uses anyType, but here is how
java2wsdl handled by Vector.

<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xml.apache.org/xml-soap">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="Vector">
- <sequence>
  <element name="item" minOccurs="0" maxOccurs="unbounded"
type="xsd:anyType" />
  </sequence>
  </complexType>
  <element name="Vector" nillable="true" type="apachesoap:Vector" />
  </schema>

So, here is one usage:
 <wsdl:message name="lookupCollegesResponse4">
  <wsdl:part name="lookupCollegesReturn" type="apachesoap:Vector" />
  </wsdl:message>

Some other data:
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns1="http://persons.epic.acomp.usf.edu"

  Hope this helps.