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 / February 2006

Tip: Looking for answers? Try searching our database.

Link Error (error LNK2022) building a WebService Proxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
manfred - 19 Feb 2006 18:38 GMT
Hi Together,

I tried to build a webservice proxy using a wsdl, generated in the
sun/java world. I used the .Net 2003 Version, choosing there VC++. The
steps I did:
1. Visual C++ Projekte / "Konsoleanwendung (.Net)"
2. Projekt / Webverweis hinzuf?gen / lokal

I chose the wsdl, which were generated before within a WSAD environment
(style: RPC encoded). For me the wsdl looks like ok:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://prj.abc.de"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://prj.abc.de" xmlns:intf="http://prj.abc.de"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
 <schema elementFormDefault='qualified'
targetNamespace="http://prj.abc.de"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://prj.abc.de" xmlns:intf="http://prj.abc.de"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <element name="isAliveReturn" type="xsd:boolean"/>
  <element name="version" nillable="true" type="xsd:string"/>
  <element name="xmlData" nillable="true" type="xsd:string"/>
 </schema>
</wsdl:types>
  <wsdl:message name="isAliveResponse">
     <wsdl:part name="isAliveReturn" type="xsd:boolean"/>
  </wsdl:message>
  <wsdl:message name="isAliveRequest">
  </wsdl:message>
  <wsdl:portType name="ReiKoUploadWS">
     <wsdl:operation name="isAlive">
        <wsdl:input message="impl:isAliveRequest"
name="isAliveRequest"/>
        <wsdl:output message="impl:isAliveResponse"
name="isAliveResponse"/>
     </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="UploadReiKoWSSoapBinding"
type="impl:ReiKoUploadWS">
     <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="isAlive">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="isAliveRequest">
           <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://prj.abc.de" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="isAliveResponse">
           <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://prj.abc.de" use="encoded"/>
        </wsdl:output>
     </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ReiKoUploadWSService">
     <wsdl:port binding="impl:UploadReiKoWSSoapBinding"
name="UploadReiKoWS">
        <wsdlsoap:address
location="https://prj/services/UploadReiKoWS"/>
     </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Instantiating now a the web service proxy, I get the following Linker
Error:

stdafx.obj : warning LNK4227: Metadatenoperations-Warnung (00131189):
Doppelte Methoden mit nicht konsistenten Parameterinformationen
Methoden: isAlive; Typ: WebReference.ReiKoUploadWSService):
(0x08000002).
stdafx.obj : error LNK2022: Fehler bei der Metadatenoperation (80131195)
: Die benutzerdefinierten Attribute sind nicht konsistent: (0x0c000005).
LINK : fatal error LNK1255: Fehler bei der Verkn?pfung aufgrund von
Metadatenfehlern

What's wrong with the wsdl, or is there any other error? It must be
possible to combine the Microsoft and the sun world.

Thanks in advance for your help,
Manfred

Manfred, Munich

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
manfred - 23 Feb 2006 11:18 GMT
Hi,

It's a non interoperability problem. I solved the problem myself by
finding an acceptable workaround. After changing the return value types
from boolean to string, no more linking errors occured. I hope I can
help with that hint other guys having similar problems.

With regards,
Manfred

Manfred, Munich

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

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.