471,620 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,620 software developers and data experts.

wsdl missing type definition (remoting over soap)

I have simple remoting server exposing following simple method. When I try to
add webreference to this server in another project,
it gives me following error:
Custom tool error: Unable to import WebService/Schema. Unable to import
binding 'MyRemoteObjectBinding' from namespace
'http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull'.
Unable to import operation 'GetEmpInfo'.
The datatype
'http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess/Brooks.EES.Framework.DataStructure%2C%20Version%3D 1.0.1.1%2C%20Culture%3Dneutral%2C%20PublicKeyToken %3Dbbf6413da47c0685:EmpDetail' is missing.
After some tests, following are my findings.
1. Currently EmpDetail class is defined in different namespace and different
DLL from the remoting server.
2. In this setup, ?wsdl generates wsdl which is missing the type definition
of the EmpDetails, which is resulting in above error.

3. If I remove get/set methods from the EmpDetail class, ?wsdl generates
correct wsdl with EmpDetalis type definition in the wsdl.
4. If I define EmpDetails class in the same namesapce and same dll (no
change in the EmpDetails definition), ?wsdl generates correct wsdl with the
type definition of EmpDetail calss.

Im I missing something? or How can I instruct ?wsdl to include all type
definition.

----------------------------------------------------------------------------
Example Code: RemoteServer
----------------------------------------------------------------------------
using Brooks.EES.Framework.DataAccess;
namespace RemoteServer
{
class MyRemoteObject : System.MarshalByRefObject
{
public EmpDetail GetEmpInfo()
{
return new EmpDetail();
}
}
}

namespace Brooks.EES.Framework.DataAccess
{
[Serializable]
public class EmpDetail
{
private string _Id;
private string _description;

public string Id
{
get
{
return _Id;
}
set
{
_Id = value;
}
}

public string Description
{
get
{
return _description;
}
set
{
_description = value;
}
}
}
}

-----------------------------------------------------------------------------
Here is the wsdl snipate which is missing type definition.
-----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="MyRemoteObject"
targetNamespace="http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:suds="http://www.w3.org/2000/wsdl/suds"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns:ns0="http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns:ns1="http://schemas.microsoft.com/clr/ns/System"
xmlns:ns3="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess/Brooks.EES.Framework.DataStructure%2C%20Version%3D 1.0.1.1%2C%20Culture%3Dneutral%2C%20PublicKeyToken %3Dbbf6413da47c0685"
xmlns:ns4="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure%2C%20Version%3D 1.0.1.1%2C%20Culture%3Dneutral%2C%20PublicKeyToken %3Dbbf6413da47c0685"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<message name="MyRemoteObject.GetEmpInfoInput">
</message>
<message name="MyRemoteObject.GetEmpInfoOutput">
<part name="return" type="ns3:EmpDetail"/>
</message>

<portType name="MyRemoteObjectPortType">
<operation name="GetEmpInfo">
<input name="GetEmpInfoRequest"
message="tns:MyRemoteObject.GetEmpInfoInput"/>
<output name="GetEmpInfoResponse"
message="tns:MyRemoteObject.GetEmpInfoOutput"/>
</operation>
</portType>

<binding name="MyRemoteObjectBinding" type="tns:MyRemoteObjectPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<suds:class type="ns0:MyRemoteObject" rootType="MarshalByRefObject">
</suds:class>
<operation name="GetEmpInfo">
<soap:operation
soapAction="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer#GetEmpInfo"/>
<suds:method attributes="public"/>
<input name="GetEmpInfoRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer"/>
</input>
<output name="GetEmpInfoResponse">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer"/>
</output>
</operation>
</binding>

<message name="EmpDetail.get_IdInput">
</message>
<message name="EmpDetail.get_IdOutput">
<part name="return" type="xsd:string"/>
</message>

<message name="EmpDetail.set_IdInput">
<part name="value" type="xsd:string"/>
</message>
<message name="EmpDetail.set_IdOutput">
</message>

<message name="EmpDetail.get_DescriptionInput">
</message>
<message name="EmpDetail.get_DescriptionOutput">
<part name="return" type="xsd:string"/>
</message>

<message name="EmpDetail.set_DescriptionInput">
<part name="value" type="xsd:string"/>
</message>
<message name="EmpDetail.set_DescriptionOutput">
</message>

<portType name="EmpDetailPortType">
<operation name="get_Id">
<input name="get_IdRequest" message="tns:EmpDetail.get_IdInput"/>
<output name="get_IdResponse"
message="tns:EmpDetail.get_IdOutput"/>
</operation>
<operation name="set_Id" parameterOrder="value">
<input name="set_IdRequest" message="tns:EmpDetail.set_IdInput"/>
<output name="set_IdResponse"
message="tns:EmpDetail.set_IdOutput"/>
</operation>
<operation name="get_Description">
<input name="get_DescriptionRequest"
message="tns:EmpDetail.get_DescriptionInput"/>
<output name="get_DescriptionResponse"
message="tns:EmpDetail.get_DescriptionOutput"/>
</operation>
<operation name="set_Description" parameterOrder="value">
<input name="set_DescriptionRequest"
message="tns:EmpDetail.set_DescriptionInput"/>
<output name="set_DescriptionResponse"
message="tns:EmpDetail.set_DescriptionOutput"/>
</operation>
</portType>

