axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8426] - Axis client can not access .Net Web Service
Date Thu, 25 Apr 2002 16:30:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8426>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8426

Axis client can not access .Net Web Service

adel@zbestquest.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From adel@zbestquest.com  2002-04-25 16:30 -------
Glen: I am a little puzzled. Before I got your last comment, I have already 
found and setup the SOAPActionURI properly in my code, but when the call runs, 
the SOAP header apparently does not get sent properly. The error message is 
"Exception in thread "main" System.Web.Services.Protocols.SoapException: Server 
d
id not recognize the value of HTTP Header SOAPAction: .
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, Http
Context context, HttpRequest request, HttpResponse response, Boolean& abortProce
ssing)
        at org.apache.axis.message.SOAPFaultBuilder.endElement(Unknown Source)
        at org.apache.axis.encoding.DeserializationContextImpl.endElement(Unknow
n Source) 

and the tcpmon utility says in the Request window: 
POST /TempConvert1/Service1.asmx HTTP/1.0
Content-Length: 486
Host: localhost
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

and in the response window :
"HTTP/1.1 500 Internal Server Error.

Server: Microsoft-IIS/5.0

Date: Thu, 25 Apr 2002 16:01:22 GMT

Cache-Control: private

Content-Type: text/xml; charset=utf-8



<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <soap:Fault>

      <faultcode>soap:Client</faultcode>

      <faultstring>System.Web.Services.Protocols.SoapException: Server did not 
recognize the value of HTTP Header SOAPAction: .

   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()

   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, 
HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; 
abortProcessing)</faultstring>

      <detail />

for reference purpose, here is again my source file; the wsdl file is the same 
as before in the previous Comment. Thanks for your help.

=====source file========
package samples.userguide.example7 ;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;

import javax.xml.rpc.ParameterMode;

public class MSTempConvClient
{
   public static void main(String [] args) throws Exception {
       Options options = new Options(args);
       
       String endpoint = "http://localhost:" + options.getPort() +
                         "/TempConvert1/Service1.asmx";
       
       args = options.getRemainingArgs();
       
       if (args == null || args.length != 2) {
           System.err.println("Usage: TempConvClient <conv> arg1");
           return;
       }
       
       String method = args[0];
       if (!(method.equals("ConvertTemperature"))) {
           System.err.println("Usage: CalcClient <conv> arg1 ");
           return;
       }
       
       Double d1 = new Double(args[1]);
        

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

       call.setTargetEndpointAddress( new java.net.URL(endpoint) );
       call.setOperationName( method );
       call.addParameter( "op1", XMLType.XSD_DOUBLE, 
ParameterMode.PARAM_MODE_IN );
       //call.addParameter( "op2", XMLType.XSD_INT, 
ParameterMode.PARAM_MODE_IN );
       call.setReturnType( XMLType.XSD_DOUBLE );
	 call.setSOAPActionURI
("http://Walkthrough/XmlWebServices/ConvertTemperature");

       Double ret = (Double)(call.invoke( new Object [] { d1}) );
       
       System.out.println("Got result : " + ret);
   }
}

Mime
View raw message