You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "T. Carson Hager" <ca...@cynergysystems.com> on 2001/11/12 15:54:37 UTC

RE: Trying to call a .NET Web Service

You aren't setting the SOAPAction.  It should be set to the following:

http://www.PerfectXML.com/NETWebSvcs/BookService/GetAmazonSalesRank


Carson

__________________________________________________________

Carson Hager
Cynergy Systems, Inc.
Sybase Enterprise Application Studio Consulting and Training
http://www.cynergysystems.com



> -----Original Message-----
> From: Mike Carney [mailto:mike@webcarney.com]
> Sent: Monday, November 12, 2001 1:34 PM
> To: soap-user@xml.apache.org
> Subject: Trying to call a .NET Web Service
> 
> 
> Hello,
> 
> I am trying to call a simple .NET webservice with the 
> information about the
> webservice found at: 
> http://www.xmethods.net/detail.html?id=192 with the
> following code:
> 
> Call call = new Call();
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setTargetObjectURI ("PerfectXML.NET:SalesRankNPrice");
> call.setMethodName ("GetAmazonSalesRank");
> Vector params=new Vector();
> params.addElement (new Parameter ("ISBN", String.class, 
> param1, null));
> call.setParams(params);
> URL url = new URL
> ("http://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookSe
> rvice.asmxhttp
> ://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookService.asmx");
> Response resp = call.invoke (url, "");
> if (resp.generatedFault()) {
>   Fault fault=resp.getFault();
>   System.out.println(" Fault code: " + fault.getFaultCode());
>   System.out.println(" Fault string: "+fault.getFaultString());
>             }
> else {
>  Parameter result=resp.getReturnValue();
>  Object o = result.getValue();
>  System.out.println("Object value: "+o);
>  }
> 
> I get this error:
> Fault code: soap:Client Fault string:
> 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)
> 
> Is there something I am missing about the TargetObjectURI, as 
> this seems to
> be different from calling a webservice from Apache-Soap.
> 
> Thanks,
> 
> Mike
> 

RE: Trying to call a .NET Web Service

Posted by Mike Carney <mi...@webcarney.com>.
Sorry, I found it in the invoke call.  

Thanks,
Mike

-----Original Message-----
From: Mike Carney [mailto:mike@webcarney.com]
Sent: Monday, November 12, 2001 7:57 AM
To: soap-user@xml.apache.org
Subject: RE: Trying to call a .NET Web Service


I could not find anything about the SOAPAction in the API, what is the call
to set the SOAPAction?

Thanks,
Mike

-----Original Message-----
From: T. Carson Hager [mailto:carson.hager@cynergysystems.com]
Sent: Monday, November 12, 2001 6:55 AM
To: soap-user@xml.apache.org
Subject: RE: Trying to call a .NET Web Service


You aren't setting the SOAPAction.  It should be set to the following:

http://www.PerfectXML.com/NETWebSvcs/BookService/GetAmazonSalesRank


Carson

__________________________________________________________

Carson Hager
Cynergy Systems, Inc.
Sybase Enterprise Application Studio Consulting and Training
http://www.cynergysystems.com



> -----Original Message-----
> From: Mike Carney [mailto:mike@webcarney.com]
> Sent: Monday, November 12, 2001 1:34 PM
> To: soap-user@xml.apache.org
> Subject: Trying to call a .NET Web Service
>
>
> Hello,
>
> I am trying to call a simple .NET webservice with the
> information about the
> webservice found at:
> http://www.xmethods.net/detail.html?id=192 with the
> following code:
>
> Call call = new Call();
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setTargetObjectURI ("PerfectXML.NET:SalesRankNPrice");
> call.setMethodName ("GetAmazonSalesRank");
> Vector params=new Vector();
> params.addElement (new Parameter ("ISBN", String.class,
> param1, null));
> call.setParams(params);
> URL url = new URL
> ("http://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookSe
> rvice.asmxhttp
> ://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookService.asmx");
> Response resp = call.invoke (url, "");
> if (resp.generatedFault()) {
>   Fault fault=resp.getFault();
>   System.out.println(" Fault code: " + fault.getFaultCode());
>   System.out.println(" Fault string: "+fault.getFaultString());
>             }
> else {
>  Parameter result=resp.getReturnValue();
>  Object o = result.getValue();
>  System.out.println("Object value: "+o);
>  }
>
> I get this error:
> Fault code: soap:Client Fault string:
> 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)
>
> Is there something I am missing about the TargetObjectURI, as
> this seems to
> be different from calling a webservice from Apache-Soap.
>
> Thanks,
>
> Mike
>


RE: Trying to call a .NET Web Service

Posted by Mike Carney <mi...@webcarney.com>.
Sorry, I found it in the invoke call.  

Thanks,
Mike

-----Original Message-----
From: Mike Carney [mailto:mike@webcarney.com]
Sent: Monday, November 12, 2001 7:57 AM
To: soap-user@xml.apache.org
Subject: RE: Trying to call a .NET Web Service


I could not find anything about the SOAPAction in the API, what is the call
to set the SOAPAction?

Thanks,
Mike

-----Original Message-----
From: T. Carson Hager [mailto:carson.hager@cynergysystems.com]
Sent: Monday, November 12, 2001 6:55 AM
To: soap-user@xml.apache.org
Subject: RE: Trying to call a .NET Web Service


You aren't setting the SOAPAction.  It should be set to the following:

http://www.PerfectXML.com/NETWebSvcs/BookService/GetAmazonSalesRank


Carson

__________________________________________________________

Carson Hager
Cynergy Systems, Inc.
Sybase Enterprise Application Studio Consulting and Training
http://www.cynergysystems.com



> -----Original Message-----
> From: Mike Carney [mailto:mike@webcarney.com]
> Sent: Monday, November 12, 2001 1:34 PM
> To: soap-user@xml.apache.org
> Subject: Trying to call a .NET Web Service
>
>
> Hello,
>
> I am trying to call a simple .NET webservice with the
> information about the
> webservice found at:
> http://www.xmethods.net/detail.html?id=192 with the
> following code:
>
> Call call = new Call();
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setTargetObjectURI ("PerfectXML.NET:SalesRankNPrice");
> call.setMethodName ("GetAmazonSalesRank");
> Vector params=new Vector();
> params.addElement (new Parameter ("ISBN", String.class,
> param1, null));
> call.setParams(params);
> URL url = new URL
> ("http://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookSe
> rvice.asmxhttp
> ://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookService.asmx");
> Response resp = call.invoke (url, "");
> if (resp.generatedFault()) {
>   Fault fault=resp.getFault();
>   System.out.println(" Fault code: " + fault.getFaultCode());
>   System.out.println(" Fault string: "+fault.getFaultString());
>             }
> else {
>  Parameter result=resp.getReturnValue();
>  Object o = result.getValue();
>  System.out.println("Object value: "+o);
>  }
>
> I get this error:
> Fault code: soap:Client Fault string:
> 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)
>
> Is there something I am missing about the TargetObjectURI, as
> this seems to
> be different from calling a webservice from Apache-Soap.
>
> Thanks,
>
> Mike
>


RE: Trying to call a .NET Web Service

Posted by Mike Carney <mi...@webcarney.com>.
I could not find anything about the SOAPAction in the API, what is the call
to set the SOAPAction?

Thanks,
Mike

-----Original Message-----
From: T. Carson Hager [mailto:carson.hager@cynergysystems.com]
Sent: Monday, November 12, 2001 6:55 AM
To: soap-user@xml.apache.org
Subject: RE: Trying to call a .NET Web Service


You aren't setting the SOAPAction.  It should be set to the following:

http://www.PerfectXML.com/NETWebSvcs/BookService/GetAmazonSalesRank


Carson

__________________________________________________________

Carson Hager
Cynergy Systems, Inc.
Sybase Enterprise Application Studio Consulting and Training
http://www.cynergysystems.com



> -----Original Message-----
> From: Mike Carney [mailto:mike@webcarney.com]
> Sent: Monday, November 12, 2001 1:34 PM
> To: soap-user@xml.apache.org
> Subject: Trying to call a .NET Web Service
>
>
> Hello,
>
> I am trying to call a simple .NET webservice with the
> information about the
> webservice found at:
> http://www.xmethods.net/detail.html?id=192 with the
> following code:
>
> Call call = new Call();
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setTargetObjectURI ("PerfectXML.NET:SalesRankNPrice");
> call.setMethodName ("GetAmazonSalesRank");
> Vector params=new Vector();
> params.addElement (new Parameter ("ISBN", String.class,
> param1, null));
> call.setParams(params);
> URL url = new URL
> ("http://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookSe
> rvice.asmxhttp
> ://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookService.asmx");
> Response resp = call.invoke (url, "");
> if (resp.generatedFault()) {
>   Fault fault=resp.getFault();
>   System.out.println(" Fault code: " + fault.getFaultCode());
>   System.out.println(" Fault string: "+fault.getFaultString());
>             }
> else {
>  Parameter result=resp.getReturnValue();
>  Object o = result.getValue();
>  System.out.println("Object value: "+o);
>  }
>
> I get this error:
> Fault code: soap:Client Fault string:
> 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)
>
> Is there something I am missing about the TargetObjectURI, as
> this seems to
> be different from calling a webservice from Apache-Soap.
>
> Thanks,
>
> Mike
>


faultcode

Posted by Amit Rana <ra...@mbc2.co.jp>.
hi,

 can any body help me understand this faultcode?

<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>SoapMapper: Restoring data into SoapMapper string
failed</faultstring>

 where can we find all the fault codes and their description?

Regards,
Amit.


faultcode

Posted by Amit Rana <ra...@mbc2.co.jp>.
hi,

 can any body help me understand this faultcode?

<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>SoapMapper: Restoring data into SoapMapper string
failed</faultstring>

 where can we find all the fault codes and their description?

Regards,
Amit.


faultcode

Posted by Amit Rana <ra...@mbc2.co.jp>.
hi,

 can any body help me understand this faultcode?

(SOAP-ENV:Client): Unable to retrieve 'interface' property value

 where can we find all the fault codes and their description?

Regards,
Amit.

RE: Trying to call a .NET Web Service

Posted by Mike Carney <mi...@webcarney.com>.
I could not find anything about the SOAPAction in the API, what is the call
to set the SOAPAction?

Thanks,
Mike

-----Original Message-----
From: T. Carson Hager [mailto:carson.hager@cynergysystems.com]
Sent: Monday, November 12, 2001 6:55 AM
To: soap-user@xml.apache.org
Subject: RE: Trying to call a .NET Web Service


You aren't setting the SOAPAction.  It should be set to the following:

http://www.PerfectXML.com/NETWebSvcs/BookService/GetAmazonSalesRank


Carson

__________________________________________________________

Carson Hager
Cynergy Systems, Inc.
Sybase Enterprise Application Studio Consulting and Training
http://www.cynergysystems.com



> -----Original Message-----
> From: Mike Carney [mailto:mike@webcarney.com]
> Sent: Monday, November 12, 2001 1:34 PM
> To: soap-user@xml.apache.org
> Subject: Trying to call a .NET Web Service
>
>
> Hello,
>
> I am trying to call a simple .NET webservice with the
> information about the
> webservice found at:
> http://www.xmethods.net/detail.html?id=192 with the
> following code:
>
> Call call = new Call();
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setTargetObjectURI ("PerfectXML.NET:SalesRankNPrice");
> call.setMethodName ("GetAmazonSalesRank");
> Vector params=new Vector();
> params.addElement (new Parameter ("ISBN", String.class,
> param1, null));
> call.setParams(params);
> URL url = new URL
> ("http://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookSe
> rvice.asmxhttp
> ://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookService.asmx");
> Response resp = call.invoke (url, "");
> if (resp.generatedFault()) {
>   Fault fault=resp.getFault();
>   System.out.println(" Fault code: " + fault.getFaultCode());
>   System.out.println(" Fault string: "+fault.getFaultString());
>             }
> else {
>  Parameter result=resp.getReturnValue();
>  Object o = result.getValue();
>  System.out.println("Object value: "+o);
>  }
>
> I get this error:
> Fault code: soap:Client Fault string:
> 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)
>
> Is there something I am missing about the TargetObjectURI, as
> this seems to
> be different from calling a webservice from Apache-Soap.
>
> Thanks,
>
> Mike
>


faultcode

Posted by Amit Rana <ra...@mbc2.co.jp>.
hi,

 can any body help me understand this faultcode?

(SOAP-ENV:Client): Unable to retrieve 'interface' property value

 where can we find all the fault codes and their description?

Regards,
Amit.