What version of AXIS are you using?  Your generated ArrayOfCompStruct3
looks quite a bit different than mine.

Russell Butek
[EMAIL PROTECTED]


Zelidrag Hornung <[EMAIL PROTECTED]> on 03/19/2002 12:19:23 PM

Please respond to [EMAIL PROTECTED]

To:    "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject:    RE: .NET/AXIS Interoperability Issue



Russell,

Thanks for answering my question. So first, WSDL2Java generates only some
of
the classes for me. If I want to compile the whole fileset generated from
my
WSDL, I get bunch of errors regarding missing classes - you can see from
their names that these classes were supposed to be created from my WSDL.
Second, even those classes that got generated are broken if they represent
arrays of complex structures. WSDL that gets generated from .NET represents
arrays as unbounded sequences, like this one:

      <s:complexType name="ArrayOfCompStruct3">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="CompStruct3"
nillable="true" type="s0:CompStruct3" />
        </s:sequence>


The class I got generated by WSDL2Java does not represent anything
array-like in Java:


/**
 * ArrayOfCompStruct3.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis Wsdl2java emitter.
 */

package org.tempuri;

public class ArrayOfCompStruct3 implements java.io.Serializable {
    private org.tempuri.CompStruct3_Type CompStruct3;

    public ArrayOfCompStruct3() {
    }

    public ArrayOfCompStruct3(org.tempuri.CompStruct3_Type CompStruct3) {
        this.CompStruct3 = CompStruct3;
    }

    public org.tempuri.CompStruct3_Type getCompStruct3() {
        return CompStruct3;
    }

    public void setCompStruct3(org.tempuri.CompStruct3_Type CompStruct3) {
        this.CompStruct3 = CompStruct3;
    }

}




-----Original Message-----
From: Russell Butek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 6:37 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: .NET/AXIS Interoperability Issue


I just ran WSDL2Java on this WSDL and it appears to generate the proper
classes.  Could you tell us explicitly what you think is a problem?

Russell Butek
[EMAIL PROTECTED]


Zelidrag Hornung <[EMAIL PROTECTED]> on 03/18/2002 05:03:23 PM

Please respond to [EMAIL PROTECTED]

To:    "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>,
       "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject:    .NET/AXIS Interoperability Issue



Folks,

I am not sure if I am addressing this issue to the right newsgroup, but I
hope someone might be able to help me. I made a simple web service in .NET
that is described by following WSDL (see below). When I try to map its to
Java object by using wsdl2java, it looks that every time when I have an
array of a complex element, the tool can't map that properly into an
object.
Has anyone else run into something similar?


<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:s0="http://tempuri.org/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
targetNamespace="http://tempuri.org/";
xmlns="http://schemas.xmlsoap.org/wsdl/";>
  <types>
    <s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/";>
      <s:element name="ComplexArrayMethod">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="cs1"
type="s0:CompStruct2" />
            <s:element minOccurs="0" maxOccurs="1" name="cs2"
type="s0:ArrayOfCompStruct3" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="CompStruct2">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="cs2_double_member"
type="s:double" />
          <s:element minOccurs="0" maxOccurs="1" name="cs2_string_member"
type="s:string" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="ArrayOfCompStruct3">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="CompStruct3"
nillable="true" type="s0:CompStruct3" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="CompStruct3">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="cs2_double_member"
type="s:double" />
          <s:element minOccurs="0" maxOccurs="1" name="cs2_string_member"
type="s:string" />
        </s:sequence>
      </s:complexType>
      <s:element name="ComplexArrayMethodResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1"
name="ComplexArrayMethodResult" type="s0:ArrayOfCompStruct1" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ArrayOfCompStruct1">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="CompStruct1"
nillable="true" type="s0:CompStruct1" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="CompStruct1">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="cs1_str_member1"
type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="cs1_int_member2"
type="s:int" />
        </s:sequence>
      </s:complexType>
    </s:schema>
  </types>
  <message name="ComplexArrayMethodSoapIn">
    <part name="parameters" element="s0:ComplexArrayMethod" />
  </message>
  <message name="ComplexArrayMethodSoapOut">
    <part name="parameters" element="s0:ComplexArrayMethodResponse" />
  </message>
  <portType name="Service1Soap">
    <operation name="ComplexArrayMethod">
      <documentation>Test Web Method</documentation>
      <input message="s0:ComplexArrayMethodSoapIn" />
      <output message="s0:ComplexArrayMethodSoapOut" />
    </operation>
  </portType>
  <portType name="Service1HttpGet" />
  <portType name="Service1HttpPost" />
  <binding name="Service1Soap" type="s0:Service1Soap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document" />
    <operation name="ComplexArrayMethod">
      <soap:operation soapAction="http://tempuri.org/ComplexArrayMethod";
style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>
  </binding>
  <binding name="Service1HttpGet" type="s0:Service1HttpGet">
    <http:binding verb="GET" />
  </binding>
  <binding name="Service1HttpPost" type="s0:Service1HttpPost">
    <http:binding verb="POST" />
  </binding>
  <service name="Service1">
    <port name="Service1Soap" binding="s0:Service1Soap">
      <soap:address location="http://localhost/TestAxis/Service1.asmx"; />
    </port>
    <port name="Service1HttpGet" binding="s0:Service1HttpGet">
      <http:address location="http://localhost/TestAxis/Service1.asmx"; />
    </port>
    <port name="Service1HttpPost" binding="s0:Service1HttpPost">
      <http:address location="http://localhost/TestAxis/Service1.asmx"; />
    </port>
  </service>
</definitions>



Reply via email to