Discussion:
Comsume #Net services.
Dalibor Andzakovic
2008-08-04 03:44:30 UTC
Permalink
Use latest PHP with SOAP extension. You don't really need SCA/SDO to consume services (but you can do it if you want to define your complex types in an xsd)

Read up on http://nz.php.net/manual/en/book.soap.php. This wil give you a good overview and pointers on http auth.

Use script from http://www.urdalen.no/wsdl2php/ to generate your proxy classes and types.

HTH

dali


-----Original Message-----
From: phpsoa-/***@public.gmane.org on behalf of Bruno Prieto Reis
Sent: Sat 2008-08-02 03:24
To: phpsoa
Subject: [phpsoa] Comsume #Net services.


Hi there,

IŽm starting to learn this W.S. subject. And I need to consume two or
three services from a #Net server. ( Project Server ).
Since I dontŽn know much about it I have some questions and will be
gratefull if someone can answer one or more of them:

1 - is it possible?
2 - how do I learn to do it? ( Are there tutorials on the net ? )
3 - how do I do it? ( are there any code examples I can use, etc? )
4 - How do I deal with complex types?
5 - How do I create a proxy to the services?
6 - Are there any issues I should be aware of, like bugs, #net
integration, #net specific types, etc...
7 - How do I do a basic http authentication?

Thanks in advance for any help provided.

Bruno Reis




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa+***@googlegroups.com
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
Graham Charters
2008-08-05 08:44:18 UTC
Permalink
Hi Dali,

You do need to pass SDO objects for consumed Web services, but my
point was, you are not responsible for writing the XSD. Someone else
will already have done this as part of creating the WSDL. I don't
believe StdClass objects will work. I hope that clarifies what I
meant :-S

I believe SCA can consume various styles of soap service (e.g. rpc/
encoded), but only support creating doc/literal wrapped services.

Regards, Graham.
I just wanted to clarify the comment about xsd. When using SCA to
consume a Web service you do not need to write an XSD because one will
already be provided as part WSDL service description. You only need
to write an XSD when you are creating a service which uses complex
types.
You know, you may be right there...
I've always passed SDO objects as complex types to consumed
webservices*.
I'll try some tests with StdClass objects as complex types. One of these
days I should really collect all my notes and put them up on the web
somewhere.
It may be worth noting that I've never tried consuming RPC/ENCODED style
SOAP with SCA either...
Dali
* by webservices I mean SOAP webservices
Bruno Reis
2008-08-05 11:14:38 UTC
Permalink
Hi all,

I have advanced a little on this subject and I understand a little more what
is happening now.

The wsdl define two elements and then it defines a *any* node inside them
without defining all the response elements.
When I call the service the response comes with the schema definition and
the data together inside this two nodes as shown below.

My question is: how do I read and parse this response into objects that I
will be able to use later to call other services?

Thanks!!!

WSDL
----------------------
<s:element name="*ReadProjectTeamResponse*">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="*
ReadProjectTeamResult*">
<s:complexType>
<s:sequence>
<s:any namespace="
http://schemas.microsoft.com/office/project/server/webservices/TeamBuilderDataSet/
"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>

RESPONSE (the schema and the diffgram are inside the ReadProjectTeamResult)
---------------------------
<soap:Envelope>
<soap:Body>
<ReadProjectTeamResponse>
<ReadProjectTeamResult>
<xs:schema id="ProjectTeamDataSet" targetNamespace="
http://schemas.microsoft.com/office/project/server/webservices/TeamBuilderDataSet/"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="ProjectTeamDataSet" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ProjectTeam">
<xs:complexType>
<xs:sequence>
.......

<diffgr:diffgram>
<ProjectTeamDataSet>
<ProjectTeam diffgr:id="ProjectTeam1" msdata:rowOrder="0">
Graham Charters
2008-08-05 06:59:15 UTC
Permalink
I just wanted to clarify the comment about xsd. When using SCA to
consume a Web service you do not need to write an XSD because one will
already be provided as part WSDL service description. You only need
to write an XSD when you are creating a service which uses complex
types.

Regards, Graham.
Post by Dalibor Andzakovic
Use latest PHP with SOAP extension. You don't really need SCA/SDO to consume services (but you can do it if you want to define your complex types in an xsd)
Read up onhttp://nz.php.net/manual/en/book.soap.php. This wil give you a good overview and pointers on http auth.
Use script fromhttp://www.urdalen.no/wsdl2php/to generate your proxy classes and types.
HTH
dali
-----Original Message-----
Sent: Sat 2008-08-02 03:24
To: phpsoa
Subject: [phpsoa] Comsume #Net services.
Hi there,
I´m starting to learn this W.S. subject. And I need to consume two or
three services from a #Net server. ( Project Server ).
Since I dont´n know much about it I have some questions and will be
1 - is it possible?
2 - how do I learn to do it? ( Are there tutorials on the net ? )
3 - how do I do it? ( are there any code examples I can use, etc? )
4 - How do I deal with complex types?
5 - How do I create a proxy to the services?
6 - Are there any issues I should be aware of, like bugs, #net
integration, #net specific types, etc...
7 - How do I do a basic http authentication?
Thanks in advance for any help provided.
Bruno Reis
winmail.dat
4KDownload
Loading...