Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2008

Tip: Looking for answers? Try searching our database.

Try to make a web service out of a wsdl ...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
g-forsmo@hotmail.com - 29 Feb 2008 14:08 GMT
Hi!

Can I ask you to try this?

Below you see a wsdl? could you try to make a .NET web service out of
ths wsdl (under localhost)? Some criterias must be met in the new .net
web service:

- target namespace must be the same (http://no/brreg/BReMS/WebService/
services) and
 <s0:service name="OutboundLegacyDataReceiverService">
   <s0:port binding="s1:OutboundLegacyDataReceiverServiceSoapBinding"
name="OutboundLegacyDataReceiverSoapPort">

I need a web service that is exactly the same (except address location
of course).

When testing the new web service method it should be like this

string ret = objWS.submitMessage(cpaid, securitykey, message);

regards
Geir F

----

<?xml version='1.0' encoding='UTF-8'?>
<s0:definitions name="OutboundLegacyDataReceiverServiceDefinitions"
targetNamespace="http://no/brreg/BReMS/WebService/services" xmlns=""
xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://no/brreg/
BReMS/WebService/services" xmlns:s2="http://schemas.xmlsoap.org/wsdl/
soap/">
 <s0:types>
   <xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" targetNamespace="http://no/brreg/BReMS/
WebService/services" xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
xmlns:s1="http://no/brreg/BReMS/WebService/services" xmlns:s2="http://
schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/
XMLSchema">
     <xs:element name="submitMessage">
       <xs:complexType>
         <xs:sequence>
           <xs:element name="cpaid" type="xs:string"/>
           <xs:element name="securitykey" type="xs:string"/>
           <xs:element name="message" type="xs:string"/>
         </xs:sequence>
       </xs:complexType>
     </xs:element>
     <xs:element name="submitMessageResponse">
       <xs:complexType>
         <xs:sequence>
           <xs:element name="return" type="xs:string"/>
         </xs:sequence>
       </xs:complexType>
     </xs:element>
   </xs:schema>
 </s0:types>
 <s0:message name="submitMessage">
   <s0:part element="s1:submitMessage" name="parameters"/>
 </s0:message>
 <s0:message name="submitMessageResponse">
   <s0:part element="s1:submitMessageResponse" name="parameters"/>
 </s0:message>
 <s0:portType name="OutboundLegacyDataReceiver">
   <s0:operation name="submitMessage" parameterOrder="parameters">
     <s0:input message="s1:submitMessage"/>
     <s0:output message="s1:submitMessageResponse"/>
   </s0:operation>
 </s0:portType>
 <s0:binding name="OutboundLegacyDataReceiverServiceSoapBinding"
type="s1:OutboundLegacyDataReceiver">
   <s2:binding style="document" transport="http://schemas.xmlsoap.org/
soap/http"/>
   <s0:operation name="submitMessage">
     <s2:operation soapAction="" style="document"/>
     <s0:input>
       <s2:body parts="parameters" use="literal"/>
     </s0:input>
     <s0:output>
       <s2:body parts="parameters" use="literal"/>
     </s0:output>
   </s0:operation>
 </s0:binding>
 <s0:service name="OutboundLegacyDataReceiverService">
   <s0:port binding="s1:OutboundLegacyDataReceiverServiceSoapBinding"
name="OutboundLegacyDataReceiverSoapPort">
     <s2:address location="https://wss-test.brreg.no:443/BReMS/
WebService/OutboundLegacyDataReceiver"/>
   </s0:port>
 </s0:service>
</s0:definitions>
John Saunders [MVP] - 01 Mar 2008 20:05 GMT
> Hi!
>
[quoted text clipped - 16 lines]
>
> string ret = objWS.submitMessage(cpaid, securitykey, message);

I tried this, but couldn't find a way to specify the port name.

You are making a serious design error. Consider:

* Your callers have published a WSDL defining the contract they expect you
to adhere to. They have a database listing the URL for the WSDL (and
hopefully also the address) of the service they want you to implement. This
means that they have created a static contract that they require you to
fulfill.
* On the other hand, you're trying to figure out how to get .NET to look at
a class you've created and to get it to generate the same WSDL.

You are trying to dynamically generate a static WSDL. That's a mistake.
Instead, serve the WSDL at some location in your web server; have them place
that URL into their database; then, write your web service to be callable by
your caller. Do not expect .NET to dynamically generate something static.

BTW, if they are using the WSDL at runtime to dynamically generate the proxy
code that they will then use to call your code, then they, too are making a
mistake. If the WSDL is static, then they should be using a statically
created proxy class, not a dynamically created proxy
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
class.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.