Topic
  • 12 replies
  • Latest Post - ‏2013-01-05T01:08:21Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic WSP expecting a SOAP response instead of an XML resp.

‏2012-12-19T00:28:17Z |
Hi,

I am trying to call a backend application from WSP that returns an XML response. For some reason WSP fails expecting that to be SOAP. I tried to see if there is any option to change the SOAP mode but couldn't find. Below is the error log, can someone suggest me with the setting that I have to change ?

I only found one option in 'Advanced Proxy Settings' where it says 'SOAP Schema URL' but I couldn't change any content in that. Even if I delete URL, it comes back. Seems something in XML manager denotes response as 'SOAP.

System Log .....

0x00d30002 wsgw (CompositeConnectivityTest): Invalid SOAP envelope

0x80c00008 wsgw (CompositeConnectivityTest): rule (Test_default_response-rule): implied action Parse input as SOAP, attempt pipeline failed:
cvc-wildcard 2: unrecognized element {http://xxxx.org}orderView

0x80e003aa wsgw (CompositeConnectivityTest): http://16x.xx.xx.xx:xxx/xml/cawer:1: cvc-wildcard 2: unrecognized element {http://xxxx.org}orderView

0x80e003a6 wsgw (siteConnectivityTest): Parsing document: 'http://16x.xx.xx.xx:xxx/xml/cawer'

0x80a002ac xmlmgr (siteXMLManager): xsd Compilation Request: Found in cache (store:///schemas/soap-envelope.xsd)

0x80a002aa xmlmgr (siteXMLManager): xsd Compilation Request: Checking cache for URL store:///schemas/soap-envelope.xsd
Thanks,
Venky.
Updated on 2013-01-05T01:08:21Z at 2013-01-05T01:08:21Z by SystemAdmin
  • kenhygh
    kenhygh
    1607 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T09:57:10Z  
    You'll probably need to use an MultiProtocol Gateway. A WSP expects WSDL to define the service(s), and WSDL defines SOAP messages.

    Ken
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T18:59:28Z  
    • kenhygh
    • ‏2012-12-19T09:57:10Z
    You'll probably need to use an MultiProtocol Gateway. A WSP expects WSDL to define the service(s), and WSDL defines SOAP messages.

    Ken
    Hi Ken,

    Yes, I have done this MPG and this is working fine. I was trying to know the reason for failure in WSP.

    In WSP, I have provided WSDL and that is for the client(frontend)... backend communicates in XML format which is valid. I am not sure why WSP is expecting the backend response to be SOAP.. I believe I am doing something wrong...

    Thanks,
    Venkat.
  • kenhygh
    kenhygh
    1607 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T19:34:35Z  
    Hi Ken,

    Yes, I have done this MPG and this is working fine. I was trying to know the reason for failure in WSP.

    In WSP, I have provided WSDL and that is for the client(frontend)... backend communicates in XML format which is valid. I am not sure why WSP is expecting the backend response to be SOAP.. I believe I am doing something wrong...

    Thanks,
    Venkat.
    If you're using the same WSDL, then that may be your problem.

    Check out http://stackoverflow.com/questions/9976560/wsdl-service-for-plain-xml-not-soap

    Ken
  • PullMeOut
    PullMeOut
    47 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T19:42:29Z  
    Hi Ken,

    Yes, I have done this MPG and this is working fine. I was trying to know the reason for failure in WSP.

    In WSP, I have provided WSDL and that is for the client(frontend)... backend communicates in XML format which is valid. I am not sure why WSP is expecting the backend response to be SOAP.. I believe I am doing something wrong...

    Thanks,
    Venkat.
    In MPEG as you are not using WSDL, you have the luxury of defining what response type you want, but in WSP everything is bind to your WSDL, since the WSDL is expecting SOAP response, I don’t think you can get away with response xml, disable response validations at (wsdl level)in WSP policy, just give a try and see if it allows XML response.
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T22:31:28Z  
    • PullMeOut
    • ‏2012-12-19T19:42:29Z
    In MPEG as you are not using WSDL, you have the luxury of defining what response type you want, but in WSP everything is bind to your WSDL, since the WSDL is expecting SOAP response, I don’t think you can get away with response xml, disable response validations at (wsdl level)in WSP policy, just give a try and see if it allows XML response.
    Hi Ken/PullmeOut,

    Thanks for your inputs.

    Pardon me for my ignorance... I think there is a disconnect still. Let me put it this way...

    We have a WSDL which is obeyed by client. WSP service receives request from client in SOAP format as per the schema in WSDL, and WSP sends back the response in SOAP format as per the WSDL... This is completely fine. Coming to the backed, we can adapt any format, in my case I have XML request and response. Why would WSP compare backend response with XML ? I assumed that once I get XML response, I transform it to SOAP, while sending the response to client WSP would validate the response against WSDL.

    In simple words I am not trying to send XML response back to client. But trying to recieve the XML response from backend application where WSP is expecting that to be SOAP.

    Client
    SOAP -------> Web Service Proxy
    XML -----> Backend
    APP <----- SOAP
    Datapower <--------- XML
    Application

    Thanks,
    Venkat.
  • kenhygh
    kenhygh
    1607 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T22:38:41Z  
    Hi Ken/PullmeOut,

    Thanks for your inputs.

    Pardon me for my ignorance... I think there is a disconnect still. Let me put it this way...

    We have a WSDL which is obeyed by client. WSP service receives request from client in SOAP format as per the schema in WSDL, and WSP sends back the response in SOAP format as per the WSDL... This is completely fine. Coming to the backed, we can adapt any format, in my case I have XML request and response. Why would WSP compare backend response with XML ? I assumed that once I get XML response, I transform it to SOAP, while sending the response to client WSP would validate the response against WSDL.

    In simple words I am not trying to send XML response back to client. But trying to recieve the XML response from backend application where WSP is expecting that to be SOAP.

    Client
    SOAP -------> Web Service Proxy
    XML -----> Backend
    APP <----- SOAP
    Datapower <--------- XML
    Application

    Thanks,
    Venkat.
    A WSP expects the same interface for DP and the backend provider. Since your WSDL defines a SOAP response, that's what it expects from the backend.

    Ken
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T22:39:16Z  
    Hi Ken/PullmeOut,

    Thanks for your inputs.

    Pardon me for my ignorance... I think there is a disconnect still. Let me put it this way...

    We have a WSDL which is obeyed by client. WSP service receives request from client in SOAP format as per the schema in WSDL, and WSP sends back the response in SOAP format as per the WSDL... This is completely fine. Coming to the backed, we can adapt any format, in my case I have XML request and response. Why would WSP compare backend response with XML ? I assumed that once I get XML response, I transform it to SOAP, while sending the response to client WSP would validate the response against WSDL.

    In simple words I am not trying to send XML response back to client. But trying to recieve the XML response from backend application where WSP is expecting that to be SOAP.

    Client
    SOAP -------> Web Service Proxy
    XML -----> Backend
    APP <----- SOAP
    Datapower <--------- XML
    Application

    Thanks,
    Venkat.
    Sorry.. the picture came so bad... Attaching it...
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-19T22:54:12Z  
    Sorry.. the picture came so bad... Attaching it...
    Hi Ken,

    Thanks for your response.. I now get what you are trying to say.

    So what you are telling is ... datapower acts as like a proxy to other web service provider but not as an individual application on its own...

    Assume if I have some application XYZ that returns Non-XML, I have chose WSP to expose a WSDL ( web service ) to my clients and communicate with application XYZ by doing transformation from SOAP to Non-xml and Non-xml to SOAP, it would work. I should either call MPG from WSP ( incase I want to have WSDL validation ) or implement MPG instead of WSP ( incase I don't need validation etc) right ?

    Thanks,
    Venkat.
  • kenhygh
    kenhygh
    1607 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2012-12-20T09:54:08Z  
    Hi Ken,

    Thanks for your response.. I now get what you are trying to say.

    So what you are telling is ... datapower acts as like a proxy to other web service provider but not as an individual application on its own...

    Assume if I have some application XYZ that returns Non-XML, I have chose WSP to expose a WSDL ( web service ) to my clients and communicate with application XYZ by doing transformation from SOAP to Non-xml and Non-xml to SOAP, it would work. I should either call MPG from WSP ( incase I want to have WSDL validation ) or implement MPG instead of WSP ( incase I don't need validation etc) right ?

    Thanks,
    Venkat.
    I would do a MPG with a validate action. In your particular setup, I would probably

    Request rule:
    validate request against WSDL published to clients

    Response rule:
    validate response against XSD published by provider

    Ken
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2013-01-03T19:54:25Z  
    • kenhygh
    • ‏2012-12-20T09:54:08Z
    I would do a MPG with a validate action. In your particular setup, I would probably

    Request rule:
    validate request against WSDL published to clients

    Response rule:
    validate response against XSD published by provider

    Ken
    ok Ken. Thanks for your response.
  • swlinn
    swlinn
    1348 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2013-01-03T22:40:28Z  
    Hi Ken,

    Thanks for your response.. I now get what you are trying to say.

    So what you are telling is ... datapower acts as like a proxy to other web service provider but not as an individual application on its own...

    Assume if I have some application XYZ that returns Non-XML, I have chose WSP to expose a WSDL ( web service ) to my clients and communicate with application XYZ by doing transformation from SOAP to Non-xml and Non-xml to SOAP, it would work. I should either call MPG from WSP ( incase I want to have WSDL validation ) or implement MPG instead of WSP ( incase I don't need validation etc) right ?

    Thanks,
    Venkat.
    Hi Venkat,

    Sorry for the lag in responding as I've been on vacation for a couple weeks and am still catching up. I've had this exact use case where you are exposing a web service to your client, but your backend is not a web service. You can do this by setting the response type to "XML" or "Non-XML" as the case may be. This setting is hidden unless you access the WSP from the Objects Navigation, and is on the Proxy Tab. Once set to something other than SOAP for the response, this will remove the implicit SOAP validation. Then on your processing rule, make sure you disable your response rule schema validation. If you have your request (SOAP -> XML) and response (XML -> SOAP) transformations in place, you should be good to go.

    Regards,
    Steve
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: WSP expecting a SOAP response instead of an XML resp.

    ‏2013-01-05T01:08:21Z  
    • swlinn
    • ‏2013-01-03T22:40:28Z
    Hi Venkat,

    Sorry for the lag in responding as I've been on vacation for a couple weeks and am still catching up. I've had this exact use case where you are exposing a web service to your client, but your backend is not a web service. You can do this by setting the response type to "XML" or "Non-XML" as the case may be. This setting is hidden unless you access the WSP from the Objects Navigation, and is on the Proxy Tab. Once set to something other than SOAP for the response, this will remove the implicit SOAP validation. Then on your processing rule, make sure you disable your response rule schema validation. If you have your request (SOAP -> XML) and response (XML -> SOAP) transformations in place, you should be good to go.

    Regards,
    Steve
    Hi Steve,

    I have tried going to Objects--> Service Configuration --> Web Service Proxy and edited the 'Proxy Settings' and it is working fine....

    Thanks a lot....

    Venkat.