By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 769 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

SOAP Error talking to Webservice on Apache/Axis

P: n/a
Hi Newsgroup,

im currently working on programming a asp.net application consuming an
Webservice hosted on Apache/Axis. I have generated WSDL and Proxy
classes from VisualStudio.net. But when trying to fire up one method i
get following error:

System.Web.Services.Protocols.SoapHeaderException: Method
'tns:prodsearch' not implemented

Line 55: [return:
System.Xml.Serialization.SoapElementAttribute("err orCode")]
Line 56: public int prodsearch(prodsearchreq reqp, out string
errorMsg, out prodsearchresponse resp) {
Line 57: object[] results = this.Invoke("prodsearch", new
object[] {
Line 58: reqp});
Line 59: errorMsg = ((string)(results[1]));
[SoapHeaderException: Method 'tns:prodsearch' not implemented]

System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
multibooker.WsBookingService.BookingService.prodse arch(prodsearchreq
reqp, String& errorMsg, prodsearchresponse& resp) in
C:\Projekte\multibooker_2.0\multibooker_sol\multib ooker\Web
References\WsBookingService\Reference.cs:57
multibooker.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\projekte\multibooker_2.0\multibooker_sol\multib ooker\default.aspx.cs:45
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

The error is thrown on line 57!

I have impleneted the TraceExtension Example from MSDN and get the
following SOAP Protocols:

-----SoapRequest at 15.08.2003 12:08:51
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://websvc.worldres.com/BookingService"
xmlns:types="http://websvc.worldres.com/BookingService/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><tns:prodsearch><reqp
href="#id1" /></tns:prodsearch><tns:prodsearch-req id="id1"
xsi:type="tns:prodsearch-req"><token
xsi:type="xsd:string">55TVLISD34</token><langId
xsi:type="xsd:int">1</langId><currency
xsi:type="xsd:string">USD</currency><checkInDay
xsi:type="xsd:int">10</checkInDay><checkInMonth
xsi:type="xsd:int">9</checkInMonth><checkInYear
xsi:type="xsd:int">2003</checkInYear><numNights
xsi:type="xsd:int">1</numNights><hotelId
xsi:type="xsd:int">6484</hotelId><capacityType
xsi:type="xsd:int">1</capacityType><priceId
xsi:type="xsd:int">1</priceId><numAdult
xsi:type="xsd:int">1</numAdult><numChild
xsi:type="xsd:int">0</numChild><numRoom
xsi:type="xsd:int">1</numRoom></tns:prodsearch-req></soap:Body></soap:Envelope>
-----SoapResponse at 15.08.2003 12:08:55
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://websvc.worldres.com/BookingService"><SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Method
&apos;tns:prodsearch&apos; not
implemented</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

-----SoapRequest at 15.08.2003 12:30:13
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://websvc.worldres.com/BookingService"
xmlns:types="http://websvc.worldres.com/BookingService/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><tns:prodsearch><reqp
href="#id1" /></tns:prodsearch><tns:prodsearch-req id="id1"
xsi:type="tns:prodsearch-req"><token
xsi:type="xsd:string">TEST</token><langId
xsi:type="xsd:int">1</langId><currency
xsi:type="xsd:string">USD</currency><checkInDay
xsi:type="xsd:int">10</checkInDay><checkInMonth
xsi:type="xsd:int">9</checkInMonth><checkInYear
xsi:type="xsd:int">2003</checkInYear><numNights
xsi:type="xsd:int">1</numNights><hotelId
xsi:type="xsd:int">6484</hotelId><capacityType
xsi:type="xsd:int">1</capacityType><priceId
xsi:type="xsd:int">1</priceId><numAdult
xsi:type="xsd:int">1</numAdult><numChild
xsi:type="xsd:int">0</numChild><numRoom
xsi:type="xsd:int">1</numRoom></tns:prodsearch-req></soap:Body></soap:Envelope>

-----SoapResponse at 15.08.2003 12:30:17
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://websvc.worldres.com/BookingService"><SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Method
&apos;tns:prodsearch&apos; not
implemented</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

Any help appreciated.

Artur

Nov 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello,

One method to reformat the message is as following:

Change the function name in the generated code:

public int prod_search(prodsearchreq reqp, out string errorMsg, out
prodsearchresponse resp) {
object[] results = this.Invoke("prod_search", new object[] {reqp});
errorMsg = ((string)(results[1]));
resp = ((prodsearchresponse)(results[2]));
return ((int)(results[0]));
}

Please note that I changed it to prod_search, so the generated message is:

<tns:prod_search>
....
</tns:prod_search>

Therefore, to make the generated message looks like
<tns:prod-search>...</tns:prod-search>, you should change the function name
to prod-search, which is not a valid name.

After I changed the function name to prod_search, and then I invoked your
web method using the following code:

com.worldres.wsqa.BookingService bs = new
com.worldres.wsqa.BookingService();

string err;
wsclient.com.worldres.wsqa.prodsearchreq prodreq = new
wsclient.com.worldres.wsqa.prodsearchreq();
wsclient.com.worldres.wsqa.prodsearchresponse prodres = new
wsclient.com.worldres.wsqa.prodsearchresponse();

bs.prod_search(prodreq, out err, out prodres);
Console.WriteLine (err);

I got WS_ERR_SITE ws_sm_login error in the console window.

It seems to work, right?

However, it is not recommened to modify the generated code, please modify
the service on the Apache.
--
Parker Zhang
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 11 '05 #2

P: n/a
>It seems to work, right?
yes it works. But now im struggling with another error
with arrays and classes serialization.
However, it is not recommened to modify the generated
code, please modify
the service on the Apache.

I will try to forward this to our partner. Maybe they will
modify the Service on the Apache-Side.

Artur
Nov 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.