Hi ,
Sending a dataset using the SOAP protocol is simply impossible for the
following reasons :
1 There is no definition of what a dataset is inside the
XmlSchema basic types.
2 A dataset may contain undefined binary data that will not comply with http
protocol usually
used
at the transport layer when using SOAP, and which would imply extra transport
semantics
like
for instance UUEncoding the data before sending.
=>
you need to read the dataset and transfert it's content. Event if the file
contains dynamic Xml defs which
seems
to be the case here , you simply can send the full content using an xs:string
type.
Jean-Yves
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Envoyé : Wednesday, February 20, 2002 2:59 PM
À : [EMAIL PROTECTED]
Objet : Re: java client for .NET webservice and Co
i also do have a WSD file :
============
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsCompany" targetNamespace="http://tempuri.org/dsCompany.xsd" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns="http://tempuri.org/dsCompany.xsd" xmlns:mstns="http://tempuri.org/dsCompany.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="dsCompany" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="T_Company">
<xs:complexType>
<xs:sequence>
<xs:element name="COMP_CompanyId" type="xs:string"/>
<xs:element name="COMP_Name" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_AddressLine1" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_AddressLine2" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_City" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_StateCode" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_Zip" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_CountryCode" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_PhoneNumber" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_FaxNumber" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_website" type="xs:string" minOccurs="0"/>
<xs:element name="COMP_CurrencyCode" type="xs:string"/>
<xs:element name="COMP_LocalVend" type="xs:boolean"/>
<xs:element name="COMP_Customer" type="xs:boolean"/>
<xs:element name="COMP_Agency" type="xs:boolean"/>
<xs:element name="COMP_LBSite" type="xs:boolean"/>
<xs:element name="T_Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="COMP_CompanyId" type="xs:string"/>
<xs:element name="ContractNo" type="xs:string" minOccurs="0"/>
<xs:element name="CustomerCode" type="xs:string" minOccurs="0"/>
<xs:element name="CODA_CreditAccountCode" type="xs:string" minOccurs="0"/>
<xs:element name="CODA_DebitAccountCode" type="xs:string" minOccurs="0"/>
<xs:element name="CODA_CustomerCode" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="dsCompanyKey2" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:T_Company"/>
<xs:field xpath="mstns:COMP_CompanyId"/>
</xs:unique>
</xs:element>
</xs:schema>
With all those elements, should i be able to transform a java object in what is experting .NET ? and how ?
[EMAIL PROTECTED] 02/20/2002 01:17 PM
Please respond to soap-dev
To: [EMAIL PROTECTED]
cc:
Subject: Re: java client for .NET webservice and Co
okay so after have looked at many documentation, i didn't find the solution so i post my question here :
what i must create is a java client that sends a DataSet to a .NET webservice. This webservice takes the DataSet and add it into a SQL server database.
My problem is : how to create a DataSet understandable by Microsoft ? I first have a java object (myCompanyObject, with the name, the address etc...)
So is the DataSet created by a class that transforms objects into DataSet ? or is it performed by a xml, wsdl, something file ? (my knowledge about wsdl is very small) ??? even better : how would look like the code for a "object to DataSet" transformation in some sample lines ?
here is the doc about my .NET webservice :
SOAP
The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.
POST /PCS_Integration/SynchronizeProfiles.asmx HTTP/1.1
Host: biztalk
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/WS_UpdateProfileAgency"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<WS_UpdateProfileAgency xmlns="http://tempuri.org/">
<dsComp>dataset</dsComp>
</WS_UpdateProfileAgency>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<WS_UpdateProfileAgencyResponse xmlns="http://tempuri.org/">
<WS_UpdateProfileAgencyResult>boolean</WS_UpdateProfileAgencyResult>
</WS_UpdateProfileAgencyResponse>
</soap:Body>
</soap:Envelope>
Regards,
Elise