on 05-10-2007 10:56 AM
Hello!
I am trying to consume a web-service developed by 3rd party in VB .net. I can do it successfully in the old way: composing manually SOAP and calling it by CL_HTTP_CLIENT. Works fine!
However, when I try to create a client proxy, I get an error saying:
<i>Cannot generate proxy (object schema missing in WSDL, see long text)
Diagnosis
In the WSDL document, the object
"schema"
from the namespace
"http://tempuri.org/"
links to the object
"schema"
from the namespace
"http://www.w3.org/2001/XMLSchema"
However, this last object does not exist in the WSDL document."</i>
This is a WSDL generated by .net and I doubt that it has formal errors. What can I do?
Thanks!
Regards,
Igor
Won't post the entire WSDL since it's too long, but just definitions:
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://tempuri.org/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Hi, Raja!
Unfortunately, it is not public. But here it is entirely:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:import namespace="http://www.w3.org/2001/XMLSchema" />
<s:element name="MessageText">
<s:complexType />
</s:element>
<s:element name="MessageTextResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="MessageTextResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="HelloTable">
<s:complexType />
</s:element>
<s:element name="HelloTableResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloTableResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="HelloTable2">
<s:complexType />
</s:element>
<s:element name="HelloTable2Response">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloTable2Result">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="MessageTextSoapIn">
<wsdl:part name="parameters" element="tns:MessageText" />
</wsdl:message>
<wsdl:message name="MessageTextSoapOut">
<wsdl:part name="parameters" element="tns:MessageTextResponse" />
</wsdl:message>
<wsdl:message name="HelloTableSoapIn">
<wsdl:part name="parameters" element="tns:HelloTable" />
</wsdl:message>
<wsdl:message name="HelloTableSoapOut">
<wsdl:part name="parameters" element="tns:HelloTableResponse" />
</wsdl:message>
<wsdl:message name="HelloTable2SoapIn">
<wsdl:part name="parameters" element="tns:HelloTable2" />
</wsdl:message>
<wsdl:message name="HelloTable2SoapOut">
<wsdl:part name="parameters" element="tns:HelloTable2Response" />
</wsdl:message>
<wsdl:portType name="TestServiceSoap">
<wsdl:operation name="MessageText">
<wsdl:input message="tns:MessageTextSoapIn" />
<wsdl:output message="tns:MessageTextSoapOut" />
</wsdl:operation>
<wsdl:operation name="HelloTable">
<wsdl:input message="tns:HelloTableSoapIn" />
<wsdl:output message="tns:HelloTableSoapOut" />
</wsdl:operation>
<wsdl:operation name="HelloTable2">
<wsdl:input message="tns:HelloTable2SoapIn" />
<wsdl:output message="tns:HelloTable2SoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestServiceSoap" type="tns:TestServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="MessageText">
<soap:operation soapAction="http://tempuri.org/MessageText" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="HelloTable">
<soap:operation soapAction="http://tempuri.org/HelloTable" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="HelloTable2">
<soap:operation soapAction="http://tempuri.org/HelloTable2" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestService">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<wsdl:port name="TestServiceSoap" binding="tns:TestServiceSoap">
<soap:address location="http://bcc-meridio.uprava.ina.hr/saptest/testservice.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi there,
the problem is the line
<s:element ref="s:schema" />
which occurs twice.
If you remove that for testing you can create your proxy.
Actually I have no idea what that element definition is supposed to do. To me it looks like some potentially inifinite recursion; element schema contains an element HelloTableResult which contains an element of type schema ...
There are other obscure elements as well, all containing elements of type any or not further specified complex types.
It seems this tries to be very generic, in fact, I couldn't tell what this service is supposed to do....
regards,
anton
Addendum:
if you search google for
"<s:element ref="s:schema" />"
you'll find a number of hits dealing with that problem. obviously that is a .NET speciality for their datasets which hardly any other platform can cope with.
Here is a good <a href="http://msdn.microsoft.com/msdnmag/issues/03/04/XMLFiles/">explanation on MSDN</a>, including suggestions for a workaround.
anton
This "win-win-win" situation makes me happy!
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anton,
On contrary, after removing these lines, I was able to generate proxy and actually call all the methods of the service with no problems. OK, these are very basic functions, but anyway...
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
interesting. but obvious when I think of it. The element we removed is optional and only contains a description of the rest of the data(the 'real' content if you like). So, if .NET knows how to handle the data without the description everything should be fine.
Cool that we both learnt something new....
anton
Anton,
Thanks a lot! I hope I didn't misuse pointing system by doing this, but I believe that you deserved your 16 points. I am new to services world and this is a great help!
I am developing a very simple interface in cooperation with another company (retreiving data from their application). They exposed a "hello world" web service with no real data, just to establish communication.
MSDN explanation is quite complex - I'll read it later. But as common sense: If everything works fine if I remove 2 lines from WDSL, then what are these lines good for?
Thanks!
Regards,
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I can't explain it you any shorter than it is described in the MSDN article. And I do not fully understand it myself yet.
Basically it is about this: .NET works with highly dynamic structures, e.g. datasets. So the SOAP instance(message) actually exchanged only contains the description of the data structure to follow, i.e. only at runtime you get a WSDL describing the further data.
Now, when you create a proxy(client) in ABAP or Java you need to know at design time what the data structure will be (to create the respective data types/classes in that language). So, those languages can't (automatically) create proxies for this highly dynamic structures.
What the article says is, create a more static structure for communication witrh ABAP, Java and the like.
Concerning the removal of those two elements: it doesn't help you anything, since the ABAP SOAP runtime won't be able to parse an actual message. It was just for demonstration that those elements were causing the problem.
regards, anton
hi,
the schema object is part of the types object, so you should show us the beginning of your types object. should look something like
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:mynamespace/somepath"
targetNamespace="urn:mynamespace/somepath"
elementFormDefault="unqualified"
attributeFormDefault="qualified">
<xsd:simpleType name="char32">
...
</xsd:schema>
</wsdl:types>
anton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Anton!
Here's more of WSDL:
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:import namespace="http://www.w3.org/2001/XMLSchema" />
- <s:element name="MessageText">
<s:complexType />
</s:element>
- <s:element name="MessageTextResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="MessageTextResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
Hope this is enough. If not, please tell me. I am hesitating to post the entire WSDL - don't want to occupy space.
Igor
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.