I am trying to replace a Java application with a PHP application. Previously, the Java application communicated with our core application, also written in Java. These two apps communicated with each other using Axis 1.4. I have defined the php 'server' class, hand wrote the wsdl file and I've written a few small php test scripts. Everything seems to work without a problem.
My next step was to use the wsdl2java tool to generate the Java files that the core Java app would use to communicate with the new php app. I tweeked some code in the core app so that it calls the new wsdl2java files instead of the ones generated for the previous java app that the php app replaces. However, it just doesn't work. Instead, the client (the axis generated code is what I assume to be the client) keeps generating a '406 not acceptable' error. Here's a stack trace fragment: org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744), org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144), org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32), org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118), org.apache.axis.SimpleChain.invoke(SimpleChain.java:83), org.apache.axis.client.AxisClient.invoke(AxisClient.java:165), org.apache.axis.client.Call.invokeEngine(Call.java:2784), org.apache.axis.client.Call.invoke(Call.java:2767), org.apache.axis.client.Call.invoke(Call.java:2443), org.apache.axis.client.Call.invoke(Call.java:2366), org.apache.axis.client.Call.invoke(Call.java:1812), com.dm.web.vb.webservice.MyServiceBindingStub.login(MyServiceBindingStub.java:201), com.dm.web.forum.VBWSFacade.login(VBWSFacade.java:53), com.dm.web.forum.UserFacade.login(UserFacade.java:64) ... snip ... Below is my wsdl document. I'd very much appreciate it if someone could give me a hand with this. I'm totally stuck and I can't really move forward at this point. Thanks! <?xml version ='1.0' encoding ='UTF-8' ?> <definitions name='MyService' targetNamespace="urn:MyService" xmlns:tns="urn:MyService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <xsd:schema xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:MyService"> <xsd:complexType name="loginResult"> <xsd:all> <xsd:element name="password" type="xsd:string" /> <xsd:element name="userid" type="xsd:int" /> </xsd:all> </xsd:complexType> </xsd:schema> </types> <message name="loginRequest"> <part name="username" type="xsd:string" /> <part name="password" type="xsd:string" /> </message> <message name="loginResponse"> <part name="result" type="tns:loginResult" /> </message> <message name="logoutRequest"> <part name="input" type="xsd:string"/> </message> <message name="deleteUserRequest"> <part name="username" type="xsd:string"/> <part name="deletePosts" type="xsd:boolean"/> </message> <message name="deleteUserResponse"> <part name="response" type="xsd:boolean"/> </message> <message name="getUserIdRequest"> <part name="username" type="xsd:string" /> </message> <message name="getUserIdResponse"> <part name="userid" type="xsd:int" /> </message> <message name="getHashRequest"> <part name="input" type="xsd:int" /> </message> <message name="getHashResponse"> <part name="output" type="xsd:string" /> </message> <portType name="MyService"> <operation name="login"> <input message="tns:loginRequest" /> <output message="tns:loginResponse" /> </operation> <operation name="logout"> <input message="tns:logoutRequest" /> </operation> <operation name="deleteUser"> <input message="tns:deleteUserRequest"/> <output message="tns:deleteUserResponse"/> </operation> <operation name="getUserId"> <input message="tns:getUserIdRequest"/> <output message="tns:getUserIdResponse"/> </operation> <operation name="getHash"> <input message="tns:getHashRequest" /> <output message="tns:getHashResponse" /> </operation> </portType> <binding name="MyServiceBinding" type="tns:MyService"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="login"> <soap:operation soapAction="urn:MyServiceAction" /> <input> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> </operation> <operation name="logout"> <soap:operation soapAction="urn:MyServiceAction" /> <input> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> </operation> <operation name="deleteUser"> <soap:operation soapAction="urn:MyServiceAction" /> <input> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> </operation> <operation name="getUserId"> <soap:operation soapAction="urn:MyServiceAction" /> <input> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> </operation> <operation name="getHash"> <soap:operation soapAction="urn:MyServiceAction" /> <input> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="urn:MyService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> </operation> </binding> <service name="MyService"> <port name="MyService" binding="tns:MyServiceBinding"> <soap:address location="http://localhost/testvb/msoap/MyService.php"/> </port> </service> </definitions> -- View this message in context: http://www.nabble.com/Axis-to-PHP---getting-406-Not-Acceptable-error-tp16826040p16826040.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
