Re: Dynamic web service methods

Tech-Archive recommends: Speed Up your PC by fixing your registry





"blackhawk" <blackhawk@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:7D66267A-C83A-43F7-BAF7-BE8CF80BF525@xxxxxxxxxxxxxxxx

John,

I have been able to get behind the web service using IHttpHandler and
construct most of the WSDL from the ServiceDescriptions, but I am stuck on
several aspects:

1) When I programmatically create a schema and then compile it (using a
SchemaSet or just the Schema itself), it does not get included in generated
WSDL. I don't get any errors, just nothing happens.

2) Aside from that, now that I have augmented the WSDL and created a new
operation, I am not sure how to properly intercept the method call and then
return the appropriate soap response. I always get a message that the
response could not be parsed.

What I attempted to do was intercept the POST request and send back a soap
response that looks like:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:tns="http://tempuri.org/"; xmlns:s="http://www.w3.org/2001/XMLSchema";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
targetNamespace="http://tempuri.org/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
<soap:Body>
<Result>
<option>test</option>
<value>test</value>
</Result>
</soap:Body>
</soap:Envelope>


And here is the WSDL that I generated


A quick read of your WSDL shows that the response should be more like this:

<soap:Envelope>
<soap:Body>
<SampleViewResponse>
<SubsetResult/>
<SubsetResult/>
</SampleViewResponse>
</soap:Body>
</soap:Envelope>

--
--------------------------------------------------------------------------------
John Saunders | MVP – Windows Server System – Connected System Developer


.



Relevant Pages

  • .NET based SOAP client inter-op issue with Apache Axis based web service
    ... I've developed a web service using Apache Axis 1.4 (WSDL shown at the bottom ... as I can tell the SOAP response emitted by Axis looks ok. ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: dynamic xsd to webservice
    ... It's not as simple as just adding the XSD file itself to the WSDL, ... linking into the WSDL-generation system of ASP.Net, ... I'd like that schema to be part of the ... > in the web service, but the problem with that is that the schema could change ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: dynamic xsd to webservice
    ... with the web service and expose the schema in the wsdl and enable schema ... validation in the web service so as to keep me from having to validate the ... > I'm not 100% certain that you can add external schemas to your WSDL (I've ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WSDL.exe vs. "Add Web Reference"
    ... For example this complexType: ... I them created a WSDL using the XSD. ... Then I placed this file in an "Empty Web Project", added a Web Service, made ... If I do all these steps correctly the client should ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: .NET based SOAP client inter-op issue with Apache Axis based w
    ... I've developed a web service using Apache Axis 1.4 (WSDL shown at the ... defining a ServiceDescriptor array in the WSDL (without the ServiceList ...
    (microsoft.public.dotnet.framework.webservices)