aspose file tools*
The moose likes Web Services and the fly likes Problem with arrays of primitive types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with arrays of primitive types" Watch "Problem with arrays of primitive types" New topic
Author

Problem with arrays of primitive types

alka sharma
Greenhorn

Joined: Feb 04, 2003
Posts: 2
Hi,
I am using jwsdp 1.0_01 and Weblogic 6.1 sp3. I am generating a wsdl file from jwsdp (using ant), passing java interface and implementation file as input.
The problem is, I have a function which returns array of integers (int[]). This is converted to ArrayOfint type by xrpcc while generating wsdl file. When hit the url ...?WSDL on web browser(IE 6.0), it gives an error
Reference to undeclared namespace prefix: 'wsdl'. Error processing resource 'http://192.168.5.18:8001/jaxrpc-hello/jaxrpc?WSDL'. Line 30, Position 149
<attribute xmlns:tns="http://hello.org/types" xmlns="http://www.w3.org/2001/XMLSchema" ref="soap-enc:arrayType" wsdl:arrayType="int[]"/></restriction></complexContent></complexType></schema></types>

Anyways when i call this function through a client it gives me correct results.
Here is the wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="HelloWorld" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/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://java.sun.com/jax-rpc-ri/internal" xmlns:ns3="http://hello.org/types">
<types>
<schema targetNamespace="http://java.sun.com/jax-rpc-ri/internal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://java.sun.com/jax-rpc-ri/internal" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<import namespace="http://hello.org/types"/>
<complexType name="vector">
<complexContent>
<extension base="tns:list">
<sequence/></extension></complexContent></complexType>
<complexType name="list">
<complexContent>
<extension base="tns:collection">
<sequence/></extension></complexContent></complexType>
<complexType name="collection">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType" wsdl:arrayType="anyType[]"/></restriction></complexContent></complexType></schema>
<schema targetNamespace="http://hello.org/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://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">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<import namespace="http://java.sun.com/jax-rpc-ri/internal"/>
<complexType name="Empl">
<sequence>
<element name="empno" type="int"/>
<element name="test" type="tns:ArrayOfint"/>
<element name="ename" type="string"/></sequence></complexType>
<complexType name="ArrayOfint">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType" wsdl:arrayType="int[]"/></restriction></complexContent></complexType></schema></types>
<message name="HelloIF_getTest">
<part name="Empl_1" type="ns3:Empl"/></message>
<message name="HelloIF_getTestResponse">
<part name="result" type="ns3:ArrayOfint"/></message>
<message name="HelloIF_getVector"/>
<message name="HelloIF_getVectorResponse">
<part name="result" type="ns2:vector"/></message>
<message name="HelloIF_sayHello">
<part name="String_1" type="xsd:string"/></message>
<message name="HelloIF_sayHelloResponse">
<part name="result" type="xsd:string"/></message>
<message name="HelloIF_setVector">
<part name="Empl_1" type="ns3:Empl"/></message>
<message name="HelloIF_setVectorResponse"/>
<message name="HelloIF_testTS">
<part name="String_1" type="xsd:string"/></message>
<message name="HelloIF_testTSResponse">
<part name="result" type="xsd:string"/></message>
<portType name="HelloIF">
<operation name="getTest" parameterOrder="Empl_1">
<input message="tns:HelloIF_getTest"/>
<output message="tns:HelloIF_getTestResponse"/></operation>
<operation name="getVector" parameterOrder="">
<input message="tns:HelloIF_getVector"/>
<output message="tns:HelloIF_getVectorResponse"/></operation>
<operation name="sayHello" parameterOrder="String_1">
<input message="tns:HelloIF_sayHello"/>
<output message="tns:HelloIF_sayHelloResponse"/></operation>
<operation name="setVector" parameterOrder="Empl_1">
<input message="tns:HelloIF_setVector"/>
<output message="tns:HelloIF_setVectorResponse"/></operation>
<operation name="testTS" parameterOrder="String_1">
<input message="tns:HelloIF_testTS"/>
<output message="tns:HelloIF_testTSResponse"/></operation></portType>
<binding name="HelloIFBinding" type="tns:HelloIF">
<operation name="getTest">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></output>
<soap peration soapAction=""/></operation>
<operation name="getVector">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></output>
<soap peration soapAction=""/></operation>
<operation name="sayHello">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></output>
<soap peration soapAction=""/></operation>
<operation name="setVector">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></output>
<soap peration soapAction=""/></operation>
<operation name="testTS">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></output>
<soap peration soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="HelloWorld">
<port name="HelloIFPort" binding="tns:HelloIFBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with arrays of primitive types