Either WSDL or wsimport and wsdl (mono) are horribly broken

前端 未结 2 1183
执念已碎
执念已碎 2021-01-06 11:40

EDIT I started off with the example given below, but I have now:

  • Tried the example from the W3C spec. After fixing another error (binding was
2条回答
  •  再見小時候
    2021-01-06 12:28

    Although the question is rather old, here's a working WSDL:

    
    
    
      
        
    
          
            
              
                
              
            
          
    
          
            
              
                
              
            
          
    
        
      
    
      
        
      
    
      
        
      
    
      
        
          
          
        
      
    
      
        
        
          
          
            
          
          
            
          
        
      
    
      
        
          
        
      
    
    
    

    Things that I've changed:

    • set xmlns:xsd to http://www.w3.org/2001/XMLSchema instead of http://www.w3.org/1999/XMLSchema (the 1999 version is quite outdated)

    • removed namespace identified from the schema elements (GetOrders instead of o:GetOrders and GetOrdersResponse instead of os:GetOrdersResponse) (namespace qualifiers are not allowed within the name attribute of an element or type definition)

    • used the correct types for the subelements criteria and orders: xsd:string instead of string


    I agree, that a WSDL might be difficult in the beginning, however, once you have a grip on it, there's nothing better than a clearly defined interface. If I had a choice, I would prefer a wsdl over a json-REST-API without hesitation. But I guess that's a matter of taste ;-)

提交回复
热议问题