Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. @WebService
  2. public class ProductCatalog {
  3.  
  4. public void getCategory(String category) {
  5. System.out.println(category);
  6. }
  7. }
  8.  
  9. try{
  10. $client = new SoapClient("link/to/wsdl");
  11.  
  12. $category = "music";
  13.  
  14. $client->getCategory($category);
  15. }
  16. catch(SoapFault $exception){
  17. echo $exception->getMessage();
  18. }
  19.  
  20. public void getProducts() {
  21. System.out.println("Works");
  22. }
  23.  
  24. <definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://main/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://main/" name="ProductCatalogService">
  25. <types>
  26. <xsd:schema>
  27. <xsd:import namespace="http://main/" schemaLocation="http://127.0.0.1:8080/Testmart/ProductCatalogService?xsd=1"/>
  28. </xsd:schema>
  29. </types>
  30. <message name="getProducts">
  31. <part name="parameters" element="tns:getProducts"/>
  32. </message>
  33. <message name="getProductsResponse">
  34. <part name="parameters" element="tns:getProductsResponse"/>
  35. </message>
  36. <portType name="ProductCatalog">
  37. <operation name="getProducts">
  38. <input wsam:Action="http://main/ProductCatalog/getProductsRequest" message="tns:getProducts"/>
  39. <output wsam:Action="http://main/ProductCatalog/getProductsResponse" message="tns:getProductsResponse"/>
  40. </operation>
  41. </portType>
  42. <binding name="ProductCatalogPortBinding" type="tns:ProductCatalog">
  43. <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
  44. <operation name="getProducts">
  45. <soap:operation soapAction=""/>
  46. <input>
  47. <soap:body use="literal"/>
  48. </input>
  49. <output>
  50. <soap:body use="literal"/>
  51. </output>
  52. </operation>
  53. </binding>
  54. <service name="ProductCatalogService">
  55. <port name="ProductCatalogPort" binding="tns:ProductCatalogPortBinding">
  56. <soap:address location="http://127.0.0.1:8080/Testmart/ProductCatalogService"/>
  57. </port>
  58. </service>
  59. </definitions>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement