Topic
  • 4 replies
  • Latest Post - ‏2018-10-16T21:17:25Z by dpram
dpram
dpram
24 Posts

Pinned topic xml-wsdl validation in DP

‏2018-10-14T02:58:54Z | ;datapowerxi52 ;kenhygh hermannsw

hi Hermann,

 

do we have any tool to validate xml to wsdl validation?of-late i am getting push back from java developers that the direct end point works fine while if we go through DP,getting validation error - i tried through soap ui still getting the errors while accessing through DP.Iam looking for ways to tell them required changes in xml or wsdl by looking at errors.I tried through resource kit ,still i get the same error.

 

I have attached 2 wsdls and 2 requests and the errors are below - need to tell them what they need to fix as iam not good in xml's./wsdls

1) in this 205_cnp.wsdl and error is below ( for request_205.xml)

cvc-complex-type 2.4: in element content Map of type {http://service.cnp.consolidated.com/}contentMap, found &lt;CONTENT_SERVICES_NETWORK_CARE> (in default namespace), but next item should be end-element. (from client)</faultstring></env:Fault></env:Body></env:Envelope>

when i checked developer,he says content map can have any parameters but it should display one and rest it treats as any and gets skipped - but what change he has to do to get dp validation go through by eliminating above error ( don't want to switch off validation)

2) in second case is also for request202.9_xml for wsdl (202.9_KenanHBOCCI) - getting below error

  1. <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:open="http://www.openuri.org/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>EAI-100022E</faultcode><faultstring>Eid:202.9-Schema Validation Error</faultstring><detail><error>Error Description: http://172.24.72.1:11004/eComServices/KenanHBOCCISOAP: cvc-particle 3.1: in element {http://schemas.xmlsoap.org/soap/envelope/}Body of type {http://schemas.xmlsoap.org/soap/envelope/}Body, found &amp;lt;/soap:Body&gt; (in namespace http://schemas.xmlsoap.org/soap/envelope/), but next item should be any of [{http://schemas.xmlsoap.org/soap/envelope/}Fault, {http://www.cci.com/KenanHBOCCI/Response}OTTServicesResponse, {http://www.cci.com/KenanHBOCCI/Response}OTTKenanOrderResponse];&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soap:Body/&gt;&lt;/soap:Envelope&gt;</error></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

is there any tool or easy way of telling what is wrong with wsdl or xml? These all errors came when request come to dp and validates against wsdl.

 

Thanks

 

  • willeje
    willeje
    24 Posts

    Re: xml-wsdl validation in DP

    ‏2018-10-15T22:27:57Z  

    quick and easy, just use soapui (free).

     

    For your first issue, in the wsld following is defined:

    <xs:complexType name="mapWrapper">
    <xs:sequence>
    <xs:any maxOccurs="unbounded" minOccurs="0" 
    namespace="##other" processContents="skip"/>
    </xs:sequence>
    

    meaning elements from any namespace that is not the namespace of the parent element can be present. In your sample xml request namespace is the same as the parent element.

    <contentMap>
            <CONTENT_SERVICES_NETWORK_CARE>CONTENT_SERVICES_NETWORK_CARE</CONTENT_SERVICES_NETWORK_CARE>
            <CONTENT_FEATURES_NEW_INTERNET>CONTENT_FEATURES_NEW_INTERNET</CONTENT_FEATURES_NEW_INTERNET>
            <CONTENT_INSTALL_INTERNET>CONTENT_INSTALL_INTERNET</CONTENT_INSTALL_INTERNET>
            <CONTENT_SERVICES_INTERNET>CONTENT_SERVICES_INTERNET</CONTENT_SERVICES_INTERNET>
    </contentMap>
    

     

  • dpram
    dpram
    24 Posts

    Re: xml-wsdl validation in DP

    ‏2018-10-16T02:26:30Z  
    • willeje
    • ‏2018-10-15T22:27:57Z

    quick and easy, just use soapui (free).

     

    For your first issue, in the wsld following is defined:

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr"><xs:complexType name="mapWrapper"> <xs:sequence> <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="skip"/> </xs:sequence> </pre>

    meaning elements from any namespace that is not the namespace of the parent element can be present. In your sample xml request namespace is the same as the parent element.

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr"><contentMap> <CONTENT_SERVICES_NETWORK_CARE>CONTENT_SERVICES_NETWORK_CARE</CONTENT_SERVICES_NETWORK_CARE> <CONTENT_FEATURES_NEW_INTERNET>CONTENT_FEATURES_NEW_INTERNET</CONTENT_FEATURES_NEW_INTERNET> <CONTENT_INSTALL_INTERNET>CONTENT_INSTALL_INTERNET</CONTENT_INSTALL_INTERNET> <CONTENT_SERVICES_INTERNET>CONTENT_SERVICES_INTERNET</CONTENT_SERVICES_INTERNET> </contentMap> </pre>

     

    Thanks Willems - in that why DP is throwing validation error if that is what we wanted..

    can you please let me know how to fix that validation error in both the cases? In mean time i will try to use soapui for validation and check out further..

     

    Thanks & regards

    Raman kumar

  • willeje
    willeje
    24 Posts

    Re: xml-wsdl validation in DP

    ‏2018-10-16T10:04:36Z  

    For the first, see https://www.w3schools.com/xml/el_any.asp

    namespace Optional. Specifies the namespaces containing the elements that can be used. Can be set to one of the following:

    • ##any - elements from any namespace is allowed (this is default)
    • ##other - elements from any namespace that is not the namespace of the parent element can be present
    • ##local - elements must come from no namespace
    • ##targetNamespace - elements from the namespace of the parent element can be present
    • List of {URI references of namespaces, ##targetNamespace, ##local} - elements from a space-delimited list of the namespaces can be present

    For the second, provide dp logs because it looks like validation error is not from request rule.

  • dpram
    dpram
    24 Posts

    Re: xml-wsdl validation in DP

    ‏2018-10-16T21:17:25Z  
    • willeje
    • ‏2018-10-16T10:04:36Z

    For the first, see https://www.w3schools.com/xml/el_any.asp

    namespace Optional. Specifies the namespaces containing the elements that can be used. Can be set to one of the following:

    • ##any - elements from any namespace is allowed (this is default)
    • ##other - elements from any namespace that is not the namespace of the parent element can be present
    • ##local - elements must come from no namespace
    • ##targetNamespace - elements from the namespace of the parent element can be present
    • List of {URI references of namespaces, ##targetNamespace, ##local} - elements from a space-delimited list of the namespaces can be present

    For the second, provide dp logs because it looks like validation error is not from request rule.

    Thanks Willems  - for the second one,developer fixed in his code and i am not getting that error any more..

    only stuck with first one - i tried with soapui but it is not throwing any validation errors when i checked ws1 compatibility and run the test case/assertions on that...

     

    Thanks & regards

    Ramana kumar