<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Obilog &#187; java</title>
	<atom:link href="http://obilog.info/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://obilog.info</link>
	<description>Robbi Hendriyanto Log</description>
	<lastBuildDate>Thu, 05 Jan 2012 00:08:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>NuSoap &#8211; SOAP Toolkit for PHP</title>
		<link>http://obilog.info/2010/07/nusoap-soap-toolkit-for-php/</link>
		<comments>http://obilog.info/2010/07/nusoap-soap-toolkit-for-php/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 04:01:26 +0000</pubDate>
		<dc:creator>obiesan</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[pHP]]></category>
		<category><![CDATA[ProgRamMinG]]></category>
		<category><![CDATA[iseng]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.obilog.info/?p=829</guid>
		<description><![CDATA[<p><a href="http://www.obilog.info/wp-content/uploads/2010/07/applicationIntegration.png"></a>NuSOAP is a group of PHP classes that allow developers to create and consume SOAP web services. It does not require any special PHP extensions. The current release version (0.6.7) of NuSOAP at the time this was written (03-November-2004), supports much of the SOAP 1.1 specification. It can generate WSDL 1.1 and also consume [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.obilog.info/wp-content/uploads/2010/07/applicationIntegration.png"><img class="size-thumbnail wp-image-830 alignleft" style="border: 1px solid gray; padding: 5px; margin-right: 5px;" title="applicationIntegration" src="http://www.obilog.info/wp-content/uploads/2010/07/applicationIntegration-150x150.png" alt="" width="150" height="150" /></a>NuSOAP is a group of PHP classes that allow developers to create and  consume SOAP web services.  It does not require any special PHP extensions.  The  current release version (0.6.7) of NuSOAP at the time this was written  (03-November-2004), supports much of the SOAP 1.1 specification.  It can generate WSDL 1.1 and  also consume it for use in serialization. NuSOAP is a rewrite of SOAPx4, provided by NuSphere and Dietrich Ayala.  It is a set of PHP classes &#8211; no PHP extensions required &#8211; that allow  developers to create and consume web services based on SOAP 1.1, WSDL  1.1 and HTTP 1.0/1.1.</p>
<p><span id="more-829"></span>This document describes how to obtain and install NuSOAP, then provides  some samples to illustrate the capabilities of NuSOAP.  It is by no means an exhaustive  description of NuSOAP, but it is hopefully enough to get any PHP coder started. Programming with  NuSOAP follows this up with more complex samples.</p>
<p>For Download Nu SOAP</p>
<p>Docs File : http://sourceforge.net/projects/nusoap/files/nusoap-docs/0.9.5/nusoap-docs-0.9.5.zip/download</p>
<p>Lib File : http://sourceforge.net/projects/nusoap/files/nusoap/0.9.5/nusoap-0.9.5.zip/download</p>
<p>Example :</p>
<p>I create simple webservice in Java</p>
<p>calc.java</p>
<p>[sourcecode language="java"]package org.com.calc;<br />
import javax.jws.WebMethod;<br />
import javax.jws.WebParam;<br />
import javax.jws.WebService;<br />
/**<br />
*<br />
* @author obiesan<br />
*/<br />
@WebService(name = &quot;contohcalc&quot;, serviceName=&quot;calc&quot;, targetNamespace=&quot;urn:urlcalc&quot;)<br />
public class calc {<br />
@WebMethod(operationName = &quot;cekkoneksi&quot;, action=&quot;urn:urlcalc#cekkoneksi&quot;)<br />
public String cekkoneksi()<br />
{<br />
//TODO write your implementation code here:<br />
return (&quot;Nyambung nih&quot;);<br />
}<br />
@WebMethod(operationName = &quot;tambah&quot;, action=&quot;urn:urlcalc#tambah&quot;)<br />
public double tambah(@WebParam(name = &quot;nilx&quot;)<br />
double nilx, @WebParam(name = &quot;nily&quot;)<br />
double nily) {<br />
//TODO write your implementation code here:<br />
return (nilx+nily);<br />
}<br />
@WebMethod(operationName = &quot;kurang&quot;, action=&quot;urn:urlcalc#kurang&quot;)<br />
public double kurang(@WebParam(name = &quot;nilx&quot;)<br />
double nilx, @WebParam(name = &quot;nily&quot;)<br />
double nily) {<br />
//TODO write your implementation code here:<br />
return (nilx-nily);<br />
}<br />
@WebMethod(operationName = &quot;bagi&quot;, action=&quot;urn:urlcalc#bagi&quot;)<br />
public double bagi(@WebParam(name = &quot;nilx&quot;)<br />
double nilx, @WebParam(name = &quot;nily&quot;)<br />
double nily) {<br />
//TODO write your implementation code here:<br />
return (nilx/nily);<br />
}<br />
@WebMethod(operationName = &quot;kali&quot;, action=&quot;urn:urlcalc#kali&quot;)<br />
public double kali(@WebParam(name = &quot;nilx&quot;)<br />
double nilx, @WebParam(name = &quot;nily&quot;)<br />
double nily) {<br />
//TODO write your implementation code here:<br />
return (nilx*nily);<br />
}<br />
}<br />
[/sourcecode]</p>
<p>And for the client (php)<br />
[php]<br />
&lt;?php<br />
if(isset($_POST[&quot;submit&quot;])){<br />
 $param1=$_POST['param1'];<br />
 $param2=$_POST['param2'];<br />
 if(!is_string(array($param1,$param2))){<br />
 require(&quot;lib/nusoap.php&quot;);<br />
 //lihat alamat wsdlnya ubah localhost menjadi 127.0.0.1 dengan $namespacenya<br />
 $url = &quot;http://127.0.0.1:10328/contoh/calc&quot;;<br />
 $namespace=&quot;urn:urlcalc&quot;;<br />
 $client = new nusoap_client($url);<br />
 //cek koneksi dulu<br />
 $cek = $client-&gt;call(&quot;cekkoneksi&quot;,&quot;&quot;,$namespace);<br />
 //inisial parameter<br />
 $parameter = array(&quot;nilx&quot;=&gt;$param1,&quot;nily&quot;=&gt;$param2);<br />
 if($cek!=&quot;&quot;){<br />
 echo &quot;&lt;h3&gt;Inputan kamu parameter 1 : &quot;.$param1.&quot; dan parameter 2 : &quot;.$param2.&quot;&lt;/h3&gt;&lt;br&gt;&quot;;<br />
 echo $cek.&quot;&lt;br&gt;&lt;br&gt;&quot;;<br />
 //kata tambah, kurang, bagi, kali di dalam call itu merupakan nama operationname lihat di javanya<br />
 //parameter disesuaikan dengan parameter di masing2 method di java<br />
 $tambah = $client-&gt;call(&quot;tambah&quot;,$parameter, $namespace);<br />
 $kurang = $client-&gt;call(&quot;kurang&quot;,$parameter, $namespace);<br />
 $kali = $client-&gt;call(&quot;kali&quot;,$parameter, $namespace);<br />
 $bagi = $client-&gt;call(&quot;bagi&quot;,$parameter, $namespace);<br />
 echo &quot;Hasil tambah : &quot;.$tambah.&quot;&lt;br&gt;&quot;;<br />
 echo &quot;Hasil kurang : &quot;.$kurang.&quot;&lt;br&gt;&quot;;<br />
 echo &quot;Hasil kali : &quot;.$kali.&quot;&lt;br&gt;&quot;;<br />
 echo &quot;Hasil bagi : &quot;.$bagi.&quot;&lt;br&gt;&quot;;<br />
 }else<br />
 echo &quot;koneksi gagal&quot;;<br />
 $er = $client-&gt;getError();<br />
 if($er){<br />
 echo &quot;&lt;h2&gt;Error with soapclient creation : &lt;/h2&gt;&quot;.$er.&quot;&quot;;<br />
 }<br />
 }<br />
 echo &quot;&lt;br&gt;&lt;br&gt;&lt;hr&gt;&lt;br&gt;&quot;;<br />
}<br />
?&gt;<br />
&lt;form action=&quot;&quot; method=&quot;POST&quot;&gt;<br />
 Parameter 1 : &lt;input type=&quot;text&quot; name=&quot;param1&quot; value=&quot;masukkan nilai x&quot; size=&quot;20&quot; onclick=&quot;this.form.param1.value=&#8221;&quot;&gt;&lt;br&gt;<br />
 Parameter 2 : &lt;input type=&quot;text&quot; name=&quot;param2&quot; value=&quot;masukkan nilai y&quot; size=&quot;20&quot; onclick=&quot;this.form.param2.value=&#8221;&quot;&gt;&lt;br&gt;<br />
 &lt;input type=&quot;submit&quot; value=&quot;hitung&quot; name=&quot;submit&quot;&gt;<br />
&lt;/form&gt;<br />
[/php] </p>
]]></content:encoded>
			<wfw:commentRss>http://obilog.info/2010/07/nusoap-soap-toolkit-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

