Webservice Wsdl - to do or not to do?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,



I'm wrting a WSDL webservice in php and I have a doubt about one thing.

I created a method(or operation) that sends an invitation to the user. The
request uses the session ID to identify the user that I want to send the
invitation.  Here is a example of the WSDL request from the eclipse.



SOAP REQUEST ENVELOPE:

- <#> <soapenv:Envelope xmlns:soapenv="*
http://schemas.xmlsoap.org/soap/envelope/*"; xmlns:q0="*http://domain/*"xmlns:xsd
="*http://www.w3.org/2001/XMLSchema*"; xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance*";>
 - <#> <soapenv:Body>
 - <#> <q0:SendInvitationToVisitor>
   <token>c4b6nu52lc19f0i4d0oo4djg33</token>
  </q0:SendInvitationToVisitor>
  </soapenv:Body>
  </soapenv:Envelope>



SOAP RESPONSE ENVELOPE:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again.


Well I don't need to send a confirmation response to the requested method.
Because this omission, I remove the parameter that sends the response in the
WSDL file. The code can be checked below.

I did the same thing but using the response method. I wrote a WSDL method
that request a list of some users. The SOAP REQUEST ENVELOPE is sent empty
but the SOAP RESPONSE ENVELOPE returns me all records that I want. Look:


THIS METHOD WORKS FINE
<wsdl:message name="GetVisitorsRequest">
  //AN EMPTY REQUEST
  </wsdl:message>
  <wsdl:message name="GetVisitorsResponse">
    <wsdl:part name="parameters"
element="soapsmartchat:GetVisitorsResponse"></wsdl:part>
  </wsdl:message>




THIS METHOD RETURNS ME AN ERROR (the XML page cannot be displayed)
  <wsdl:message name="SendInvitationToVisitorRequest">
    <wsdl:part name="parameters"
element="soapsmartchat:SendInvitationToVisitor"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="SendInvitationToVisitorResponse">
   // AND EMPTY RESPONSE
  </wsdl:message>







My doubt is: How to send a SOAP RESPONSE ENVELOPE empty without a XML page
error? Is possible or I need mantatorily sends a response for all request
method?




Thanks..




Augusto Morais

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux