Topic
  • 9 replies
  • Latest Post - ‏2015-04-14T15:31:33Z by VijayRaj789
GlennCahill88
GlennCahill88
5 Posts

Pinned topic Fetching xsd from fetched wsdl

‏2013-06-15T10:51:39Z |

Hi,

I have fetched a wsdl from a service on datapower (?wsdl) and it returns the associated xsds as referenced import files (e.g. - <xsd:schema>
  <xsd:import schemaLocation="1_0_0.xsd4.xsd" namespace="http://allianz.com.au/schema/polisy/header/xsd/1_0_1" />
  <xsd:import schemaLocation="1_0_0.xsd2.xsd" namespace="http://www.PWWEBHD1.QPCYL1.Request.com" />
  <xsd:import schemaLocation="1_0_0.xsd3.xsd" namespace="http://www.PWWEBHD1.QPCYL1.Response.com" />
  </xsd:schema>).

My question is - how do I then retrieve these xsds from Datapower.  The service is setup on a WebServiceProxy object within Datapower.

 

Cheers,

 

Glenn

  • HermannSW
    HermannSW
    5824 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-15T20:22:54Z  

    Hi,

    just fetch the XSDs as indicated by @schemaLocation.

    So if the URL of your WSDL is "http://yourbox:port/endpoint?WSDL", then you get the 1st WSDL by "http://yourbox:port/endpoint/1_0_0.xsd4.xsd".

    You can find some more information in this recent related posting:
    https://www.ibm.com/developerworks/community/forums/html/topic?id=2f8427ae-e4a5-4af8-ae3a-543f46fa0412#329e3522-e775-48ae-b9e9-4719072d6dd7

    In case you create a new WSP on the same or another box referencing above WSDL by "http://yourbox:port/endpoint?WSDL", then you do not have to care about the imported XSDs -- the WSP will fetch all the XSDs automatically while compiling the WSDL.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Updated on 2013-06-15T20:24:58Z at 2013-06-15T20:24:58Z by HermannSW
  • GlennCahill88
    GlennCahill88
    5 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-16T03:03:40Z  
    • HermannSW
    • ‏2013-06-15T20:22:54Z

    Hi,

    just fetch the XSDs as indicated by @schemaLocation.

    So if the URL of your WSDL is "http://yourbox:port/endpoint?WSDL", then you get the 1st WSDL by "http://yourbox:port/endpoint/1_0_0.xsd4.xsd".

    You can find some more information in this recent related posting:
    https://www.ibm.com/developerworks/community/forums/html/topic?id=2f8427ae-e4a5-4af8-ae3a-543f46fa0412#329e3522-e775-48ae-b9e9-4719072d6dd7

    In case you create a new WSP on the same or another box referencing above WSDL by "http://yourbox:port/endpoint?WSDL", then you do not have to care about the imported XSDs -- the WSP will fetch all the XSDs automatically while compiling the WSDL.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Thanks for the response Hermann.  So, if I have a client that wants to get our Datapower hosted WSDL (GET via ?WSDL) and it returns the WSDL with the DP formulated import xsds..then they can validate via http://yourbox:port/endport/1_0_0.xsd4.xsd  ?  This may sounds like a silly question/statement but when I manually do this it doesn't return the xsd to my browser - I get a SOAP fault from DP:

      <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    - <soapenv:Body>
    - <soapenv:Fault>
      <faultcode>env:Server</faultcode>
      <faultstring>Internal Error</faultstring>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

    I think this is just because I'm not understanding the protocol/process of client WSDL/xsd validation.  Is that right?

     

    Thanks,

     

    Glenn

     

     

  • HermannSW
    HermannSW
    5824 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-16T21:03:27Z  

    Thanks for the response Hermann.  So, if I have a client that wants to get our Datapower hosted WSDL (GET via ?WSDL) and it returns the WSDL with the DP formulated import xsds..then they can validate via http://yourbox:port/endport/1_0_0.xsd4.xsd  ?  This may sounds like a silly question/statement but when I manually do this it doesn't return the xsd to my browser - I get a SOAP fault from DP:

      <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    - <soapenv:Body>
    - <soapenv:Fault>
      <faultcode>env:Server</faultcode>
      <faultstring>Internal Error</faultstring>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

    I think this is just because I'm not understanding the protocol/process of client WSDL/xsd validation.  Is that right?

     

    Thanks,

     

    Glenn

     

     

    Hi,

    you said above that you were able to retried the WSDL by "?WSDL" query.

    Please just replace "blah?WSDL" by "blah.1_0_0.xsd4.xsd" and try to access that URL in your browser.
    If "blah?WSDL" works, and the WSDL returned contains @schemaLocation "blah.1_0_0.xsd4.xsd", then you should be able to retrieve the Schema.

    Please do only change the "?WSDL" part of the URL, do not change anything in the "blah" part.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

  • GlennCahill88
    GlennCahill88
    5 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-16T21:30:35Z  
    • HermannSW
    • ‏2013-06-16T21:03:27Z

    Hi,

    you said above that you were able to retried the WSDL by "?WSDL" query.

    Please just replace "blah?WSDL" by "blah.1_0_0.xsd4.xsd" and try to access that URL in your browser.
    If "blah?WSDL" works, and the WSDL returned contains @schemaLocation "blah.1_0_0.xsd4.xsd", then you should be able to retrieve the Schema.

    Please do only change the "?WSDL" part of the URL, do not change anything in the "blah" part.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Hi Hermann,

    I'm not too sure what's happening...but

    This is what DP logged:

    [mpgw][info] source-http(HTTP_FSH_WSP_1): tid(95772855)[10.91.15.150]: Received HTTP/1.1 GET for /POLISY_INT/polisy/pcysrhinq/service/1_0_0/1_0_0.xsd4.xsd

    And I get back an internal error from DP but no indication in the log as to why and no other messages associated with tid 95772855.

    Any ideas?

     

    Thanks,

     

    Glenn

     

  • GlennCahill88
    GlennCahill88
    5 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-16T21:36:01Z  

    Hi Hermann,

    I'm not too sure what's happening...but

    This is what DP logged:

    [mpgw][info] source-http(HTTP_FSH_WSP_1): tid(95772855)[10.91.15.150]: Received HTTP/1.1 GET for /POLISY_INT/polisy/pcysrhinq/service/1_0_0/1_0_0.xsd4.xsd

    And I get back an internal error from DP but no indication in the log as to why and no other messages associated with tid 95772855.

    Any ideas?

     

    Thanks,

     

    Glenn

     

    Well, here are all the log messages that DP issued for my Get Request(different tid):

     

    07:33:36 mpgw debug 26726777   10.91.15.150 0x80e00140 source-http (HTTP_FSH_WSP_1): Generating chunked response stream to front
    07:33:36 mpgw debug 26726777   10.91.15.150 0x80e0013b source-http (HTTP_FSH_WSP_1): HTTP Transaction # 5 on this TCP connection
    07:33:36 mpgw info 26726777   10.91.15.150 0x80e0013a source-http (HTTP_FSH_WSP_1): Received HTTP/1.1 GET for /POLISY_INT/polisy/pcysrhinq/service/1_0_0/1_0_0.xsd4.xsd from 10.91.15.150

  • GlennCahill88
    GlennCahill88
    5 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-16T23:15:42Z  

    Well, here are all the log messages that DP issued for my Get Request(different tid):

     

    07:33:36 mpgw debug 26726777   10.91.15.150 0x80e00140 source-http (HTTP_FSH_WSP_1): Generating chunked response stream to front
    07:33:36 mpgw debug 26726777   10.91.15.150 0x80e0013b source-http (HTTP_FSH_WSP_1): HTTP Transaction # 5 on this TCP connection
    07:33:36 mpgw info 26726777   10.91.15.150 0x80e0013a source-http (HTTP_FSH_WSP_1): Received HTTP/1.1 GET for /POLISY_INT/polisy/pcysrhinq/service/1_0_0/1_0_0.xsd4.xsd from 10.91.15.150

    My reply got cut off... :-) 

     

    So, when I try to get the xsd I get the log messages above and the browser gets a SOAP fault :

      <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    - <soapenv:Body>
    - <soapenv:Fault>
      <faultcode>env:Server</faultcode>
      <faultstring>Internal Error</faultstring>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

    Any ideas?

     

    Cheers,

     

    Glenn

  • HermannSW
    HermannSW
    5824 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2013-06-17T09:28:05Z  

    My reply got cut off... :-) 

     

    So, when I try to get the xsd I get the log messages above and the browser gets a SOAP fault :

      <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    - <soapenv:Body>
    - <soapenv:Fault>
      <faultcode>env:Server</faultcode>
      <faultstring>Internal Error</faultstring>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>

    Any ideas?

     

    Cheers,

     

    Glenn

    Glenn,

    please create a PMR.
    Then Level 2 support will get your config export and I can look into it and determine what is wrong.

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

     

  • VijayRaj789
    VijayRaj789
    6 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2015-04-10T22:53:14Z  
    • HermannSW
    • ‏2013-06-16T21:03:27Z

    Hi,

    you said above that you were able to retried the WSDL by "?WSDL" query.

    Please just replace "blah?WSDL" by "blah.1_0_0.xsd4.xsd" and try to access that URL in your browser.
    If "blah?WSDL" works, and the WSDL returned contains @schemaLocation "blah.1_0_0.xsd4.xsd", then you should be able to retrieve the Schema.

    Please do only change the "?WSDL" part of the URL, do not change anything in the "blah" part.


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Hi,

    Please just replace "blah?WSDL" by "blah.1_0_0.xsd4.xsd" and try to access that URL in your browser. as suggested totally worked for me I was able to access all the XSD's.

     

    Cheers

  • VijayRaj789
    VijayRaj789
    6 Posts

    Re: Fetching xsd from fetched wsdl

    ‏2015-04-14T15:31:33Z  
    • HermannSW
    • ‏2013-06-17T09:28:05Z

    Glenn,

    please create a PMR.
    Then Level 2 support will get your config export and I can look into it and determine what is wrong.

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

     

    Hi Hermann,

    I am able to get the most of the XSD successfully using the below method but for one XSD I continue to get Soap fault.

    Is it a bug with Datapower, how dp does the referencing?

    how can we troubleshoot, I have checked with backend application and no issue on backend application

    11:14:12 AM    mpgw    debug    10018657         178.63.70.104    0x80e00140    source-http (CBSFH): Generating chunked response stream to front
    11:14:12 AM    mpgw    debug    10018657         178.63.70.104    0x80e0013b    source-http (CBSFH): HTTP Transaction # 1 on this TCP connection
    11:14:12 AM    mpgw    info    10018657               178.63.70.104    0x80e0013a    source-http (CBSFH): Received HTTP/1.1 GET for                                                                                  /ABC/PKFG/ProDocumentServices.xsd228.xsd from 178.63.70.104
    11:04:30 AM    mpgw    debug    10015681         178.63.70.104    0x80e00140    source-http (CBSFH): Generating chunked response stream to front
    11:04:30 AM    mpgw    debug    10015681         178.63.70.104    0x80e0013b    source-http (CBSFH): HTTP Transaction # 6 on this TCP connection
    11:04:30 AM    mpgw    info    10015681         178.63.70.104    0x80e0013a    source-http (CommBuySFH): Received HTTP/1.1 GET for                                                                                  /ABC/PKFG/ProDocumentServices.xsd76.xsd from 178.63.70.104