Hi Drew,,
Yes, if I call the "GetRegistratins"-function, it returns a object
containing an array of two XmlAttributes and one XmlElement ?
Unfortunly this is for my work, so I just can't supply you, with all
information eg. the url to the servece,, until a have talked to my boss. :o(
...
But anyhow, below is the "WSDL-definition"
, in a littel changes format :o)
The things i've changes:
Is the
url's to my service to "http://xxx.xx/Webservices/Registration"
And som of the names,,
But else it's idendical...
Is this enough,, or do you whant the url to the WSDL??
And ofcouse im interested in learning asynchronus calls to
the web method, afterwards :o),,, You never get to old to learn something
new :o)....
Thanks
Henrik
************************WSDL Definitions****************************
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://xxx.xx/Webservices/Registration"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://xxx.xx/Webservices/Registration"
xmlns:intf="http://xxx.xx/Webservices/Registration"
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:message name="GetRegistrations2Request">
<wsdl:part name="UserId" type="xsd:string" />
<wsdl:part name="PassWord" type="xsd:string" />
<wsdl:part name="DateTime" type="xsd:date" />
<wsdl:part name="version" type="xsd:string" />
</wsdl:message>
- <wsdl:message name="GetRegistrations2Response">
<wsdl:part name="data" type="xsd:anyType" />
</wsdl:message>
- <wsdl:message name="GetRegistrationsResponse">
<wsdl:part name="data" type="xsd:anyType" />
</wsdl:message>
- <wsdl:message name="GetRegistrationsRequest">
<wsdl:part name="UserId" type="xsd:string" />
<wsdl:part name="PassWord" type="xsd:string" />
<wsdl:part name="DateTime" type="xsd:date" />
</wsdl:message>
- <wsdl:portType name="RegistrationsPortType">
- <wsdl:operation name="GetRegistrations" parameterOrder="UserId PassWord
DateTime">
<wsdl:input message="impl:GetRegistrationsRequest"
name="GetRegistrationsRequest" />
<wsdl:output message="impl:GetRegistrationsResponse"
name="GetRegistrationsResponse" />
</wsdl:operation>
- <wsdl:operation name="GetRegistrations2" parameterOrder="UserId PassWord
DateTime version">
<wsdl:input message="impl:GetRegistrations2Request"
name="GetRegistrations2Request" />
<wsdl:output message="impl:GetRegistrations2Response"
name="GetRegistrations2Response" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="RegistrationsPortSoapBinding"
type="impl:RegistrationsPortType">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="GetRegistrations">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="GetRegistrationsRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://xxx.xx/Webservices/Registration" use="encoded" />
</wsdl:input>
- <wsdl:output name="GetRegistrationsResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://xxx.xx/Webservices/Registration" use="encoded" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetRegistrations2">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="GetRegistrations2Request">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://xxx.xx/Webservices/Registration" use="encoded" />
</wsdl:input>
- <wsdl:output name="GetRegistrations2Response">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://xxx.xx/Webservices/Registration" use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Registrations">
- <wsdl:port binding="impl:RegistrationsPortSoapBinding"
name="RegistrationsPort">
<wsdlsoap:address location="http://xxx.xx/Webservices/Registration" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
************************WSDL Definitions END**************************
"Drew Marsh" wrote:
Henrik wrote:
I don't have any signature generated?? Whats that? .. The only thing
i've done, is generated the WSDL from at site: eg.
wsdl /language:VB /out:C:\myProxyClass.vb
http://xxx.xx/Webservices/Registration?wsdl
and then loaded the "myProxyClass.vb"-file into my vb.net project, and
begin using it..
What I meant by signature was the signature of the method on your proxy class
that represents the web method. I just wanted to see what was generated for
you so I had a better idea what types you were working with. The output you
pasted me is exactly what I was looking for. :)
<System.Web.Services.Protocols.SoapRpcMethodAttrib ute("",
RequestNamespace:="http://xxx.xx/Webservices/Registration",
ResponseNamespace:="http://xxx.xx/Webservices/Registration")> _
Public Function GetRegistrations(ByVal UserID As String,
<System.Xml.Serialization.SoapElementAttribute(Dat aType:="date")>
ByVal
DateTime As Date) As
<System.Xml.Serialization.SoapElementAttribute("da ta")>
Object
Dim results() As Object = Me.Invoke("GetRegistrations", New
Object()
{UserID, DateTime})
Return CType(results(0),Object)
End Function
'<remarks/>
Ok, the problem here is that for some reason, your proxy is only being generated
to return data of type Object. That means that the signature of the web method
that you're trying to call must not be too strongly typed. You said in your
initial post that it ends up being an array of two XmlAttributes and one
XmlElement is that right? This is very strange. Is there any way you can
post the WSDL or a link to it? WSDL.exe normally generates much richer .NET
method signatures than this and the fact that you're ending up with two XmlAttributes
and an XmlElement is, once again, very strange. My guess is that the schema
of the web method is structured such that WSDL.exe cannot make a clean translation.
I also don't quite known
how to call to 2 functions BeginGetRegistrations and
EndGetRegistrations??
You don't need to use those unless you want to make asynchronus calls to
the web method. If you're interested in doing that, just let me know, and
after we figure the main problem out I'll gladly show you how to call it.
In the meantime if found out that i throug a WebRequest's -
response.GetResponseStream(), get's a valid xml-document, to view in
Explorer.. but then i don't use the WSDL.. And i don't know how to
deserielize it in my vb code??
No need to go that extreme. Worst case scenario you have the two XmlAttribtes
and the XmlElement that represent the response message from your proxy class.
Even it it is a little perplexing as to why it's being translated that way,
you can still use these to access the XML data of the message.
Cheers,
Drew