Please post Axis questions to [EMAIL PROTECTED]  Thanks.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Ryan Champlin" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, June 15, 2005 1:31 PM
Subject: wscompile not generating objects correctly for schema-defined types in 
WSDL


I've read through a few documents on the web about creating web service methods 
that take XML as a parameter. Currently our web service defines that XML as a 
string type.
However, I've been working on trying to define them as Schema types so that my 
Java or .Net service will create objects for the various XML types. I've run my 
WSDL through .Net and it seems to generate my DataSet, Record, and Field types 
just fine. However, I can't get wscompile to generate the interface and objects 
in the same way. Currently it creates the method that takes a SOAPElement type. 
Not an object of type DataSet. Below is the interface I'm seeing generated:

// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.2_01, build R40)
// Generated source version: 1.1.2

package com.webservice.client.java;

public interface IQServiceIF extends java.rmi.Remote {
public com.webservice.client.java.RunTransactionDataflowWithXmlDataResponse 
runTransactionDataflowWithXmlData(javax.xml.soap.SOAPElement parameters) throws 
java.rmi.RemoteException;
}

The following is my Ant task for wscompile:

<target name="generate-client-stubs" description="Generate Client-Side Stubs" 
unless="build_web_service_stubs">
<taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile"/>
<wscompile 
gen="true"
base="build/classes"
classpath="src"
verbose="true"
features="wsi"
config="config/config.xml"
sourceBase="build/src">
</wscompile>
</target> 


Below is the WSDL file I've created. I'm using the WSDL-To-Java methodology to 
create this service.
I've been struggling with tihs for some time now and can't seem to get it to 
work. I'm not seeing anything different than what I'm seeing in your sample 
articles at this point.

Thanks much!

Ryan

<?xml version="1.0" encoding="UTF-8"?><definitions 
xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="http://test.com/wsdl"; 
xmlns:ns2="http://test.com/types"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; name="IQService" 
targetNamespace="http://test.com/wsdl";>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:tns="http://firstlogic.com/types"; 
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
targetNamespace="http://test.com/types";>

<complexType name="FieldType" mixed="true">
<attribute name="name" type="string" use="required"/>
</complexType>
<complexType name="RecordType" mixed="true"> 
<sequence maxOccurs="unbounded">
<element name="Field" type="tns:FieldType"/>
</sequence>
</complexType> 

<complexType name="DataSetType">
<sequence maxOccurs="unbounded">
<element name="Record" type="tns:RecordType"/>
</sequence>
</complexType>

<complexType name="runTransactionDataflowWithXmlDataResponse">
<sequence>
<element name="runTransactionDataflowWithXmlDataResult" type="string" 
nillable="true"/></sequence></complexType>

<element name="DataSet" type="tns:DataSetType"/>
<element name="runTransactionDataflowWithXmlDataResponse" 
type="tns:runTransactionDataflowWithXmlDataResponse"/>

</schema></types>
<message name="IQServiceIF_runTransactionDataflowWithXmlData">
<part name="parameters" element="ns2:DataSet"/></message>
<message name="IQServiceIF_runTransactionDataflowWithXmlDataResponse">
<part name="result" 
element="ns2:runTransactionDataflowWithXmlDataResponse"/></message>

<portType name="IQServiceIF">
<operation name="runTransactionDataflowWithXmlData">
<input message="tns:IQServiceIF_runTransactionDataflowWithXmlData"/>
<output 
message="tns:IQServiceIF_runTransactionDataflowWithXmlDataResponse"/></op 
eration>
</portType>

<binding name="IQServiceIFBinding" type="tns:IQServiceIF">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
<operation name="runTransactionDataflowWithXmlData">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation>
</binding>
<service name="IQService">
<port name="IQServiceIFPort" binding="tns:IQServiceIFBinding">
<soap:address location="http://localhost:8085/IQService/IQService"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service> </definitions>


Reply via email to