<binding name="EmpDetailBinding" type="tns:EmpDetailPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<suds:class type="ns3:EmpDetail">
</suds:class>
<operation name="get_Id">
<soap:operation
soapAction="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure#get_Id"/>
<suds:method attributes="public"/>
<input name="get_IdRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</input>
<output name="get_IdResponse">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</output>
</operation>
<operation name="set_Id">
<soap:operation
soapAction="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure#set_Id"/>
<suds:method attributes="public"/>
<input name="set_IdRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</input>
<output name="set_IdResponse">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</output>
</operation>
<operation name="get_Description">
<soap:operation
soapAction="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure#get_Description "/>
<suds:method attributes="public"/>
<input name="get_DescriptionRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</input>
<output name="get_DescriptionResponse">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</output>
</operation>
<operation name="set_Description">
<soap:operation
soapAction="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure#set_Description "/>
<suds:method attributes="public"/>
<input name="set_DescriptionRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</input>
<output name="set_DescriptionResponse">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess.EmpDetail/Brooks.EES.Framework.DataStructure"/>
</output>
</operation>
</binding>

<service name="MyRemoteObjectService">
<port name="MyRemoteObjectPort" binding="tns:MyRemoteObjectBinding">
<soap:address location="http://localhost:8086/x.MyTest"/>
</port>
</service>
</definitions>



-----------------------------------------------------------------
Here is the correct wsdl with type information:
------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="MyRemoteObject"
targetNamespace="http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:suds="http://www.w3.org/2000/wsdl/suds"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns:ns0="http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3 Dneutral%2C%20PublicKeyToken%3Dnull"
xmlns:ns1="http://schemas.microsoft.com/clr/ns/System"
xmlns:ns3="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess/Brooks.EES.Framework.DataStructure%2C%20Version%3D 1.0.1.1%2C%20Culture%3Dneutral%2C%20PublicKeyToken %3Dbbf6413da47c0685"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema
targetNamespace="http://schemas.microsoft.com/clr/nsassem/Brooks.EES.Framework.DataAccess/Brooks.EES.Framework.DataStructure%2C%20Version%3D 1.0.1.1%2C%20Culture%3Dneutral%2C%20PublicKeyToken %3Dbbf6413da47c0685"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<element name="EmpDetail" type="ns3:EmpDetail"/>
<complexType name="EmpDetail">
<all>
<element name="_Id" type="xsd:string"/>
<element name="_description" type="xsd:string"/>
</all>
</complexType>
</schema>
</types>

<message name="MyRemoteObject.GetEmpInfoInput">
</message>
<message name="MyRemoteObject.GetEmpInfoOutput">
<part name="return" type="ns3:EmpDetail"/>
</message>

<portType name="MyRemoteObjectPortType">
<operation name="GetEmpInfo">
<input name="GetEmpInfoRequest"
message="tns:MyRemoteObject.GetEmpInfoInput"/>
<output name="GetEmpInfoResponse"
message="tns:MyRemoteObject.GetEmpInfoOutput"/>
</operation>
</portType>

<binding name="MyRemoteObjectBinding" type="tns:MyRemoteObjectPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<suds:class type="ns0:MyRemoteObject" rootType="MarshalByRefObject">
</suds:class>
<operation name="GetEmpInfo">
<soap:operation
soapAction="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer#GetEmpInfo"/>
<suds:method attributes="public"/>
<input name="GetEmpInfoRequest">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer"/>
</input>
<output name="GetEmpInfoResponse">
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://schemas.microsoft.com/clr/nsassem/RemoteServer.MyRemoteObject/RemoteServer"/>
</output>
</operation>
</binding>

<portType name="EmpDetailPortType">
</portType>

<binding name="EmpDetailBinding" type="tns:EmpDetailPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<suds:class type="ns3:EmpDetail">
</suds:class>
</binding>

<service name="MyRemoteObjectService">
<port name="MyRemoteObjectPort" binding="tns:MyRemoteObjectBinding">
<soap:address location="http://localhost:8086/x.MyTest"/>
</port>
</service>
</definitions>
Feb 24 '06 #1
0 4664

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by joewhitehair | last post: by
1 post views Thread by Carsten Posingies | last post: by
1 post views Thread by billa1972 | last post: by
2 posts views Thread by pshvarts | last post: by
1 post views Thread by E11 | last post: by
13 posts views Thread by ScottM | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.