Comsume #Net services.

5 views
Skip to first unread message

Bruno Prieto Reis

unread,
Aug 1, 2008, 11:24:03 AM8/1/08
to phpsoa
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

Dalibor Andzakovic

unread,
Aug 3, 2008, 11:44:30 PM8/3/08
to php...@googlegroups.com
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
winmail.dat

Graham Charters

unread,
Aug 5, 2008, 2:59:15 AM8/5/08
to phpsoa
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.

On 4 Aug, 04:44, Dalibor Andzakovic <Dalibor.Andzako...@swerve.co.nz>
wrote:
> 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-----
> From: php...@googlegroups.com 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
>
>
>
> winmail.dat
> 4KDownload

Dalibor Andzakovic

unread,
Aug 5, 2008, 4:10:19 AM8/5/08
to php...@googlegroups.com
> 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

Graham Charters

unread,
Aug 5, 2008, 4:44:18 AM8/5/08
to phpsoa
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.

On 5 Aug, 09:10, Dalibor Andzakovic <Dalibor.Andzako...@swerve.co.nz>
wrote:

Bruno Reis

unread,
Aug 5, 2008, 7:14:38 AM8/5/08
to php...@googlegroups.com
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">
                <PROJ_UID>afcd0792-26c1-40a2-941f-0f93a19e022f</PROJ_UID>
Reply all
Reply to author
Forward
0 new messages