Magnus,
Please paste the complete WSDL.

Prateek

On Thu, Jul 8, 2010 at 12:48 PM, Magnus Altin <[email protected]> wrote:
> I'm developing a web service with Axis2 1.5.1 and I have a problem
> with a Dotnet client trying to consume it.
>
> I'm using the contract first model and this is how I define one of my
> complex types:
>
> <xsd:complexType name="Category" >
>       <xsd:sequence>
>               <xsd:element name="id" type="xsd:int"></xsd:element>
>               <xsd:element name="text" type="xsd:string"></xsd:element>
>               <xsd:element name="parentId" type="xsd:int"></xsd:element>
>               <xsd:element name="treeLevel" type="xsd:int"></xsd:element>
>               <xsd:element name="isLeafNode" type="xsd:boolean"></xsd:element>
>       </xsd:sequence>
> </xsd:complexType>
>
> And here is what my ADB and Axis2 generated WSDL looks like:
>
> <xs:complexType name="Category">
>       <xs:sequence>
>               <xs:element minOccurs="0" name="id" type="xs:int"/>
>               <xs:element minOccurs="0" name="isLeafNode" type="xs:boolean"/>
>               <xs:element minOccurs="0" name="parentId" type="xs:int"/>
>               <xs:element minOccurs="0" name="text" nillable="true"
> type="xs:string"/>
>               <xs:element minOccurs="0" name="treeLevel" type="xs:int"/>
>       </xs:sequence>
> </xs:complexType>
>
> Pretty similar :-)
>
> And finally here is a snippet of the output from the service call (from 
> SoapUI)
>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>  <soapenv:Body>
>     <ns:readCategoryResponse
> xmlns:ns="http://webservices.project.company.se";
> xmlns:ax21="http://gen.webservices.project.company.se/xsd";>
>        <ns:return>
>           <id>1001</id>
>           <text>Administration</text>
>           <parentId>0</parentId>
>           <treeLevel>0</treeLevel>
>           <isLeafNode>false</isLeafNode>
>        </ns:return>
> ...
> ...
> ...
>
> Why is xmlns:ax21 declared as a namespace when it's never used?
>
> Shouldn't the elements id, text, parentId and so on have a namespace prefix?
>
> Like this:
> <ax21:id>1001</ax21:id>
>
> I believe that our Dotnet client should be able to understand the
> data better if it is namespace prefixed. Now it just gets a null
> value.
>
> I would very much appreciate any thoughts on this problem
>
> Kind regards,
> Magnus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to