|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Creating a Web Service (Service, not Client) from WSDLHi
I understand, that the "normal way" in creating Web Services is: Creating Web Service --> WSDL --> Creating Client Unfortunately, I have to create a Web Service (Service, not Clinet) from an existing WSDL. Can somebody tell me, what's the right way to do this? Any hint is much appreciated. Bert Leu > Unfortunately, I have to create a Web Service (Service, not Clinet) from So in other words you have to reverse engineer a already existing webservice> an > existing WSDL. This task should be easy , as the WSDL describes the method signatures you only have to rewrite the logic in the methods , if you would create a webservice with empty methods in the same style as the wsdl describes you should end up with a same wsdl signature Show quoteHide quote "Bert Leu" <bol***@swissonline.ch> schreef in bericht news:be33c$474722d3$54480741$9085@news.hispeed.ch... > Hi > > I understand, that the "normal way" in creating Web Services is: > > Creating Web Service --> WSDL --> Creating Client > > Unfortunately, I have to create a Web Service (Service, not Clinet) from > an > existing WSDL. > > Can somebody tell me, what's the right way to do this? > > Any hint is much appreciated. > > Bert Leu > > !! if you would create a
!! webservice with empty methods in the same style as the wsdl describes you and that - exactly - is my problem: how do I create a webservice with empty methode from an existing wsdl ? Show quoteHide quote "Michel Posseth [MCP]" <M***@posseth.com> schrieb im Newsbeitrag news:OooHyRnLIHA.5684@TK2MSFTNGP04.phx.gbl... >> Unfortunately, I have to create a Web Service (Service, not Clinet) from >> an >> existing WSDL. > > So in other words you have to reverse engineer a already existing > webservice > > This task should be easy , as the WSDL describes the method signatures you > only have to rewrite the logic in the methods , if you would create a > webservice with empty methods in the same style as the wsdl describes you > should end up with a same wsdl signature > > > "Bert Leu" <bol***@swissonline.ch> schreef in bericht > news:be33c$474722d3$54480741$9085@news.hispeed.ch... >> Hi >> >> I understand, that the "normal way" in creating Web Services is: >> >> Creating Web Service --> WSDL --> Creating Client >> >> Unfortunately, I have to create a Web Service (Service, not Clinet) from >> an >> existing WSDL. >> >> Can somebody tell me, what's the right way to do this? >> >> Any hint is much appreciated. >> >> Bert Leu >> >> > > afaik there is not an automated task to do something like that
Declare the same public methods with identical method signatures and optionally structures and that`s it <EXAMPLE> <?xml version="1.0" encoding="utf-8" ?> - <wsdl:definitions 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://www.nohausystems.com/NHSService/NHSData" 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://www.nohausystems.com/NHSService/NHSData" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - <wsdl:types> - <s:schema elementFormDefault="qualified" targetNamespace="http://www.nohausystems.com/NHSService/NHSData"> - <s:element name="GetData"> - <s:complexType> - <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="strXML" type="s:string" /> </s:sequence> </s:complexType> </s:element> - <s:element name="GetDataResponse"> - <s:complexType> - <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="GetDataResult" type="s:boolean" /> <s:element minOccurs="0" maxOccurs="1" name="strXML" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> - <wsdl:message name="GetDataSoapIn"> <wsdl:part name="parameters" element="tns:GetData" /> </wsdl:message> - <wsdl:message name="GetDataSoapOut"> <wsdl:part name="parameters" element="tns:GetDataResponse" /> </wsdl:message> - <wsdl:portType name="NHSDataSoap"> - <wsdl:operation name="GetData"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">platform independent interface wrapper to NHSBL.dll , Version 2.0 , - : Last mod to this service binary 07-12-2005 , Made by : Michel Posseth [Microsoft Certified Professional] , info : m.poss***@nohausystems.com</wsdl:documentation> <wsdl:input message="tns:GetDataSoapIn" /> <wsdl:output message="tns:GetDataSoapOut" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="NHSDataSoap" type="tns:NHSDataSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetData"> <soap:operation soapAction="http://www.nohausystems.com/NHSService/NHSData/GetData" style="document" /> - <wsdl:input> <soap:body use="literal" /> </wsdl:input> - <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:binding name="NHSDataSoap12" type="tns:NHSDataSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="GetData"> <soap12:operation soapAction="http://www.nohausystems.com/NHSService/NHSData/GetData" style="document" /> - <wsdl:input> <soap12:body use="literal" /> </wsdl:input> - <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="NHSData"> - <wsdl:port name="NHSDataSoap" binding="tns:NHSDataSoap"> <soap:address location="http://192.168.1.13:8080/nhsdata.asmx" /> </wsdl:port> - <wsdl:port name="NHSDataSoap12" binding="tns:NHSDataSoap12"> <soap12:address location="http://192.168.1.13:8080/nhsdata.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions> what does the above WSDL tell us ? it tells us that the binary name is NHSData it tells us that the full namespace of the service is http://www.nohausystems.com/NHSService/NHSData ( ofcourse you must modify these namespaces to your own ) it tells us this webservice contains of one method named GetData with a byref parameter called strXML ( it comes in and goes out so it must be a byref parameter ) The method itself returns a Boolean so it must be a function reverse engineering this WSDL would result in ofcourse we still don`t know what happens inside the GetData method Public Class NHSData Inherits System.Web.Services.WebService ''' <summary> ''' made by : Michel Posseth [MCP] ''' last rev : 07-12-2005 by MP (dd-mm-yyyy) ''' version : 2.0 ''' </summary> ''' <param name="strXML"></param> ''' <returns>boolean as return type and byref param strxml as string </returns> ''' <remarks>Upgraded 05-12-2005 to VS.Net 2005 </remarks> <WebMethod(Description:="platform independent interface wrapper to NHSBL.dll , Version 2.0 , - : Last mod to this service binary 07-12-2005 , Made by : Michel Posseth [Microsoft Certified Professional] , info : m.poss***@nohausystems.com")> _ Public Function GetData(ByRef strXML As String) As Boolean '' code omitted End Function End Class </EXAMPLE> HTH Michel Show quoteHide quote "Bert Leu" <bol***@swissonline.ch> schreef in bericht news:8e20e$474825de$54480741$7481@news.hispeed.ch... > !! if you would create a > !! webservice with empty methods in the same style as the wsdl > describes you > > and that - exactly - is my problem: how do I create a webservice with > empty methode from an existing wsdl ? > > > > > "Michel Posseth [MCP]" <M***@posseth.com> schrieb im Newsbeitrag > news:OooHyRnLIHA.5684@TK2MSFTNGP04.phx.gbl... >>> Unfortunately, I have to create a Web Service (Service, not Clinet) >>> from an >>> existing WSDL. >> >> So in other words you have to reverse engineer a already existing >> webservice >> >> This task should be easy , as the WSDL describes the method signatures >> you only have to rewrite the logic in the methods , if you would create a >> webservice with empty methods in the same style as the wsdl describes you >> should end up with a same wsdl signature >> >> >> "Bert Leu" <bol***@swissonline.ch> schreef in bericht >> news:be33c$474722d3$54480741$9085@news.hispeed.ch... >>> Hi >>> >>> I understand, that the "normal way" in creating Web Services is: >>> >>> Creating Web Service --> WSDL --> Creating Client >>> >>> Unfortunately, I have to create a Web Service (Service, not Clinet) >>> from an >>> existing WSDL. >>> >>> Can somebody tell me, what's the right way to do this? >>> >>> Any hint is much appreciated. >>> >>> Bert Leu >>> >>> >> >> > >
Advice Required - Vb or Not VB (or even .NET)
Multithreading dilemma Weird bug Trouble with sendkey TAB Reurning Arrays Saving an image from a picturebox Please vote for rendering bug (loss of AlphaChannel) for ico-files! Server Explorer - VS 2005 Passing a ColorPalette as an argument Building GUIs with VB.Net (from a VB.Net beginner) |
|||||||||||||||||||||||