Can someone please send me an example of how to send a complex type to a .net service? I´m having no sucess at this. How is the xml supposed to be? How do I do it using SCO or SoapClient?
In theory (given it's the goal of Web services), the fact it's a .NET
service should make no difference. The difference between SCA and the
SoapClient (I don't know SCO) will largely come down to how you work
with the complexTypes. With the SoapClient (If I remember correctly),
you will use DOM to create a complex type and can use SimpleXML to
read any complex type which is returned. With SCA you use SDO to
create and read complex types.
An <any />, which you mentioned in your previous post, is a bit of a
pain to work with. With SDO, this will result in what is called an
"Open Type" (a type which can take any content). You will need an XSD
for the content you will put in place of the any (I would assume
the .NET service defines a schema for what can go in place of the
any). You can then use SDO to create a DataObject for that content,
fill it in and then pass it in the request to the Web service.
Note, I've never needed to work with open types in an SCA client, so
there may be some devils in the details...
> Can someone please send me an example of how to send a complex type to a
> .net service?
> I´m having no sucess at this.
> How is the xml supposed to be?
> How do I do it using SCO or SoapClient?
I have few experience with ws at all. But one thing I think is different on
this service I want to consume is the fact that it declares an open type in
the wsdl and then it puts a schema declaration inside the response.
2008/8/6 Graham Charters <gchart...@googlemail.com>
> In theory (given it's the goal of Web services), the fact it's a .NET
> service should make no difference. The difference between SCA and the
> SoapClient (I don't know SCO) will largely come down to how you work
> with the complexTypes. With the SoapClient (If I remember correctly),
> you will use DOM to create a complex type and can use SimpleXML to
> read any complex type which is returned. With SCA you use SDO to
> create and read complex types.
> An <any />, which you mentioned in your previous post, is a bit of a
> pain to work with. With SDO, this will result in what is called an
> "Open Type" (a type which can take any content). You will need an XSD
> for the content you will put in place of the any (I would assume
> the .NET service defines a schema for what can go in place of the
> any). You can then use SDO to create a DataObject for that content,
> fill it in and then pass it in the request to the Web service.
> Note, I've never needed to work with open types in an SCA client, so
> there may be some devils in the details...
> On 5 Aug, 22:13, "Bruno Reis" <bruno.p.r...@gmail.com> wrote:
> > Hi there.
> > Can someone please send me an example of how to send a complex type to a
> > .net service?
> > I´m having no sucess at this.
> > How is the xml supposed to be?
> > How do I do it using SCO or SoapClient?
I hadn't appreciated the complex type was in the response, not the
request (I should have looked more carefully). I don't know whether
the schema being in the response will cause problems or not, and in
fact it may be irrelevant. If the request with either the SoapClient
or SCA works and gives you back a valid SimpleXML or SDO object, then
I would just try to walk through the data to see what came back. If
you're only reading the data then you should not need the schema to
work with SDO result. If you use SoapClient/SimpleXML then it does
not use the schema whether you're manipulating the data or not.
Regards, Graham.
On 6 Aug, 11:36, "Bruno Reis" <bruno.p.r...@gmail.com> wrote:
> I have few experience with ws at all. But one thing I think is different on
> this service I want to consume is the fact that it declares an open type in
> the wsdl and then it puts a schema declaration inside the response.
> 2008/8/6 Graham Charters <gchart...@googlemail.com>
> > Hi Bruno,
> > In theory (given it's the goal of Web services), the fact it's a .NET
> > service should make no difference. The difference between SCA and the
> > SoapClient (I don't know SCO) will largely come down to how you work
> > with the complexTypes. With the SoapClient (If I remember correctly),
> > you will use DOM to create a complex type and can use SimpleXML to
> > read any complex type which is returned. With SCA you use SDO to
> > create and read complex types.
> > An <any />, which you mentioned in your previous post, is a bit of a
> > pain to work with. With SDO, this will result in what is called an
> > "Open Type" (a type which can take any content). You will need an XSD
> > for the content you will put in place of the any (I would assume
> > the .NET service defines a schema for what can go in place of the
> > any). You can then use SDO to create a DataObject for that content,
> > fill it in and then pass it in the request to the Web service.
> > Note, I've never needed to work with open types in an SCA client, so
> > there may be some devils in the details...
> > On 5 Aug, 22:13, "Bruno Reis" <bruno.p.r...@gmail.com> wrote:
> > > Hi there.
> > > Can someone please send me an example of how to send a complex type to a
> > > .net service?
> > > I´m having no sucess at this.
> > > How is the xml supposed to be?
> > > How do I do it using SCO or SoapClient?
> I hadn't appreciated the complex type was in the response, not the
> request (I should have looked more carefully). I don't know whether
> the schema being in the response will cause problems or not, and in
> fact it may be irrelevant. If the request with either the SoapClient
> or SCA works and gives you back a valid SimpleXML or SDO object, then
> I would just try to walk through the data to see what came back. If
> you're only reading the data then you should not need the schema to
> work with SDO result. If you use SoapClient/SimpleXML then it does
> not use the schema whether you're manipulating the data or not.
> > I have few experience with ws at all. But one thing I think is different
> on
> > this service I want to consume is the fact that it declares an open type
> in
> > the wsdl and then it puts a schema declaration inside the response.
> > 2008/8/6 Graham Charters <gchart...@googlemail.com>
> > > Hi Bruno,
> > > In theory (given it's the goal of Web services), the fact it's a .NET
> > > service should make no difference. The difference between SCA and the
> > > SoapClient (I don't know SCO) will largely come down to how you work
> > > with the complexTypes. With the SoapClient (If I remember correctly),
> > > you will use DOM to create a complex type and can use SimpleXML to
> > > read any complex type which is returned. With SCA you use SDO to
> > > create and read complex types.
> > > An <any />, which you mentioned in your previous post, is a bit of a
> > > pain to work with. With SDO, this will result in what is called an
> > > "Open Type" (a type which can take any content). You will need an XSD
> > > for the content you will put in place of the any (I would assume
> > > the .NET service defines a schema for what can go in place of the
> > > any). You can then use SDO to create a DataObject for that content,
> > > fill it in and then pass it in the request to the Web service.
> > > Note, I've never needed to work with open types in an SCA client, so
> > > there may be some devils in the details...
> > > On 5 Aug, 22:13, "Bruno Reis" <bruno.p.r...@gmail.com> wrote:
> > > > Hi there.
> > > > Can someone please send me an example of how to send a complex type
> to a
> > > > .net service?
> > > > I´m having no sucess at this.
> > > > How is the xml supposed to be?
> > > > How do I do it using SCO or SoapClient?