On Tuesday 12 October 2010 2:01:41 am blaz wrote:
> Hi,
> I'm calling a cxf webservice from ksoap2, and ksoap2 seems to need the
> datatype directly in the SoapResponse in order to unmarshall it, in
> fact the datatype is present in the soaprequest from ksoap2.

That would be a bug in ksoap2 as it should not be relying on those.   From 
what I can tell, there isn't a way to force JAXB to generate xsi:type's on all 
the elements so I don't really think there is a way to accomplish this.     

Dan


> Is there a way to enable it with cxf Distributed-OSGI ? Am I doing
> something wrong ?
> Here are the request elements:
> 
> wsdl auto generated by cxf-dosgi:
> <wsdl:definitions name="Watchable"
> targetNamespace="http://watchable.portal.osgi.cnam.org/";
> xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://watchable.portal.osgi.cnam.org/";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>   <wsdl:types>
> <xsd:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://watchable.portal.osgi.cnam.org/";
> xmlns:tns="http://watchable.portal.osgi.cnam.org/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>   <xsd:complexType name="string2stringMap">
>     <xsd:sequence>
>       <xsd:element maxOccurs="unbounded" minOccurs="0" name="entry">
>         <xsd:complexType>
>           <xsd:sequence>
>             <xsd:element name="key" type="xsd:string" />
>             <xsd:element minOccurs="0" name="value" type="xsd:string" />
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:element name="getWatchableList" type="tns:getWatchableList" />
>   <xsd:complexType name="getWatchableList">
>     <xsd:sequence>
>       <xsd:element minOccurs="0" name="arg0" nillable="true"
> type="xsd:string" />
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:element name="getWatchableListResponse"
> type="tns:getWatchableListResponse" />
>   <xsd:complexType name="getWatchableListResponse">
>     <xsd:sequence>
>       <xsd:element minOccurs="0" name="return" nillable="true"
> type="tns:string2stringMap" />
>     </xsd:sequence>
>   </xsd:complexType>
> </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="getWatchableListResponse">
>     <wsdl:part element="tns:getWatchableListResponse" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="getWatchableList">
>     <wsdl:part element="tns:getWatchableList" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:portType name="WatchablePortType">
>     <wsdl:operation name="getWatchableList">
>       <wsdl:input message="tns:getWatchableList" name="getWatchableList">
>     </wsdl:input>
>       <wsdl:output message="tns:getWatchableListResponse"
> name="getWatchableListResponse">
>     </wsdl:output>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="WatchableSoapBinding" type="tns:WatchablePortType">
>     <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"; />
>     <wsdl:operation name="getWatchableList">
>       <soap:operation soapAction="" style="document" />
>       <wsdl:input name="getWatchableList">
>         <soap:body use="literal" />
>       </wsdl:input>
>       <wsdl:output name="getWatchableListResponse">
>         <soap:body use="literal" />
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="Watchable">
>     <wsdl:port binding="tns:WatchableSoapBinding" name="WatchablePort">
>       <soap:address location="http://blaz.is-a-geek.org:8888/watchable/"; />
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> 
> SoapRequest from ksoap2:
> <v:Envelope xmlns:c="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:d="http://www.w3.org/2001/XMLSchema";
> xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:v="http://schemas.xmlsoap.org/soap/envelope/";>
> <v:Header/>
> <v:Body>
> <n0:getWatchableList xmlns:n0="http://watchable.portal.osgi.cnam.org/";
> c:root="1" id="o0">
> <n0:arg0 i:type="d:string">FOO</n0:arg0>
> </n0:getWatchableList>
> </v:Body>
> </v:Envelope>
> 
> SoapResponse from cxf-DOSGI:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> <soap:Body>
> <ns1:getWatchableListResponse
> xmlns:ns1="http://watchable.portal.osgi.cnam.org/";>
> <ns1:return>
> <ns1:entry>
> <ns1:key>FOO</ns1:key>
> <ns1:value>BAR</ns1:value>
> </ns1:entry>
> </ns1:return>
> </ns1:getWatchableListResponse>
> </soap:Body>
> </soap:Envelope>

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to