Re: How to work with Webservices (.asmx) server

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

 



Anton Heuschen wrote:
> I am confused with XML-RPC / SOAP and WSDL ...
> 
> If you have a server with a script/file like test.asmx and some web
> services ...below example of service format :
> 
> SOAP 1.2
> 
> The following is a sample SOAP 1.2 request and response. The
> placeholders shown need to be replaced with actual values.
> 
> -------------------------------------  SAMPLE OF Web Service from the
> server below :
> 
> SOAP 1.2
> 
> The following is a sample SOAP 1.2 request and response.  The
> placeholders shown need to be replaced with actual values.
> 
> 
> 
> 
> POST /webservice/GetData.asmx HTTP/1.1
> Host: www.theserver.com
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: length
> 
> <?xml version="1.0" encoding="utf-8"?>
> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";>
>   <soap12:Body>
>     <GetData xmlns="http://localhost/WebService/";>
>       <Input>string</Input>
>     </GetData>
>   </soap12:Body>
> </soap12:Envelope>
> 
> 
> 
> HTTP/1.1 200 OK
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: length
> 
> <?xml version="1.0" encoding="utf-8"?>
> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";>
>   <soap12:Body>
>     <GetDataResponse xmlns="http://localhost/WebService/";>
>       <Output>string</Output>
>     </GetDataResponse>
>   </soap12:Body>
> </soap12:Envelope>
> 
> 
> 
> ------------------------------------ END OF SAMPLE
> 
> 
> 
> 
> I spend about most of my time looking at SOAP, XML-RPC and the PHP
> SOAP extension, like from here:
> 
> http://tutorial.jcwcn.com/Web-Design/PHP/XML-and-PHP/2008-08-15/10160.html
> 
> 
> Most of these talk about request to the server and a script with .wsdl
> extension ... but from the example SOAP 1.2 "framework" above
> and the fact that the url to the web service is not a .wsdl file but
> in fact a .asmx file, how on earth to you

It doesn't have to be a .wsdl extension to offer that functionality. The
WSDL output is nothing more then what the webservice has to offer.
Requests are not send to the .wsdl but to the webservice endpoint.

> 
> 1) post a request to the example above.
> 2) What do you use here now actually ? SOAP/XML-RPC/WSDL ? or is this
> something else ? Its extremely confusing since this does
> not seem to fit in with any of the examples, material on the net.
> 

The examples above show requests en responses in the SOAP format. You
could target this webservice in multiple ways. But building a SOAP
client would probably be the best option.

> I basically need to call the service and pass "string" to the Input
> parameter and get the response field.
> 
> 
> Some examples using the PHP Soap class talk about setting the URI, the
> host and the NS and I don't know from the example SOAP 1.2 fields
> provided where this should be taken from.
> 

the URL you actually are talking to with your SOAP client is
http://localhost/WebService/

> 
> Some guidelines to good documentation/howto or tutorials and/or some
> examples and functions/class would be
> appreciated immensely

http://wso2.org/library/1060

> 
> Regards
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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