Hmm, not sure. I'm using http://www.w3.org/2001/XMLSchema but I am
running in wrapper/literal mode, not rpc/encoded mode. Hopefully someone
else can answer.
Dhananjayan_K wrote:
> I tried using xmlns:spc=http://schemas.xmlsoap.org/soap/encoding/"
> instead of xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> for the type attribute for xsd:element, (ex. <xsd:element
> name="ItemName" type="spc:string"/> )
> now its working...is this the correct way to communicate with .Net..
> <definitions name="urn:GetPO" targetNamespace="urn:GetPO"
> xmlns:tns="urn:GetPO" xmlns:typens="urn:GetPO"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wbm="http://www.webmethods.com/2001/10/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:spc="http://schemas.xmlsoap.org/soap/encoding/">
> <!-- type defs -->
> <types>
> <xsd:schema targetNamespace="urn:GetPO"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>
> <xsd:complexType name="purchaseorder">
> <xsd:sequence>
> <xsd:element name="ItemName" type="spc:string"/>
> <xsd:element name="Quantity" type="spc:int"/>
> <xsd:element name="price" type="spc:float"/>
> <xsd:element name="currency" type="spc:string"/>
> </xsd:sequence>
> </xsd:complexType>
> thanks..
>
> -----Original Message-----
> *From:* Dhananjayan_K [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, January 27, 2005 11:28 AM
> *To:* '[EMAIL PROTECTED]'
> *Subject:* RE: Using complex types Axis and .Net
>
> Hi Bill,
> I tried using xsd:sequence still the same problem occurs...
> what's the other way I can go instead of using RPC/encoded...
>
> -----Original Message-----
> *From:* Bill Keese [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, January 27, 2005 11:17 AM
> *To:* [EMAIL PROTECTED]
> *Subject:* Re: Using complex types Axis and .Net
>
> Using RPC/encoded with .NET is risky. (Some people say it
> works; other people say it doesn't.) Also, have you tried
> using xsd:sequence instead of xsd:all?
>
> Bill
>
> Dhananjayan_K wrote:
>
>>>Hi,
>>>
>>>I have a problem related to complex types in axis.
>>>
>>>I have a webservice running on Axis, the webserice returns a complex type
>>>"purchaseorder",
>>>i am able to succesfully connect to the webservice from java client,
>>>But when i try to add a "Add Web reference" from .Net iam not able to
>>>get the webservice instance.
>>>Can you please help me in this regard...
>>>
>>>wsdl file content...
>>>
>>><?xml version="1.0" ?>
>>><definitions name="urn:GetPO" targetNamespace="urn:GetPO"
>>>xmlns:tns="urn:GetPO" xmlns:typens="urn:GetPO"
>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wbm="http://www.webmethods.
>>>com/2001/10/soap/encoding/"
>>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>xmlns:spc="http://schemas.xmlsoap.org/soap/encoding/">
>>> <!-- type defs -->
>>> <types>
>>> <xsd:schema targetNamespace="urn:GetPO"
>>> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>>>
>>> <xsd:complexType name="purchaseorder">
>>> <xsd:all>
>>> <xsd:element name="ItemName" type="xsd:string"/>
>>> <xsd:element name="Quantity" type="xsd:int"/>
>>> <xsd:element name="price" type="xsd:float"/>
>>>
>>> <xsd:element name="currency" type="xsd:string"/>
>>>
>>> </xsd:all>
>>> </xsd:complexType>
>>> </xsd:schema>
>>> </types>
>>> <message name="empty"/>
>>> <message name="GetOrderRequest">
>>> <part name="name" type="xsd:string"/>
>>> </message>
>>> <message name="GetOrderResponse">
>>> <part name="purchaseOrder" type="typens:purchaseorder"/> <!--Note: If I
>>>change this to xsd:string then iam able to add the webreference in .Net)
>>> </message>
>>> <!-- port type declns -->
>>> <portType name="PurchaseOrderBook">
>>> <operation name="getOrder">
>>> <input message="tns:GetOrderRequest"/>
>>> <output message="tns:GetOrderResponse"/>
>>> </operation>
>>> </portType>
>>> <!-- binding declns -->
>>> <binding name="TestingNet" type="tns:PurchaseOrderBook">
>>> <soap:binding style="rpc"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>> <operation name="getOrder">
>>> <soap:operation soapAction=""/>
>>> <input>
>>> <soap:body use="encoded"
>>> namespace="urn:GetPO"
>>>
>>>encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>> </input>
>>> <output>
>>> <soap:body use="encoded"
>>> namespace="urn:GetPO"
>>>
>>>encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>> </output>
>>> </operation>
>>> </binding>
>>> <!-- service decln -->
>>> <service name="POservice">
>>> <port name="GetPO" binding="tns:TestingNet" >
>>> <soap:address location="http://localhost:8080/axis/services/GetPO"/>
>>> </port>
>>> </service>
>>></definitions>
>>>
>>>
>>>Please help...thanks in advance...
>>>
>>>regards,
>>>Dhananjayan K
>>>
>>>
>>
>>
>>
>>