netinhoteixeira / mac-soapclient

Automatically exported from code.google.com/p/mac-soapclient
0 stars 0 forks source link

xsi:type="xsd:string" #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. import wsdl generated by SAP XI
2. fill in fields
3. execute

What is the expected output? What do you see instead?
...
 <fileID>2323</fileID>
 <payload>dfskjglkdfsqjglmdjsljsqdflj</payload>
...

but I have 
...
 <fileID xsi:type="xsd:string">2323</fileID>
 <payload xsi:type="xsd:string">dfskjglkdfsqjglmdjsljsqdflj</payload>
...

What version of the product are you using? On what operating system?
Version 1.6.3.1 (1.6.3.1) on OS X Leopard

Please provide any additional information below.
SAP XI's soap adapter is not accepting the file because of those xsi:type
thing added, I need to be able to send the file with a regular tag

Original issue reported on code.google.com by Thibaut....@gmail.com on 17 Jan 2008 at 4:29

GoogleCodeExporter commented 9 years ago
yeah.. problem.. this client assumes that the receiver has a W3C XML Schema.

Original comment by UltraV...@gmail.com on 28 Mar 2008 at 3:06

GoogleCodeExporter commented 9 years ago
Same problem here, only not with file uploads. Not all web services expect
xsi:type="xsd:string". SalesForce API for one.

Original comment by googlegr...@gersic.com on 13 Nov 2008 at 3:03

GoogleCodeExporter commented 9 years ago
This same issue is occurring when an element is declared as a ComplexType that 
is
empty.  So, if there is an element that is defined like this:
<xs:element name="foo" type="EmptyContent"/>
<xs:complexType name="EmptyContent">
</xs:complexType>

<foo> should definitely not be of type "xsd:string".  In the above case what we 
are
trying to do is use the presence/absence of the element <foo> as a flag or 
boolean. 
It has no content itself, therefore it can not be a "string".

Original comment by prashant...@gmail.com on 22 May 2009 at 4:12

GoogleCodeExporter commented 9 years ago
While I commend the attempt to provide a generic WSDL parsing client, I noticed 
a number of issues, and got stuck on this same issue.  I use the following 
complex type:

        <xs:complexType> 
            <xs:sequence> 
                <xs:element maxOccurs="unbounded" minOccurs="1" name="credentials" type="xs:string"/> 
                <xs:element name="authType" type="sec:AuthenticationType"/> 
            </xs:sequence> 
        </xs:complexType> 

The xsd:string attributes in the generated request body most certainly cause 
issues against some server SOAP implementations.  Would love it if there was a 
way to toggle this on and off.  Looking through the code, it seems this might 
be controlled down in the WebKit.framework.

Another problem with complex types is the maxOccurs attribute does not seem to 
get parsed.  I didn't see an easy way to add another "credentials" element 
within the request body.  Again, the ability to control the request body seems 
limited by my knowledge of WebKit.framework.

Original comment by randy.se...@gmail.com on 1 Oct 2010 at 2:06