Hi,
the problem is: .NET Webservice use default "literal"
you have to set it to rpc:
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xGetStoreInfo",
RequestNamespace="urn:xGetStoreInfoRequest", ResponseNamespace
="urn:xGetStoreInfoResponse")]
the result will be:
soapaction: urn:xGetStoreInfo
input:namespace: urn:xGetStoreInfoRequest
This both infos you will need for the client (compare to my client)
use it in that way:
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xGetStoreInfo",
RequestNamespace="urn:xGetStoreInfoRequest", ResponseNamespace
="urn:xGetStoreInfoResponse")]
[WebMethod(Description="bla bla bla",EnableSession=true)]
public storeinfo GetStoreInfo(string id)
{
setInfo(id);
storeinfo aStoreDetails = new storeinfo();
...
This tell the service to use the soapRPC and not literal.
I think, Apache Soap has some probleme with the literal.
(tell me if i am telling something wrong...this help me to understand SOAP
;o) )
This should help ;o)
tell me if it works ...
cheers......
TheMotorcycles@inf
omedica.it To: [EMAIL PROTECTED]
cc:
29.08.2001 16:55 Subject: Rif: Re: Rif: Re: .NET
service
Please respond to
soap-user
hoang,
i have many differences from your wsdl.
the style of soap:binding transport is 'document' and not 'rpc'.
when i do a call like this,
http://localhost:8040/hello3server/service1.asmx?wsdl, with my browser, the
result a more larger xml document than your.
<?xml version="1.0" encoding="utf-8" ?>
- <definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:s0="http://tempuri.org/
" targetNamespace="http://tempuri.org/" xmlns="
http://schemas.xmlsoap.org/wsdl/">
- <types>
- <s:schema attributeFormDefault="qualified" elementFormDefault="
qualified" targetNamespace="http://tempuri.org/">
- <s:element name="HelloWorld">
- <s:complexType>
- <s:sequence>
� <s:element minOccurs="1" maxOccurs="1" name="sName"
nillable="true" type="s:string" />
� </s:sequence>
� </s:complexType>
� </s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
� <s:element minOccurs="1" maxOccurs="1" name="
HelloWorldResult" nillable="true" type="s:string" />
� </s:sequence>
� </s:complexType>
� </s:element>
� <s:element name="string" nillable="true" type="s:string" />
� </s:schema>
� </types>
- <message name="HelloWorldSoapIn">
� <part name="parameters" element="s0:HelloWorld" />
� </message>
- <message name="HelloWorldSoapOut">
� <part name="parameters" element="s0:HelloWorldResponse" />
� </message>
- <message name="HelloWorldHttpGetIn">
� <part name="sName" type="s:string" />
� </message>
- <message name="HelloWorldHttpGetOut">
� <part name="Body" element="s0:string" />
� </message>
- <message name="HelloWorldHttpPostIn">
� <part name="sName" type="s:string" />
� </message>
- <message name="HelloWorldHttpPostOut">
� <part name="Body" element="s0:string" />
� </message>
- <portType name="Service1Soap">
- <operation name="HelloWorld">
� <input message="s0:HelloWorldSoapIn" />
� <output message="s0:HelloWorldSoapOut" />
� </operation>
� </portType>
- <portType name="Service1HttpGet">
- <operation name="HelloWorld">
� <input message="s0:HelloWorldHttpGetIn" />
� <output message="s0:HelloWorldHttpGetOut" />
� </operation>
� </portType>
- <portType name="Service1HttpPost">
- <operation name="HelloWorld">
� <input message="s0:HelloWorldHttpPostIn" />
� <output message="s0:HelloWorldHttpPostOut" />
� </operation>
� </portType>
- <binding name="Service1Soap" type="s0:Service1Soap">
� <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
- <operation name="HelloWorld">
� <soap:operation soapAction="http://tempuri.org/HelloWorld" style
="document" />
- <input>
� <soap:body use="literal" />
� </input>
- <output>
� <soap:body use="literal" />
� </output>
� </operation>
� </binding>
- <binding name="Service1HttpGet" type="s0:Service1HttpGet">
� <http:binding verb="GET" />
- <operation name="HelloWorld">
� <http:operation location="/HelloWorld" />
- <input>
� <http:urlEncoded />
� </input>
- <output>
� <mime:mimeXml part="Body" />
� </output>
� </operation>
� </binding>
- <binding name="Service1HttpPost" type="s0:Service1HttpPost">
� <http:binding verb="POST" />
- <operation name="HelloWorld">
� <http:operation location="/HelloWorld" />
- <input>
� <mime:content type="application/x-www-form-urlencoded" />
� </input>
- <output>
� <mime:mimeXml part="Body" />
� </output>
� </operation>
� </binding>
- <service name="Service1">
- <port name="Service1Soap" binding="s0:Service1Soap">
� <soap:address location="
http://localhost:8040/hello3server/service1.asmx" />
� </port>
- <port name="Service1HttpGet" binding="s0:Service1HttpGet">
� <http:address location="
http://localhost:8040/hello3server/service1.asmx" />
� </port>
- <port name="Service1HttpPost" binding="s0:Service1HttpPost">
� <http:address location="
http://localhost:8040/hello3server/service1.asmx" />
� </port>
� </service>
� </definitions>
i'm trying your client....
federico
Cong.Hoang.Hoang@
namics.com Per:
[EMAIL PROTECTED]
Cc:
08/29/2001 03:19 Oggetto: Re: Rif: Re: .NET
service
PM
Per favore,
rispondere a
soap-user
Hi federico,
seems, your soapaction is incorrect.
show me your binding for soap.
this is mine:
<binding name="myStoreSoap" type="s1:myStoreSoap">
� <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
<operation name="GetStoreInfo">
� <soap:operation soapAction="urn:xGetStoreInfo" style="rpc" />
<input>
� <soap:body use="encoded" namespace="urn:xGetStoreInfoRequest"
encodingStyle="ttp://schemas.xmlsoap.org/soap/encoding/"
/>
� </input>
<output>
� <soap:body use="encoded" namespace="urn:xGetStoreInfoResponse"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
� </output>
� </operation>
� </binding>
Beware:
soapaction: urn:xGetStoreInfo
MethodeURI: urn:xGetStoreInfoRequest
this is impotant to know where to find which uri.
greets
Hoang
------------------------------------------------
original post:
...
i receive this error
Generated fault:
Fault Code = soap:Client
Fault String = System.Web.Services.Protocols.SoapException: Server did not
recognize the value of HTTP Header SOAPAction:
http://tempuri.org/action/Service1.HelloWorld.
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
Http Context context, HttpRequest request, HttpResponse response)
where is my error?
federico