Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @WebService
- public class ProductCatalog {
- public void getCategory(String category) {
- System.out.println(category);
- }
- }
- try{
- $client = new SoapClient("link/to/wsdl");
- $category = "music";
- $client->getCategory($category);
- }
- catch(SoapFault $exception){
- echo $exception->getMessage();
- }
- public void getProducts() {
- System.out.println("Works");
- }
- <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">
- <types>
- <xsd:schema>
- <xsd:import namespace="http://main/" schemaLocation="http://127.0.0.1:8080/Testmart/ProductCatalogService?xsd=1"/>
- </xsd:schema>
- </types>
- <message name="getProducts">
- <part name="parameters" element="tns:getProducts"/>
- </message>
- <message name="getProductsResponse">
- <part name="parameters" element="tns:getProductsResponse"/>
- </message>
- <portType name="ProductCatalog">
- <operation name="getProducts">
- <input wsam:Action="http://main/ProductCatalog/getProductsRequest" message="tns:getProducts"/>
- <output wsam:Action="http://main/ProductCatalog/getProductsResponse" message="tns:getProductsResponse"/>
- </operation>
- </portType>
- <binding name="ProductCatalogPortBinding" type="tns:ProductCatalog">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <operation name="getProducts">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="ProductCatalogService">
- <port name="ProductCatalogPort" binding="tns:ProductCatalogPortBinding">
- <soap:address location="http://127.0.0.1:8080/Testmart/ProductCatalogService"/>
- </port>
- </service>
- </definitions>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement