Thanks Anne,

I just got my first PHP-Java WS to talk using Axis (1.4).

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;

public class TestClient
{
  public static void main(String [] args) {
      try {
String endpoint = "http://192.168.1.3/typo3vsncat/index.php?id=4";; /*Service URL. not WSDL*/

          Service  service = new Service();
          Call     call    = (Call) service.createCall();

          call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://fivee.in/";, "getQuote") );

          String ret = (String) call.invoke( new Object[] { "Hello!" } );

          System.out.println("Sent 'Hello!', got '" + ret + "'");
      } catch (Exception e) {
          System.err.println(e.toString());
      }
  }
}

regards,
Vikram
( FiveE Technologies.)

----- Original Message ----- From: "Anne Thomas Manes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, July 28, 2007 12:46 AM
Subject: Re: connecting to PHP web service


Axis2 doesn't support SOAP Encoding. Use Axis instead.

Anne

On 7/27/07, Vikram Mandal <[EMAIL PROTECTED]> wrote:
Hi,

I have a PHP web service which I need to access using Java.
The web service works fine in PHP <--> PHP environment
And the java client works fine in a Java <---> Java environment

But when in PHP <---> Java  environment I have the follow error:

INFO: Discarding unexpected response: HTTP/1.1 100 Continue
org.apache.axis2.AxisFault: Transport error: 405 Error: Method not allowed

I also tried WSDL2Java and got the follow error:

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
Error parsing WSDL


<?xml version ='1.0' encoding ='UTF-8' ?>
<definitions name='StockQuote'
 targetNamespace='http://fivee.in/ws/maps_res'
 xmlns:tns='http://fivee.in/ws/maps_res'
 xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
 xmlns:xsd='http://www.w3.org/2001/XMLSchema'
 xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
 xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
 xmlns='http://schemas.xmlsoap.org/wsdl/'
 xmlns:xsd1='http://www.ecerami.com/schema'>

 <types>
    <xsd:schema
        targetNamespace='http://www.ecerami.com/schema'
        xmlns='http://www.w3.org/2001/XMLSchema'>
        <xsd:complexType name='Result'>
           <xsd:sequence>
              <xsd:element name='name' type='xsd:string'/>
              <xsd:element name='description' type='xsd:string'/>
              <xsd:element name='price' type='xsd:double'/>
              <xsd:element name='symbol' type='xsd:string'/>
           </xsd:sequence>
        </xsd:complexType>
     </xsd:schema>
 </types>

<message name='getQuoteRequest'>
 <part name='symbol' type='xsd:string'/>
</message>

<message name='getQuoteResponse'>
 <part name='Result' type='xsdl:Result'/>
</message>

<portType name='MapsHighResPortType'>
 <operation name='getQuote'>
   <input message='tns:getQuoteRequest'/>
   <output message='tns:getQuoteResponse'/>
 </operation>
</portType>


<binding name='MapsHighResBinding' type='tns:MapsHighResPortType'>
 <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>

 <operation name='getQuote'>
   <soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
   <input>
     <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
       encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
   </input>
   <output>
     <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
       encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
   </output>
 </operation>

</binding>

<service name='MapsHighRes'>
 <port name='MapsHighRes' binding='MapsHighResBinding'>
<soap:address location='http://192.168.1.3/typo3vsncat/index.php?id=4'/>
 </port>
</service>
</definitions>




Can someone point to the right direction. I am using Axis2

Thanks a ton in advance!

Regards,
Vikram


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to