[EMAIL PROTECTED] wrote:
Thanks for the samples. I was able to get them to work.Hi, don't know if this helps, but the following works for me.
[server]
window xp, tomcat 4.1.30, axis 1_2RC1, I converted the samples/userguide/example5 to wrapped web service. I attached
the wsdl if you want it.
[client]
windows 2003, .NET 1.1, I created a client and was able to call my java web service. I attached my c sharp code if you need
it.
In my case, I'm sending user defined type to my web service. I
think in your case you are retrieving a user defined type from
your java web service to your .net client.
-dwong
You are right that I am trying to retrieve a user-defined type and that seems to be where the problem lies. Using your example as a guide, I have hand-crafted a WSDL with a user-defined type. Here's the WSDL and a sample response:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://cityxpress.com/external" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:impl="http://cityxpress.com/external">
<wsdl:types>
<schema targetNamespace="http://cityxpress.com/external"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getObject">
<complexType>
<sequence>
<element name="id" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getObjectResponse">
<complexType>
<sequence>
<element name="impl:getObjectReturn" type="impl:CXObjectType"/>
</sequence>
</complexType>
</element>
<complexType name="CXObjectType">
<sequence>
<element name="thedate" nillable="true" type="xsd:string"/>
<element name="avalue" nillable="true" type="xsd:int"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getObjectRequest">
<wsdl:part name="parameter" element="impl:getObject"/>
</wsdl:message>
<wsdl:message name="getObjectResponse">
<wsdl:part name="attributes" element="impl:getObjectResponse"/>
</wsdl:message>
<wsdl:portType name="XMTest">
<wsdl:operation name="getObject">
<wsdl:input message="impl:getObjectRequest" name="getObjectRequest"/>
<wsdl:output message="impl:getObjectResponse" name="getObjectResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="XMTestBinding" type="impl:XMTest">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http/"/>
<wsdl:operation name="getObject">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getObjectRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getObjectResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="XMTestService">
<wsdl:port name="XMTest" binding="impl:XMTestBinding">
<wsdlsoap:address location="http://localhost:8080/wsitest2/services/XMTest"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getObjectResponse xmlns="http://cityxpress.com/external">
<getObjectReturn>
<thedate xmlns="">Today</thedate>
<avalue xmlns="">4</avalue>
</getObjectReturn>
</getObjectResponse>
</soapenv:Body>
</soapenv:Envelope>
I think that the problem is the empty namespace declarations (xmlns="") on "thedate" and "avalue". Is there anyway to get Axis to not do that?
Thanks, Dan.
begin:vcard fn:Dan Ciarniello n:Ciarniello;Dan org:CityXpress Corp adr;dom:;;200 - 1727 West Broadway;Vancouver;BC;V6J 4W5 email;internet:[EMAIL PROTECTED] title:Software Developer tel;work:604-638-3800 ext. 322 x-mozilla-html:TRUE url:http://www.cityxpress.com version:2.1 end:vcard